forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita0363ab
committed
Fix privilege check for SET SESSION AUTHORIZATION.
Presently, the privilege check for SET SESSION AUTHORIZATION checkswhether the original authenticated role was a superuser atconnection start time. Even if the role loses the superuserattribute, its existing sessions are permitted to change sessionauthorization to any role.This commit modifies this privilege check to verify the originalauthenticated role currently has superuser. In the event that theauthenticated role loses superuser within a session authorizationchange, the authorization change will remain in effect, which meansthe user can still take advantage of the target role's privileges.However, [RE]SET SESSION AUTHORIZATION will only permit switchingto the original authenticated role.Author: Joseph KoshakowDiscussion:https://postgr.es/m/CAAvxfHc-HHzONQ2oXdvhFF9ayRnidPwK%2BfVBhRzaBWYYLVQL-g%40mail.gmail.com1 parent9987a7b commita0363ab
File tree
4 files changed
+10
-23
lines changed- doc/src/sgml/ref
- src
- backend
- commands
- utils/init
- include
4 files changed
+10
-23
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
51 | 51 |
| |
52 | 52 |
| |
53 | 53 |
| |
54 |
| - | |
| 54 | + | |
55 | 55 |
| |
56 | 56 |
| |
57 | 57 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
854 | 854 |
| |
855 | 855 |
| |
856 | 856 |
| |
857 |
| - | |
| 857 | + | |
858 | 858 |
| |
859 | 859 |
| |
860 | 860 |
| |
|
Lines changed: 8 additions & 20 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
467 | 467 |
| |
468 | 468 |
| |
469 | 469 |
| |
470 |
| - | |
471 |
| - | |
| 470 | + | |
| 471 | + | |
472 | 472 |
| |
473 | 473 |
| |
474 | 474 |
| |
| |||
492 | 492 |
| |
493 | 493 |
| |
494 | 494 |
| |
495 |
| - | |
496 |
| - | |
| 495 | + | |
497 | 496 |
| |
498 | 497 |
| |
499 | 498 |
| |
| |||
582 | 581 |
| |
583 | 582 |
| |
584 | 583 |
| |
585 |
| - | |
586 |
| - | |
587 |
| - | |
588 |
| - | |
589 |
| - | |
590 |
| - | |
591 |
| - | |
592 |
| - | |
593 |
| - | |
594 |
| - | |
595 | 584 |
| |
596 | 585 |
| |
597 | 586 |
| |
| |||
741 | 730 |
| |
742 | 731 |
| |
743 | 732 |
| |
| 733 | + | |
744 | 734 |
| |
745 | 735 |
| |
746 | 736 |
| |
| |||
780 | 770 |
| |
781 | 771 |
| |
782 | 772 |
| |
783 |
| - | |
| 773 | + | |
784 | 774 |
| |
785 | 775 |
| |
786 |
| - | |
| 776 | + | |
787 | 777 |
| |
788 | 778 |
| |
789 | 779 |
| |
| |||
816 | 806 |
| |
817 | 807 |
| |
818 | 808 |
| |
819 |
| - | |
| 809 | + | |
820 | 810 |
| |
821 | 811 |
| |
822 | 812 |
| |
| |||
828 | 818 |
| |
829 | 819 |
| |
830 | 820 |
| |
831 |
| - | |
| 821 | + | |
832 | 822 |
| |
833 | 823 |
| |
834 | 824 |
| |
| |||
851 | 841 |
| |
852 | 842 |
| |
853 | 843 |
| |
854 |
| - | |
855 |
| - | |
856 | 844 |
| |
857 | 845 |
| |
858 | 846 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
357 | 357 |
| |
358 | 358 |
| |
359 | 359 |
| |
360 |
| - | |
361 | 360 |
| |
362 | 361 |
| |
363 | 362 |
| |
|
0 commit comments
Comments
(0)