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

[pgAdmin III] #315: Properties dialogue: REVOKE goes wrong in certain cases.

From: "pgAdmin Trac" <trac(at)code(dot)pgadmin(dot)org>
To:
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: [pgAdmin III] #315: Properties dialogue: REVOKE goes wrong in certain cases.
Date: 2011-04-21 14:30:13
Message-ID: 045.c404002ca2037ce1686de2b44ffb0969@code.pgadmin.org (view raw or flat)
Thread:
Lists: pgadmin-hackers
#315: Properties dialogue: REVOKE goes wrong in certain cases.
---------------------+------------------------------------------------------
 Reporter:  brsa     |       Owner:  dpage  
     Type:  bug      |      Status:  new    
 Priority:  major    |   Milestone:         
Component:  pgadmin  |     Version:  trunk  
 Keywords:           |    Platform:  windows
---------------------+------------------------------------------------------
 Testcase to reproduce - execute as superuser postgres:

 CREATE ROLE blob;
 CREATE ROLE blob_read;
 CREATE TABLE test (t integer PRIMARY KEY);
 GRANT SELECT ON TABLE test TO blob_read;   -- note the underscore!
 GRANT SELECT ON TABLE test TO blob;   -- note how this role's name is
 identical up to the underscore! Note also, that this GRANT comes after the
 one before.

 Open properties dialog on table, chose "Privileges" rider.
 You see 3 users that have privileges:
     postgres arwdDxt
     blob_read    r
     blob    r

 Now try to delete "blob_read". (mark, click [Remove], click [OK]).
 !The wrong role gets deleted!

 Actually, that is what the server gets. All 3 commands are wrong /
 nonsensical!
     REVOKE ALL ON TABLE test FROM GROUP blob;
     GRANT SELECT ON TABLE test TO GROUP blob;
     REVOKE ALL ON TABLE test FROM GROUP blob;

 The bug only occurs if blob_read appears before blob in the list of
 privileges.
 I have tried to pin down this one for a while now, but it was extremely
 hard to pin down. Present in 1.12.2 as well as 1.12.3 (pre-release).

 Maybe underscores in role-names confuse the algorithm .. ?

-- 
Ticket URL: <http://code.pgadmin.org/trac/ticket/315>
pgAdmin III <http://code.pgadmin.org/trac/>
pgAdmin III

Responses

pgadmin-hackers by date

Next:From: Erwin BrandstetterDate: 2011-04-21 14:34:16
Subject: Properties dialogue: REVOKE goes wrong in certain cases.
Previous:From: Dave PageDate: 2011-04-21 13:42:29
Subject: Re: 1.12.3 built

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