pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix GRANTED BY support in REVOKE ROLE statements
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix GRANTED BY support in REVOKE ROLE statements
@ 2021-11-26 13:15  Daniel Gustafsson <dgustafsson@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Daniel Gustafsson @ 2021-11-26 13:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix GRANTED BY support in REVOKE ROLE statements

Commit 6aaaa76bb added support for the GRANTED BY clause in GRANT and
REVOKE statements, but missed adding support for checking the role in
the REVOKE ROLE case. Fix by checking that the parsed role matches the
CURRENT_ROLE/CURRENT_USER requirement, and also add some tests for it.
Backpatch to v14 where GRANTED BY support was introduced.

Discussion: https://postgr.es/m/B7F6699A-A984-4943-B9BF-CEB84C003527@yesql.se
Backpatch-through: 14

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b2a459edfe645747744402f23de041e9c0a3cd93

Modified Files
--------------
src/backend/commands/user.c              | 11 +++++++++++
src/backend/parser/gram.y                |  2 ++
src/test/regress/expected/privileges.out |  9 +++++++++
src/test/regress/sql/privileges.sql      |  8 ++++++++
4 files changed, 30 insertions(+)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Fix GRANTED BY support in REVOKE ROLE statements
@ 2021-11-26 13:15  Daniel Gustafsson <dgustafsson@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Daniel Gustafsson @ 2021-11-26 13:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix GRANTED BY support in REVOKE ROLE statements

Commit 6aaaa76bb added support for the GRANTED BY clause in GRANT and
REVOKE statements, but missed adding support for checking the role in
the REVOKE ROLE case. Fix by checking that the parsed role matches the
CURRENT_ROLE/CURRENT_USER requirement, and also add some tests for it.
Backpatch to v14 where GRANTED BY support was introduced.

Discussion: https://postgr.es/m/B7F6699A-A984-4943-B9BF-CEB84C003527@yesql.se
Backpatch-through: 14

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/371087d006e04991080bf17cf2287db38d3ea92e

Modified Files
--------------
src/backend/commands/user.c              | 11 +++++++++++
src/backend/parser/gram.y                |  2 ++
src/test/regress/expected/privileges.out |  9 +++++++++
src/test/regress/sql/privileges.sql      |  8 ++++++++
4 files changed, 30 insertions(+)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-11-26 13:15 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-11-26 13:15 pgsql: Fix GRANTED BY support in REVOKE ROLE statements Daniel Gustafsson <dgustafsson@postgresql.org>
2021-11-26 13:15 pgsql: Fix GRANTED BY support in REVOKE ROLE statements Daniel Gustafsson <dgustafsson@postgresql.org>

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