pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: mz@alumni.sfu.ca
To: pgsql-bugs@postgresql.org
Subject: BUG #8685: "alter default privileges" cannot revoke default execute privilege on functions
Date: Wed, 18 Dec 2013 19:08:19 +0000
Message-ID: <E1VtMTj-0002jS-5h@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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



view thread (2+ messages)  latest in thread

Message-ID: <E1VtMTj-0002jS-5h@wrigleys.postgresql.org>
Permalink:  ../E1VtMTj-0002jS-5h@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/E1VtMTj-0002jS-5h@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: mz@alumni.sfu.ca
  Subject: Re: BUG #8685: "alter default privileges" cannot revoke default execute privilege on functions
  In-Reply-To: <E1VtMTj-0002jS-5h@wrigleys.postgresql.org>
  References: <E1VtMTj-0002jS-5h@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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