- Notifications
You must be signed in to change notification settings - Fork5
Commitbf03889
committed
GetUserId() changes to has_privs_of_role()
The pg_stat and pg_signal-related functions have been using GetUserId()instead of has_privs_of_role() for checking if the current user shouldbe able to see details in pg_stat_activity or signal other processes,requiring a user to do 'SET ROLE' for inheirited roles for a permissionscheck, unlike other permissions checks.This patch changes that behavior to, instead, act like most otherpermission checks and use has_privs_of_role(), removing the 'SET ROLE'need. Documentation and error messages updated accordingly.Per discussion with Alvaro, Peter, Adam (though not using Adam's patch),and Robert.Reviewed by Jeevan Chalke.1 parent12968cf commitbf03889
File tree
3 files changed
+47
-24
lines changed- doc/src/sgml
- src/backend/utils/adt
3 files changed
+47
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16328 | 16328 | | |
16329 | 16329 | | |
16330 | 16330 | | |
16331 | | - | |
16332 | | - | |
16333 | | - | |
| 16331 | + | |
| 16332 | + | |
| 16333 | + | |
16334 | 16334 | | |
16335 | 16335 | | |
16336 | 16336 | | |
| |||
16352 | 16352 | | |
16353 | 16353 | | |
16354 | 16354 | | |
16355 | | - | |
16356 | | - | |
16357 | | - | |
16358 | | - | |
| 16355 | + | |
| 16356 | + | |
| 16357 | + | |
16359 | 16358 | | |
16360 | 16359 | | |
16361 | 16360 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
85 | 88 | | |
86 | 89 | | |
87 | 90 | | |
88 | 91 | | |
89 | 92 | | |
90 | 93 | | |
91 | 94 | | |
| 95 | + | |
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
| |||
113 | 117 | | |
114 | 118 | | |
115 | 119 | | |
116 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
117 | 126 | | |
118 | 127 | | |
119 | 128 | | |
| |||
141 | 150 | | |
142 | 151 | | |
143 | 152 | | |
144 | | - | |
145 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
146 | 157 | | |
147 | 158 | | |
148 | 159 | | |
149 | 160 | | |
150 | 161 | | |
151 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
152 | 168 | | |
153 | 169 | | |
154 | 170 | | |
155 | | - | |
| 171 | + | |
156 | 172 | | |
157 | 173 | | |
158 | 174 | | |
159 | 175 | | |
160 | 176 | | |
161 | | - | |
162 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
163 | 181 | | |
164 | 182 | | |
165 | 183 | | |
166 | 184 | | |
167 | 185 | | |
168 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
169 | 192 | | |
170 | 193 | | |
171 | 194 | | |
172 | | - | |
| 195 | + | |
173 | 196 | | |
174 | 197 | | |
175 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
675 | 676 | | |
676 | 677 | | |
677 | 678 | | |
678 | | - | |
679 | | - | |
| 679 | + | |
| 680 | + | |
680 | 681 | | |
681 | 682 | | |
682 | 683 | | |
| |||
878 | 879 | | |
879 | 880 | | |
880 | 881 | | |
881 | | - | |
| 882 | + | |
882 | 883 | | |
883 | 884 | | |
884 | 885 | | |
| |||
899 | 900 | | |
900 | 901 | | |
901 | 902 | | |
902 | | - | |
| 903 | + | |
903 | 904 | | |
904 | 905 | | |
905 | 906 | | |
| |||
918 | 919 | | |
919 | 920 | | |
920 | 921 | | |
921 | | - | |
| 922 | + | |
922 | 923 | | |
923 | 924 | | |
924 | 925 | | |
| |||
944 | 945 | | |
945 | 946 | | |
946 | 947 | | |
947 | | - | |
| 948 | + | |
948 | 949 | | |
949 | 950 | | |
950 | 951 | | |
| |||
966 | 967 | | |
967 | 968 | | |
968 | 969 | | |
969 | | - | |
| 970 | + | |
970 | 971 | | |
971 | 972 | | |
972 | 973 | | |
| |||
990 | 991 | | |
991 | 992 | | |
992 | 993 | | |
993 | | - | |
| 994 | + | |
994 | 995 | | |
995 | 996 | | |
996 | 997 | | |
| |||
1037 | 1038 | | |
1038 | 1039 | | |
1039 | 1040 | | |
1040 | | - | |
| 1041 | + | |
1041 | 1042 | | |
1042 | 1043 | | |
1043 | 1044 | | |
| |||
0 commit comments
Comments
(0)