Re: Grantor name gets lost when grantor role dropped

From: Russell Smith <mr-russ(at)pws(dot)com(dot)au>
To: Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Grantor name gets lost when grantor role dropped
Date: 2007-04-17 08:02:51
Message-ID: 46247F2B.4050706@pws.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Alvaro Herrera wrote:
> Jeff Davis wrote:
>
>
>> CREATE ROLE test_role
>> NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE;
>>
>> CREATE ROLE invalid_grantor
>> SUPERUSER INHERIT NOCREATEDB NOCREATEROLE;
>>
>> SET ROLE invalid_grantor;
>> GRANT "postgres" TO "test_role";
>> SET ROLE postgres;
>>
>> select * from pg_roles;
>>
>> select pg_auth_members.*, ur.rolname, gr.rolname from pg_auth_members LEFT JOIN pg_roles ur ON roleid = oid
>> LEFT JOIN pg_roles gr ON gr.oid = grantor;
>>
>> DROP ROLE invalid_grantor;
>>
>> select pg_auth_members.*, ur.rolname, gr.rolname from pg_auth_members LEFT JOIN pg_roles ur ON roleid = oid
>> LEFT JOIN pg_roles gr ON gr.oid = grantor;
>>
>> DROP ROLE test_role;
>>
>
> The problem here is that we allowed the drop of invalid_grantor. We are
> missing a shared dependency on it.
>
So does this make a todo item?

But this still leaves the concerns about you can currently get the
database into an invalid state that can't be dumped and restored.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Dmitry Belyavsky 2007-04-17 10:32:50 BUG #3233: Trigger checks failed on concurrent transactions
Previous Message Alvaro Herrera 2007-04-17 02:44:30 Re: Grantor name gets lost when grantor role dropped

Browse pgsql-hackers by date

  From Date Subject
Next Message Zoltan Boszormenyi 2007-04-17 10:01:19 Re: [HACKERS] Re: IDENTITY/GENERATED v36 Re: Final version of IDENTITY/GENERATED patch
Previous Message Tom Lane 2007-04-17 07:44:56 Re: modifying the table function