Skip site navigation (1) Skip section navigation (2)

Re: BUG #3319: Superuser can't revoke grants on a schema given by aother user

From: Pedro Gimeno Fortea <pgsql(at)personal(dot)formauri(dot)es>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3319: Superuser can't revoke grants on a schema given by aother user
Date: 2007-05-30 21:30:50
Message-ID: 1180560650l.8394l.4l@dirtecnica.formauri.es (view raw or flat)
Thread:
Lists: pgsql-bugs
I got a broader view of the whole picture and obviously my proposal  
that the superuser automatically revokes the privileges granted by all  
others does not make sense. So let me state the solutions I propose to  
the problem I'm facing:

(1) In the documentation for REVOKE, after the paragraph that begins  
with "A user can only revoke privileges that were granted directly by  
that user." add another paragraph similar to this:

"The rule stated in the previous paragraph is also valid for the  
superuser. The superuser can however issue SET ROLE commands to revoke  
the privileges granted by the desired users."

(2) In the documentation for REVOKE, state clearly that REVOKE will  
fail silently if the user issuing the command is not the grantor. Do so  
preferably near the bit about the superuser above.

(3) When issuing the command REVOKE <PRIV> ON <OBJ> FROM <USER>, issue  
a NOTICE or WARNING message when, after executing it, the user <USER>  
has still privilege <PRIV> on object <OBJ>.

(4) Add a GRANTED BY <USER> extension to the REVOKE command which  
allows to revoke permissions given by other users, where <USER> can be  
ALL. Obviously it would be subject to other checks which could make it  
fail.

Of course 2 and 3 are mutually exclusive. Solution 1+2 is the simplest,  
as it only involves documentation. Solution 1+3 would be enough to  
avoid most surprises. Solution 1+3+4 would be ideal.

In response to

pgsql-bugs by date

Next:From: Euler Taveira de OliveiraDate: 2007-05-31 02:55:15
Subject: Re: BUG #3323: Wrong charset for the lower and upper functions
Previous:From: Tom LaneDate: 2007-05-30 20:18:03
Subject: Re: backend crash with FATAL: BeginInternalSubTransaction: unexpected state END

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group