dbTalk Databases Forums  

[BUGS] BUG #6728: revoke grant cascade behaviour

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #6728: revoke grant cascade behaviour in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
dmg@uvic.ca
 
Posts: n/a

Default [BUGS] BUG #6728: revoke grant cascade behaviour - 07-11-2012 , 01:39 PM






The following bug has been logged on the website:

Bug reference: 6728
Logged by: daniel german
Email address: dmg (AT) uvic (DOT) ca
PostgreSQL version: 9.1.4
Operating system: Linux (Ubuntu)
Description:

Hi there,

I am trying to understand how postgresql implements REVOKE GRANT ...
CASCADE

First the scenario:

We have the default user, and five roles (a, b, m, x, y). user belongs to
all.

Consider the following code:


set session role none;
drop table sailors;
create table sailors (a int);
select * from user;
grant select on sailors to a with grant option;
grant select on sailors to b with grant option;
set session role b;
grant select on sailors to m with grant option;
set session role a;
grant select on sailors to m with grant option;
set session role none;
\dp
set session role m;
grant select on sailors to x;
grant select on sailors to y;
set session role none;
select * from information_schema.column_privileges where table_name =
'sailors' and column_name = 'a';
\dp
set session role a;
revoke select on sailors from m cascade;
set session role none;
select * from information_schema.column_privileges where table_name =
'sailors' and column_name = 'a';
\dp

What I am surprised is that m keeps the proviledge (via b) but x and y have
lost it. See below). is that the way it is supposed to be?

thank you for your time,

--daniel

temp=# select * from information_schema.column_privileges where table_name =
'sailors' and column_name = 'a';
grantor | grantee | table_catalog | table_schema | table_name | column_name
Quote:
privilege_type | is_grantable
---------+---------+---------------+--------------+------------+-------------+----------------+--------------
dmg | dmg | temp | public | sailors | a
Quote:
UPDATE | YES
dmg | dmg | temp | public | sailors | a
SELECT | YES
dmg | dmg | temp | public | sailors | a
REFERENCES | YES
dmg | dmg | temp | public | sailors | a
INSERT | YES
dmg | a | temp | public | sailors | a
SELECT | YES
dmg | b | temp | public | sailors | a
SELECT | YES
b | m | temp | public | sailors | a
SELECT | YES



--
Sent via pgsql-bugs mailing list (pgsql-bugs (AT) postgresql (DOT) org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.