dropping user doesn't erase his rights.

From: Hubert depesz Lubaczewski <depesz(at)depesz(dot)pl>
To: pgsql-bugs(at)postgresql(dot)org
Subject: dropping user doesn't erase his rights.
Date: 2003-01-09 16:12:20
Message-ID: 20030109161220.GA1189@depesz.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Versions tested:
7.4devel from cvs and 7.2.x (i'm not sure about x since the test was
done by somebody else).

Description:
When dropping user his rights stay in database creating possible
security breach.

Sample Code:
create table xxx (...);
create user test;
grant select on xxx to test;
select relacl from pg_class where relname='czasy';
drop user test;
select relacl from pg_class where relname='czasy';

right now it's not even possible to revoke this rights:
# revoke all on xxx from test;
ERROR: user "test" does not exist
[[local]:5432] [depesz(at)depesz]
# revoke all on xxx from 102;
ERROR: parser: syntax error at or near "102" at character 24

I belive drop user should automatically drop all user privileges, and
even if not there should be simple syntax to drop all user privileges
from all objects in database (dropping all privileges "by hand" might be
major pain when dealing with > 100 tables with several hundreds of
views, procedures and so on.

depesz

--
hubert depesz lubaczewski http://www.depesz.pl/
> wynajmę mieszkanie - 60 metrów, 3 pokoje, piastów - od lutego (po <
-=> remoncie) interesuje cię - napisz: depesz(at)depesz(dot)pl <=-

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2003-01-09 16:21:56 Re: dropping user doesn't erase his rights.
Previous Message Andy Osborne 2003-01-09 15:38:01 Re: Version 7.2.3 unrecoverable crash on missing pg_clog