From: | Guillaume Perréal <perreal(at)lyon(dot)cemagref(dot)fr> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org |
Subject: | Fwd: Bug with groups and access permissions (7.0.0RC1): more information |
Date: | 2000-05-24 10:22:39 |
Message-ID: | 392BAD6F.830FD9EF@lyon.cemagref.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-general |
Well, I have more information about theses bugs:
> It seems there is a 'referential integrity' bug with groups and permissions:
>
> db=> CREATE USER user1;
> CREATE USER
> db=> CREATE GROUP group1 WITH SYSID 4 USER user1;
> CREATE GROUP
> db=> CREATE TABLE table1 (field1 integer PRIMARY KEY);
> CREATE
> db=> REVOKE ALL ON table1 FROM PUBLIC;
> CHANGE
> db=> GRANT ALL ON table1 TO GROUP group1;
> CHANGE
> db=> DROP GROUP group1;
> DROP GROUP
> \z
> NOTICE: get_groname: group 4 not found
> The connection to the server was lost. Attempting reset: Failed.
> !=>
It seems that dropping the group don't delete it from the tables permissions
(acl).
Then, when Postgresql try to display them, it can't find the name of the dropped
group.
> db=> DROP USER userx;
> ERROR: group groupy does not exist.
> db=> SELECT * from PG_GROUP;
> ...
> groupy | 5 | {1,4}
> ...
> db=> DROP GROUP groupy;
> DROP
>
Apparently, this tied with databases:
- Create a group 'foo' in the database 'foodb':
\c foodb postgres
CREATE GROUP foo;
- Add the user 'userfoo' in this group:
ALTER GROUP foo ADD USER 'userfoo;'
- Reconnect to database 'bardb':
\c bardb
- Trying to drop the user 'userfoo' leads to "group foo does not exist":
DROP USER userfoo;
But either dropping 'userfoo' from 'foodb' or dropping group 'foo' from 'bardb'
works!
Guillaume Perréal - Stagiaire MIAG
Cemagref (URH), Lyon, France
Tél: (+33) 4.72.20.87.64
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuo Ishii | 2000-05-24 10:29:39 | Re: \dS and \df <pattern> crashing psql |
Previous Message | Nishad PRAKASH | 2000-05-24 09:49:22 | \dS and \df <pattern> crashing psql |
From | Date | Subject | |
---|---|---|---|
Next Message | Karel Zak | 2000-05-24 11:03:52 | Re: TO_DATE and single digit months driving me nuts... |
Previous Message | Oliver Elphick | 2000-05-24 09:32:31 | Re: plperl extensions |