forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit79de984
committed
Remove the ability of a role to administer itself.
Commitf9fd176 effectively gaveevery role ADMIN OPTION on itself. However, this appears to besomething that happened accidentally as a result of refactoringwork rather than an intentional decision. Almost a decade later,it was discovered that this was a security vulnerability. As aresult, commitfea164a restrictedthis implicit ADMIN OPTION privilege to be exercisable only whenthe role being administered is the same as the session user andwhen no security-restricted operation is in progress. Thatcommit also documented the existence of this implicit privilegefor what seems to be the first time.The effect of the privilege is to allow a login role to grantthe privileges of that role, and optionally ADMIN OPTION on it,to some other role. That's an unusual thing to do, because generallymembership is granted in roles used as groups, rather than rolesused as users. Therefore, it does not seem likely that removingthe privilege will break things for many PostgreSQL users.However, it will make it easier to reason about the permissionssystem. This is the only case where a user who has not been given anyspecial permission (superuser, or ADMIN OPTION on some role) canmodify role membership, so removing it makes things more consistent.For example, if a superuser sets up role A and B and grants A to Bbut no other privileges to anyone, she can now be sure that no oneelse will be able to revoke that grant. Without this change, thatwould have been true only if A was a non-login role.Patch by me. Reviewed by Tom Lane and Stephen Frost.Discussion:http://postgr.es/m/CA+Tgmoawdt03kbA+dNyBcNWJpRxu0f4X=69Y3+DkXXZqmwMDLg@mail.gmail.com1 parent6176242 commit79de984
File tree
5 files changed
+8
-58
lines changed- doc/src/sgml/ref
- src
- backend
- commands
- utils/adt
- test/regress
- expected
- sql
5 files changed
+8
-58
lines changedLines changed: 4 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
251 | 251 |
| |
252 | 252 |
| |
253 | 253 |
| |
254 |
| - | |
255 |
| - | |
256 |
| - | |
257 |
| - | |
258 |
| - | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
259 | 258 |
| |
260 | 259 |
| |
261 | 260 |
| |
|
Lines changed: 0 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1425 | 1425 |
| |
1426 | 1426 |
| |
1427 | 1427 |
| |
1428 |
| - | |
1429 |
| - | |
1430 |
| - | |
1431 |
| - | |
1432 |
| - | |
1433 | 1428 |
| |
1434 | 1429 |
| |
1435 | 1430 |
| |
|
Lines changed: 2 additions & 36 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4619 | 4619 |
| |
4620 | 4620 |
| |
4621 | 4621 |
| |
4622 |
| - | |
4623 |
| - | |
4624 |
| - | |
4625 |
| - | |
4626 |
| - | |
4627 | 4622 |
| |
4628 | 4623 |
| |
4629 | 4624 |
| |
| |||
4935 | 4930 |
| |
4936 | 4931 |
| |
4937 | 4932 |
| |
| 4933 | + | |
4938 | 4934 |
| |
4939 |
| - | |
4940 |
| - | |
4941 |
| - | |
4942 |
| - | |
4943 |
| - | |
4944 |
| - | |
4945 |
| - | |
4946 |
| - | |
4947 |
| - | |
4948 |
| - | |
4949 |
| - | |
4950 |
| - | |
4951 |
| - | |
4952 |
| - | |
4953 |
| - | |
4954 |
| - | |
4955 |
| - | |
4956 |
| - | |
4957 |
| - | |
4958 |
| - | |
4959 |
| - | |
4960 |
| - | |
4961 |
| - | |
4962 |
| - | |
4963 |
| - | |
4964 |
| - | |
4965 |
| - | |
4966 |
| - | |
4967 |
| - | |
4968 |
| - | |
4969 |
| - | |
| 4935 | + | |
4970 | 4936 |
| |
4971 | 4937 |
| |
4972 | 4938 |
| |
|
Lines changed: 1 addition & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1653 | 1653 |
| |
1654 | 1654 |
| |
1655 | 1655 |
| |
1656 |
| - | |
1657 |
| - | |
1658 |
| - | |
1659 |
| - | |
1660 |
| - | |
| 1656 | + | |
1661 | 1657 |
| |
1662 |
| - | |
1663 |
| - | |
1664 | 1658 |
| |
1665 | 1659 |
| |
1666 | 1660 |
| |
|
Lines changed: 1 addition & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1089 | 1089 |
| |
1090 | 1090 |
| |
1091 | 1091 |
| |
1092 |
| - | |
1093 |
| - | |
1094 |
| - | |
1095 |
| - | |
1096 |
| - | |
| 1092 | + | |
1097 | 1093 |
| |
1098 | 1094 |
| |
1099 | 1095 |
| |
|
0 commit comments
Comments
(0)