]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix a bug in roles_is_member_of.
authorRobert Haas <rhaas@postgresql.org>
Tue, 30 Aug 2022 12:32:35 +0000 (08:32 -0400)
committerRobert Haas <rhaas@postgresql.org>
Wed, 31 Aug 2022 12:22:24 +0000 (08:22 -0400)
commit0101f770a05b07dd7a8e05b6f8f95d4e22f4e846
tree9b1525bac172bf736afc43aaa7d2471aecfe1368
parentc7892c253fdc7bcb99a61e820798588ee4c071b9
Fix a bug in roles_is_member_of.

Commit e3ce2de09d814f8770b2e3b3c152b7671bcdb83f rearranged this
function to be able to identify which inherited role had admin option
on the target role, but it got the order of operations wrong, causing
the function to return wrong answers in the presence of non-inherited
grants.

Fix that, and add a test case that verifies the correct behavior.

Patch by me, reviewed by Nathan Bossart

Discussion: http://postgr.es/m/CA+TgmoYamnu-xt-u7CqjYWnRiJ6BQaSpYOHXP=r4QGTfd1N_EA@mail.gmail.com
src/backend/utils/adt/acl.c
src/test/regress/expected/privileges.out
src/test/regress/sql/privileges.sql