pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: Handle policies during DROP OWNED BY
Date: Fri, 11 Dec 2015 21:12:49 +0000
Message-ID: <E1a7Uzh-0005GR-E1@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Handle policies during DROP OWNED BY

DROP OWNED BY handled GRANT-based ACLs but was not removing roles from
policies.  Fix that by having DROP OWNED BY remove the role specified
from the list of roles the policy (or policies) apply to, or the entire
policy (or policies) if it only applied to the role specified.

As with ACLs, the DROP OWNED BY caller must have permission to modify
the policy or a WARNING is thrown and no change is made to the policy.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/fda18e46a65196b98d6ca4ce4911085b0d2f182f

Modified Files
--------------
src/backend/catalog/pg_shdepend.c         |   13 ++
src/backend/commands/policy.c             |  256 +++++++++++++++++++++++++++++
src/include/commands/policy.h             |    2 +
src/test/regress/expected/rowsecurity.out |   14 ++
src/test/regress/sql/rowsecurity.sql      |   18 ++
5 files changed, 303 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


view thread (7+ messages)  latest in thread

Message-ID: <E1a7Uzh-0005GR-E1@gemulon.postgresql.org>
Permalink:  ../E1a7Uzh-0005GR-E1@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1a7Uzh-0005GR-E1@gemulon.postgresql.org

 · 

reply

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: sfrost@snowman.net
  Subject: Re: pgsql: Handle policies during DROP OWNED BY
  In-Reply-To: <E1a7Uzh-0005GR-E1@gemulon.postgresql.org>
  References: <E1a7Uzh-0005GR-E1@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