- Notifications
You must be signed in to change notification settings - Fork5
Commite710b65
committed
Remove the use of the pg_auth flat file for client authentication.
(That flat file is now completely useless, but removal will come later.)To do this, postpone client authentication into the startup transactionthat's run by InitPostgres. We still collect the startup packet and doSSL initialization (if needed) at the same time we did before. TheAuthenticationTimeout is applied separately to startup packet collectionand the actual authentication cycle. (This is a bit annoying, since itmeans a couple extra syscalls; but the signal handling requirements insideand outside a transaction are sufficiently different that it seems bestto treat the timeouts as completely independent.)A small security disadvantage is that if the given database name is invalid,this will be reported to the client before any authentication happens.We could work around that by connecting to database "postgres" instead,but consensus seems to be that it's not worth introducing such surprisingbehavior.Processing of all command-line switches and GUC options received from theclient is now postponed until after authentication. This means thatPostAuthDelay is much less useful than it used to be --- if you need toinvestigate problems during InitPostgres you'll have to set PreAuthDelayinstead. However, allowing an unauthenticated user to set any GUC optionswhatever seems a bit too risky, so we'll live with that.1 parent585806c commite710b65
File tree
15 files changed
+534
-603
lines changed- src
- backend
- libpq
- postmaster
- tcop
- utils
- init
- misc
- include
- libpq
- storage
- tcop
- utils
15 files changed
+534
-603
lines changedLines changed: 15 additions & 7 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 |
| |
| |||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
| 36 | + | |
36 | 37 |
| |
37 | 38 |
| |
| 39 | + | |
38 | 40 |
| |
39 | 41 |
| |
40 | 42 |
| |
| |||
281 | 283 |
| |
282 | 284 |
| |
283 | 285 |
| |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
284 | 295 |
| |
285 | 296 |
| |
286 | 297 |
| |
| |||
458 | 469 |
| |
459 | 470 |
| |
460 | 471 |
| |
| 472 | + | |
| 473 | + | |
| 474 | + | |
461 | 475 |
| |
462 | 476 |
| |
463 | 477 |
| |
| |||
690 | 704 |
| |
691 | 705 |
| |
692 | 706 |
| |
693 |
| - | |
694 |
| - | |
695 |
| - | |
696 | 707 |
| |
697 | 708 |
| |
698 | 709 |
| |
| |||
1823 | 1834 |
| |
1824 | 1835 |
| |
1825 | 1836 |
| |
1826 |
| - | |
1827 |
| - | |
1828 |
| - | |
1829 | 1837 |
| |
1830 | 1838 |
| |
1831 | 1839 |
| |
|
Lines changed: 49 additions & 34 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| |||
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
| 23 | + | |
23 | 24 |
| |
24 | 25 |
| |
| 26 | + | |
| 27 | + | |
| 28 | + | |
25 | 29 |
| |
26 | 30 |
| |
27 | 31 |
| |
28 | 32 |
| |
29 | 33 |
| |
30 |
| - | |
31 |
| - | |
32 |
| - | |
33 | 34 |
| |
34 |
| - | |
35 |
| - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
36 | 38 |
| |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
37 | 49 |
| |
38 |
| - | |
39 |
| - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
40 | 56 |
| |
41 |
| - | |
42 |
| - | |
43 |
| - | |
44 |
| - | |
45 |
| - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
46 | 60 |
| |
47 |
| - | |
48 |
| - | |
49 |
| - | |
50 |
| - | |
| 61 | + | |
| 62 | + | |
51 | 63 |
| |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
52 | 70 |
| |
53 |
| - | |
54 |
| - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
55 | 80 |
| |
56 | 81 |
| |
57 | 82 |
| |
| |||
119 | 144 |
| |
120 | 145 |
| |
121 | 146 |
| |
122 |
| - | |
| 147 | + | |
123 | 148 |
| |
124 |
| - | |
| 149 | + | |
125 | 150 |
| |
| 151 | + | |
| 152 | + | |
126 | 153 |
| |
127 |
| - | |
128 |
| - | |
129 |
| - | |
130 |
| - | |
131 |
| - | |
132 |
| - | |
133 |
| - | |
134 |
| - | |
135 |
| - | |
136 |
| - | |
137 |
| - | |
138 |
| - | |
139 |
| - | |
| 154 | + | |
140 | 155 |
| |
141 | 156 |
| |
142 | 157 |
| |
|
0 commit comments
Comments
(0)