forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitea46000
committed
Arrange for client authentication to occur before we select a specific
database to connect to. This is necessary for the walsender code to workproperly (it was previously using an untenable assumption that template1 wouldalways be available to connect to). This also gets rid of a small securityshortcoming that was introduced in the original patch to eliminate the flatauthentication files: before, you could find out whether or not the requesteddatabase existed even if you couldn't pass the authentication checks.The changes needed to support this are mainly just to treat pg_authid andpg_auth_members as nailed relations, so that we can read them without havingto be able to locate real pg_class entries for them. This mechanism wasalready debugged for pg_database, but we hadn't recognized the value ofapplying it to those catalogs too.Since the current code doesn't have support for accessing toast tables beforewe've brought up all of the relcache, remove pg_authid's toast table to ensurethat no one can store an out-of-line toasted value of rolpassword. The caseseems quite unlikely to occur in practice, and was effectively unsupportedanyway in the old "flatfiles" implementation.Update genbki.pl to actually implement the same rules as bootstrap.c does fornot-nullability of catalog columns. The previous coding was a bit cheesy butworked all right for the previous set of bootstrap catalogs. It does not workfor pg_authid, where rolvaliduntil needs to be nullable.Initdb forced due to minor catalog changes (mainly the toast table removal).1 parent7de2dfc commitea46000
File tree
10 files changed
+178
-123
lines changed- src
- backend
- catalog
- utils
- cache
- init
- include/catalog
10 files changed
+178
-123
lines changedLines changed: 2 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
| 13 | + | |
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| |||
327 | 327 |
| |
328 | 328 |
| |
329 | 329 |
| |
330 |
| - | |
331 |
| - | |
332 |
| - | |
| 330 | + | |
333 | 331 |
| |
334 | 332 |
| |
335 | 333 |
| |
|
Lines changed: 23 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
| 13 | + | |
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| |||
183 | 183 |
| |
184 | 184 |
| |
185 | 185 |
| |
| 186 | + | |
186 | 187 |
| |
187 | 188 |
| |
188 | 189 |
| |
189 | 190 |
| |
190 |
| - | |
| 191 | + | |
191 | 192 |
| |
192 | 193 |
| |
| 194 | + | |
193 | 195 |
| |
194 | 196 |
| |
195 | 197 |
| |
| |||
221 | 223 |
| |
222 | 224 |
| |
223 | 225 |
| |
224 |
| - | |
| 226 | + | |
225 | 227 |
| |
226 | 228 |
| |
227 | 229 |
| |
| |||
308 | 310 |
| |
309 | 311 |
| |
310 | 312 |
| |
311 |
| - | |
| 313 | + | |
| 314 | + | |
312 | 315 |
| |
313 | 316 |
| |
314 |
| - | |
| 317 | + | |
315 | 318 |
| |
316 | 319 |
| |
317 | 320 |
| |
| |||
337 | 340 |
| |
338 | 341 |
| |
339 | 342 |
| |
340 |
| - | |
341 |
| - | |
342 |
| - | |
343 |
| - | |
344 |
| - | |
345 |
| - | |
346 |
| - | |
347 |
| - | |
348 |
| - | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
349 | 358 |
| |
350 | 359 |
| |
351 | 360 |
| |
|
Lines changed: 40 additions & 22 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
981 | 981 |
| |
982 | 982 |
| |
983 | 983 |
| |
984 |
| - | |
985 | 984 |
| |
986 | 985 |
| |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
987 | 990 |
| |
988 | 991 |
| |
989 | 992 |
| |
990 | 993 |
| |
991 |
| - | |
| 994 | + | |
992 | 995 |
| |
993 |
| - | |
994 |
| - | |
995 |
| - | |
996 |
| - | |
997 |
| - | |
998 |
| - | |
999 |
| - | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
1000 | 1015 |
| |
1001 |
| - | |
1002 |
| - | |
1003 |
| - | |
1004 |
| - | |
1005 |
| - | |
1006 |
| - | |
1007 |
| - | |
1008 |
| - | |
1009 |
| - | |
1010 |
| - | |
1011 |
| - | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
1012 | 1030 |
| |
1013 | 1031 |
| |
1014 | 1032 |
| |
| |||
1397 | 1415 |
| |
1398 | 1416 |
| |
1399 | 1417 |
| |
1400 |
| - | |
| 1418 | + | |
1401 | 1419 |
| |
1402 | 1420 |
| |
1403 | 1421 |
| |
|
Lines changed: 39 additions & 19 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
| 46 | + | |
46 | 47 |
| |
47 | 48 |
| |
48 | 49 |
| |
| |||
87 | 88 |
| |
88 | 89 |
| |
89 | 90 |
| |
90 |
| - | |
| 91 | + | |
91 | 92 |
| |
92 | 93 |
| |
93 | 94 |
| |
94 | 95 |
| |
95 | 96 |
| |
96 | 97 |
| |
| 98 | + | |
| 99 | + | |
97 | 100 |
| |
98 | 101 |
| |
99 | 102 |
| |
| |||
118 | 121 |
| |
119 | 122 |
| |
120 | 123 |
| |
121 |
| - | |
| 124 | + | |
122 | 125 |
| |
123 | 126 |
| |
124 | 127 |
| |
| |||
1379 | 1382 |
| |
1380 | 1383 |
| |
1381 | 1384 |
| |
1382 |
| - | |
1383 |
| - | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
1384 | 1388 |
| |
1385 | 1389 |
| |
1386 | 1390 |
| |
| |||
1461 | 1465 |
| |
1462 | 1466 |
| |
1463 | 1467 |
| |
1464 |
| - | |
1465 |
| - | |
| 1468 | + | |
| 1469 | + | |
1466 | 1470 |
| |
1467 | 1471 |
| |
1468 | 1472 |
| |
| |||
2455 | 2459 |
| |
2456 | 2460 |
| |
2457 | 2461 |
| |
| 2462 | + | |
| 2463 | + | |
2458 | 2464 |
| |
2459 | 2465 |
| |
2460 | 2466 |
| |
| |||
2750 | 2756 |
| |
2751 | 2757 |
| |
2752 | 2758 |
| |
2753 |
| - | |
2754 |
| - | |
2755 |
| - | |
2756 |
| - | |
2757 |
| - | |
2758 |
| - | |
| 2759 | + | |
| 2760 | + | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
| 2765 | + | |
2759 | 2766 |
| |
2760 | 2767 |
| |
2761 | 2768 |
| |
| |||
2768 | 2775 |
| |
2769 | 2776 |
| |
2770 | 2777 |
| |
2771 |
| - | |
| 2778 | + | |
| 2779 | + | |
2772 | 2780 |
| |
2773 | 2781 |
| |
2774 | 2782 |
| |
| |||
2780 | 2788 |
| |
2781 | 2789 |
| |
2782 | 2790 |
| |
2783 |
| - | |
| 2791 | + | |
2784 | 2792 |
| |
2785 | 2793 |
| |
2786 | 2794 |
| |
2787 | 2795 |
| |
2788 | 2796 |
| |
| 2797 | + | |
| 2798 | + | |
| 2799 | + | |
| 2800 | + | |
2789 | 2801 |
| |
2790 |
| - | |
| 2802 | + | |
2791 | 2803 |
| |
2792 | 2804 |
| |
2793 | 2805 |
| |
| |||
2910 | 2922 |
| |
2911 | 2923 |
| |
2912 | 2924 |
| |
2913 |
| - | |
| 2925 | + | |
| 2926 | + | |
| 2927 | + | |
2914 | 2928 |
| |
2915 | 2929 |
| |
2916 | 2930 |
| |
2917 | 2931 |
| |
2918 | 2932 |
| |
2919 | 2933 |
| |
2920 | 2934 |
| |
2921 |
| - | |
2922 |
| - | |
| 2935 | + | |
| 2936 | + | |
| 2937 | + | |
| 2938 | + | |
| 2939 | + | |
| 2940 | + | |
| 2941 | + | |
| 2942 | + | |
2923 | 2943 |
| |
2924 | 2944 |
| |
2925 | 2945 |
| |
|
Lines changed: 6 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
429 | 429 |
| |
430 | 430 |
| |
431 | 431 |
| |
432 |
| - | |
433 |
| - | |
434 | 432 |
| |
435 |
| - | |
| 433 | + | |
436 | 434 |
| |
437 | 435 |
| |
438 | 436 |
| |
| |||
479 | 477 |
| |
480 | 478 |
| |
481 | 479 |
| |
482 |
| - | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
483 | 484 |
| |
484 | 485 |
| |
485 | 486 |
| |
|
0 commit comments
Comments
(0)