pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
BUG #8685: "alter default privileges" cannot revoke default execute privilege on functions 2+ messages / 2 participants [nested] [flat]
* BUG #8685: "alter default privileges" cannot revoke default execute privilege on functions @ 2013-12-18 19:08 mz@alumni.sfu.ca 0 siblings, 1 reply; 2+ messages in thread From: mz@alumni.sfu.ca @ 2013-12-18 19:08 UTC (permalink / raw) To: pgsql-bugs The following bug has been logged on the website: Bug reference: 8685 Logged by: Manuel Zahariev Email address: mz@alumni.sfu.ca PostgreSQL version: 9.1.11 Operating system: Ubuntu 13.10 Description: ALTER DEFAULT PRIVILEGES REVOKE EXECUTE ON FUNCTIONS FROM <role> ...does not remove default execute privileges on functions ==================== Log: $sudo -u postgres psql psql (9.1.11) Type "help" for help. postgres=# CREATE DATABASE db; CREATE DATABASE postgres=# CREATE ROLE u WITH PASSWORD '1234' login; CREATE ROLE postgres=# \c db You are now connected to database "db" as user "postgres". db=# ALTER DEFAULT PRIVILEGES REVOKE EXECUTE ON FUNCTIONS FROM u; ALTER DEFAULT PRIVILEGES db=# CREATE FUNCTION f() RETURNS varchar AS $$ db$# SELECT 'Hello'::varchar; db$# $$ LANGUAGE 'SQL' SECURITY DEFINER; CREATE FUNCTION db=# SELECT * FROM f(); f ------- Hello (1 row) db=# \q $psql -h localhost db u Password for user u: psql (9.1.11) SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256) Type "help" for help. db=> SELECT * FROM f(); -- should fail f ------- Hello (1 row) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #8685: "alter default privileges" cannot revoke default execute privilege on functions @ 2013-12-18 20:21 David Johnston <polobo@yahoo.com> parent: mz@alumni.sfu.ca 0 siblings, 0 replies; 2+ messages in thread From: David Johnston @ 2013-12-18 20:21 UTC (permalink / raw) To: pgsql-bugs mz wrote > The following bug has been logged on the website: > > Bug reference: 8685 > Logged by: Manuel Zahariev > Email address: > mz@.sfu > PostgreSQL version: 9.1.11 > Operating system: Ubuntu 13.10 > Description: > > ALTER DEFAULT PRIVILEGES REVOKE EXECUTE ON FUNCTIONS FROM > <role> > ...does not remove default execute privileges on functions > > db=# ALTER DEFAULT PRIVILEGES REVOKE EXECUTE ON FUNCTIONS FROM u; "u" inherits its ability to execute functions from PUBLIC. With grants you do not tell the system what not to do (i.e., it does not block already granted permissions) but only what to allow. In order to revoke execute on functions globally you must remove the corresponding GRANT from PUBLIC. Revoking only removes a previously applied GRANT. In the case of default privileges it only revokes previously established default grants. ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2013-12-18 20:21 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2013-12-18 19:08 BUG #8685: "alter default privileges" cannot revoke default execute privilege on functions mz@alumni.sfu.ca 2013-12-18 20:21 ` David Johnston <polobo@yahoo.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox