forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3ca1949
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 parent635140a commit3ca1949
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 | |
---|---|---|---|
| |||
1262 | 1262 |
| |
1263 | 1263 |
| |
1264 | 1264 |
| |
1265 |
| - | |
1266 |
| - | |
1267 |
| - | |
1268 |
| - | |
1269 |
| - | |
| 1265 | + | |
1270 | 1266 |
| |
1271 | 1267 |
| |
1272 | 1268 |
| |
|
Lines changed: 9 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1040 | 1040 |
| |
1041 | 1041 |
| |
1042 | 1042 |
| |
1043 |
| - | |
1044 |
| - | |
1045 |
| - | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
1046 | 1051 |
| |
| 1052 | + | |
1047 | 1053 |
| |
1048 | 1054 |
| |
1049 | 1055 |
| |
|
Lines changed: 10 additions & 21 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1057 | 1057 |
| |
1058 | 1058 |
| |
1059 | 1059 |
| |
1060 |
| - | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
1061 | 1065 |
| |
1062 |
| - | |
1063 |
| - | |
1064 |
| - | |
1065 |
| - | |
1066 |
| - | |
1067 |
| - | |
1068 |
| - | |
| 1066 | + | |
1069 | 1067 |
| |
1070 |
| - | |
1071 |
| - | |
1072 |
| - | |
1073 |
| - | |
1074 |
| - | |
1075 |
| - | |
1076 |
| - | |
1077 |
| - | |
1078 |
| - | |
1079 |
| - | |
1080 |
| - | |
1081 |
| - | |
1082 |
| - | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
1083 | 1072 |
| |
1084 | 1073 |
| |
1085 | 1074 |
| |
|
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)