Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bnas2-0004vM-I5 for pgsql-docs@arkaria.postgresql.org; Sat, 24 Sep 2016 00:31:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bnas1-0000NC-8N for pgsql-docs@arkaria.postgresql.org; Sat, 24 Sep 2016 00:31:09 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bnarz-0000N3-HF for pgsql-docs@postgresql.org; Sat, 24 Sep 2016 00:31:07 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bnarw-0002N9-Jh for pgsql-docs@postgresql.org; Sat, 24 Sep 2016 00:31:06 +0000 Received: from bruce by momjian.us with local (Exim 4.84_2) (envelope-from ) id 1bnarv-0001cZ-01; Fri, 23 Sep 2016 20:31:02 -0400 Date: Fri, 23 Sep 2016 20:31:02 -0400 From: Bruce Momjian To: PostgreSQL-documentation Cc: Nathan Wagner Subject: Fix for function ownership Message-ID: <20160924003102.GA20542@momjian.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="n8g4imXOkfNTN/H1" Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -5.0 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --n8g4imXOkfNTN/H1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Nathan Wagner told me that two places in the create function docs say permissions are controlled by the function creator, while permissions are really controlled by the function owner. The attached patch fixes this. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription + --n8g4imXOkfNTN/H1 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="owner.diff" diff --git a/doc/src/sgml/ref/create_function.sgml b/doc/src/sgml/ref/create_function.sgml new file mode 100644 index 8108a43..b9d8833 *** a/doc/src/sgml/ref/create_function.sgml --- b/doc/src/sgml/ref/create_function.sgml *************** CREATE [ OR REPLACE ] FUNCTION *** 401,407 **** is to be executed with the privileges of the user that calls it. That is the default. SECURITY DEFINER specifies that the function is to be executed with the ! privileges of the user that created it. --- 401,407 ---- is to be executed with the privileges of the user that calls it. That is the default. SECURITY DEFINER specifies that the function is to be executed with the ! privileges of the user that owns it. *************** SELECT * FROM dup(42); *** 747,753 **** Because a SECURITY DEFINER function is executed ! with the privileges of the user that created it, care is needed to ensure that the function cannot be misused. For security, should be set to exclude any schemas writable by untrusted users. This prevents --- 747,753 ---- Because a SECURITY DEFINER function is executed ! with the privileges of the user that owns it, care is needed to ensure that the function cannot be misused. For security, should be set to exclude any schemas writable by untrusted users. This prevents --n8g4imXOkfNTN/H1 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs --n8g4imXOkfNTN/H1--