forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit860fe27
committed
Fix up usage of krb_server_keyfile GUC parameter.
secure_open_gssapi() installed the krb_server_keyfile setting asKRB5_KTNAME unconditionally, so long as it's not empty. However,pg_GSS_recvauth() only installed it if KRB5_KTNAME wasn't set already,leading to a troubling inconsistency: in theory, clients could seedifferent sets of server principal names depending on whether theyuse GSSAPI encryption. Always using krb_server_keyfile seems likethe right thing, so make both places do that. Also fix upsecure_open_gssapi()'s lack of a check for setenv() failure ---it's unlikely, surely, but security-critical actions are no placeto be sloppy.Also improve the associated documentation.This patch does nothing about secure_open_gssapi()'s use of setenv(),and indeed causes pg_GSS_recvauth() to use it too. That's nominallyagainst project portability rules, but since this code is only builtwith --with-gssapi, I do not feel a need to do something about thisin the back branches. A fix will be forthcoming for HEAD though.Back-patch to v12 where GSSAPI encryption was introduced. Thedubious behavior in pg_GSS_recvauth() goes back further, but itdidn't have anything to be inconsistent with, so let it be.Discussion:https://postgr.es/m/2187460.1609263156@sss.pgh.pa.us1 parente665769 commit860fe27
File tree
5 files changed
+31
-32
lines changed- doc/src/sgml
- src/backend
- libpq
- utils/misc
5 files changed
+31
-32
lines changedLines changed: 1 addition & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1265 | 1265 |
| |
1266 | 1266 |
| |
1267 | 1267 |
| |
1268 |
| - | |
1269 |
| - | |
1270 |
| - | |
1271 |
| - | |
1272 |
| - | |
| 1268 | + | |
1273 | 1269 |
| |
1274 | 1270 |
| |
1275 | 1271 |
| |
|
Lines changed: 9 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1057 | 1057 |
| |
1058 | 1058 |
| |
1059 | 1059 |
| |
1060 |
| - | |
1061 |
| - | |
1062 |
| - | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
1063 | 1068 |
| |
| 1069 | + | |
1064 | 1070 |
| |
1065 | 1071 |
| |
1066 | 1072 |
| |
|
Lines changed: 10 additions & 21 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1054 | 1054 |
| |
1055 | 1055 |
| |
1056 | 1056 |
| |
1057 |
| - | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
1058 | 1062 |
| |
1059 |
| - | |
1060 |
| - | |
1061 |
| - | |
1062 |
| - | |
1063 |
| - | |
1064 |
| - | |
1065 |
| - | |
| 1063 | + | |
1066 | 1064 |
| |
1067 |
| - | |
1068 |
| - | |
1069 |
| - | |
1070 |
| - | |
1071 |
| - | |
1072 |
| - | |
1073 |
| - | |
1074 |
| - | |
1075 |
| - | |
1076 |
| - | |
1077 |
| - | |
1078 |
| - | |
1079 |
| - | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
1080 | 1069 |
| |
1081 | 1070 |
| |
1082 | 1071 |
| |
|
Lines changed: 10 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
525 | 525 |
| |
526 | 526 |
| |
527 | 527 |
| |
528 |
| - | |
529 |
| - | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
530 | 538 |
| |
531 | 539 |
| |
532 | 540 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
92 | 92 |
| |
93 | 93 |
| |
94 | 94 |
| |
95 |
| - | |
| 95 | + | |
96 | 96 |
| |
97 | 97 |
| |
98 | 98 |
| |
|
0 commit comments
Comments
(0)