From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix a bug in roles_is_member_of.
Date: Wed, 31 Aug 2022 12:29:00 +0000
Message-ID: <E1oTMq3-000koa-Pk@gemulon.postgresql.org> (raw)
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/0101f770a05b07dd7a8e05b6f8f95d4e22f4e846
Modified Files
--------------
src/backend/utils/adt/acl.c | 8 ++++----
src/test/regress/expected/privileges.out | 32 ++++++++++++++++++++++++++++++++
src/test/regress/sql/privileges.sql | 25 +++++++++++++++++++++++++
3 files changed, 61 insertions(+), 4 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: rhaas@postgresql.org
Subject: Re: pgsql: Fix a bug in roles_is_member_of.
In-Reply-To: <E1oTMq3-000koa-Pk@gemulon.postgresql.org>
References: <E1oTMq3-000koa-Pk@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox