Re: CREATEROLE and role ownership hierarchies

From: Joshua Brindle <joshua(dot)brindle(at)crunchydata(dot)com>
To: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Shinya Kato <Shinya11(dot)Kato(at)oss(dot)nttdata(dot)com>, "Bossart, Nathan" <bossartn(at)amazon(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Jeff Davis <pgsql(at)j-davis(dot)com>
Subject: Re: CREATEROLE and role ownership hierarchies
Date: 2022-01-07 14:51:41
Message-ID: CAGB+Vh61rf4-xf2_1SuoXCMET2C+tqEcy6Z96JjAjHM6YwOR5g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 5, 2022 at 7:05 PM Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com> wrote:

> > On Jan 4, 2022, at 12:47 PM, Joshua Brindle <joshua(dot)brindle(at)crunchydata(dot)com> wrote:
> >
> >> I was able to reproduce that using REASSIGN OWNED BY to cause a user to own itself. Is that how you did it, or is there yet another way to get into that state?
> >
> > I did:
> > ALTER ROLE brindle OWNER TO brindle;
>
> Ok, thanks. I have rebased, fixed both REASSIGN OWNED BY and ALTER ROLE .. OWNER TO cases, and added regression coverage for them.
>
> The last patch set to contain significant changes was v2, with v3 just being a rebase. Relative to those sets:
>
> 0001 -- rebased.
> 0002 -- rebased; extend AlterRoleOwner_internal to disallow making a role its own immediate owner.
> 0003 -- rebased; extend AlterRoleOwner_internal to disallow cycles in the role ownership graph.
> 0004 -- rebased.
> 0005 -- new; removes the broken pg_auth_members.grantor field.
>

LGTM +1

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Finnerty, Jim 2022-01-07 15:39:16 Re: Add 64-bit XIDs into PostgreSQL 15
Previous Message Christoph Berg 2022-01-07 14:41:16 Re: pgsql: Refactor tar method of walmethods.c to rely on the compression m