Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VtNcZ-0007xe-2v for pgsql-bugs@arkaria.postgresql.org; Wed, 18 Dec 2013 20:21:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VtNcY-0004FB-IH for pgsql-bugs@arkaria.postgresql.org; Wed, 18 Dec 2013 20:21:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VtNcX-0004EA-Hk for pgsql-bugs@postgresql.org; Wed, 18 Dec 2013 20:21:29 +0000 Received: from sam.nabble.com ([216.139.236.26]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VtNcU-0007XE-HD for pgsql-bugs@postgresql.org; Wed, 18 Dec 2013 20:21:29 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1VtNcT-0000Xt-5L for pgsql-bugs@postgresql.org; Wed, 18 Dec 2013 12:21:25 -0800 Date: Wed, 18 Dec 2013 12:21:25 -0800 (PST) From: David Johnston To: pgsql-bugs@postgresql.org Message-ID: <1387398085142-5783947.post@n5.nabble.com> In-Reply-To: References: Subject: Re: BUG #8685: "alter default privileges" cannot revoke default execute privilege on functions MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 2.8 (++) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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 > > ...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.