pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: AC Gomez <antklc@gmail.com>
To: raf <raf@raf.org>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Backing out of privilege grants rabbit hole
Date: Fri, 3 Apr 2020 10:23:57 -0700
Message-ID: <b02e4d77-0ce4-7283-5200-0ac61c7f38ed@aklaver.com> (raw)
In-Reply-To: <af60efa9-a86a-94fa-640a-c6b8cea281f3@aklaver.com>
References: <CABtmK-gif5ThuF+h9GUJQi8O1_eAWvK7+aC4+h73utkW=Qp8XQ@mail.gmail.com>
	<C4EC1CAB-62B2-458E-BF51-B187754AAF5B@gmail.com>
	<CABtmK-jaaJVT=eBz6-Yti98X2-wSnQQ5GoufWf=nMoJVDudZNA@mail.gmail.com>
	<20200403045739.ej4qsc6cx4nk4yb4@raf.org>
	<CABtmK-g5a31Ekmt+BjpTUJZcCJLwZYrNw+3prBsLoQmPy_dftw@mail.gmail.com>
	<af60efa9-a86a-94fa-640a-c6b8cea281f3@aklaver.com>

On 4/3/20 10:18 AM, Adrian Klaver wrote:
> On 4/2/20 9:59 PM, AC Gomez wrote:
>> Granted. But we are where we are, so I'm assuming this is going to be 
>> hand to hand combat.
> 
> Well you could even the odds somewhat by using the below as a starting 
> point:
> 
> 
> SELECT
>      relname,
>      pg_roles.rolname,
>      acl.*
> FROM
>      pg_class,
>      aclexplode(relacl) AS acl
>      JOIN pg_roles ON acl.grantee = pg_roles.oid
> WHERE
>      pg_roles.oid = 'some_role'::regrole;
> 

Possible flaw in plan, the above only works with v12+.



-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (11+ messages)  latest in thread

Message-ID: <b02e4d77-0ce4-7283-5200-0ac61c7f38ed@aklaver.com>
Permalink:  ../b02e4d77-0ce4-7283-5200-0ac61c7f38ed@aklaver.com/
Also on:    postgresql.org/message-id/b02e4d77-0ce4-7283-5200-0ac61c7f38ed@aklaver.com

 · 

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-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, antklc@gmail.com, raf@raf.org
  Subject: Re: Backing out of privilege grants rabbit hole
  In-Reply-To: <b02e4d77-0ce4-7283-5200-0ac61c7f38ed@aklaver.com>
  References: <CABtmK-gif5ThuF+h9GUJQi8O1_eAWvK7+aC4+h73utkW=Qp8XQ@mail.gmail.com> <C4EC1CAB-62B2-458E-BF51-B187754AAF5B@gmail.com> <CABtmK-jaaJVT=eBz6-Yti98X2-wSnQQ5GoufWf=nMoJVDudZNA@mail.gmail.com> <20200403045739.ej4qsc6cx4nk4yb4@raf.org> <CABtmK-g5a31Ekmt+BjpTUJZcCJLwZYrNw+3prBsLoQmPy_dftw@mail.gmail.com> <af60efa9-a86a-94fa-640a-c6b8cea281f3@aklaver.com> <b02e4d77-0ce4-7283-5200-0ac61c7f38ed@aklaver.com>

* 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