pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: PostgreSQL-documentation <pgsql-docs@postgresql.org>
Cc: Nathan Wagner <nw@hydaspes.if.org>
Subject: Re: Fix for function ownership
Date: Mon, 20 Mar 2017 22:33:40 -0400
Message-ID: <20170321023339.GC2045@momjian.us> (raw)
In-Reply-To: <20160924003102.GA20542@momjian.us>
References: <20160924003102.GA20542@momjian.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-docs>

On Fri, Sep 23, 2016 at 08:31:02PM -0400, Bruce Momjian wrote:
> 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.

Applied.

---------------------------------------------------------------------------


>  
> -- 
>   Bruce Momjian  <bruce@momjian.us>        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 +

> 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.  <literal>SECURITY DEFINER</literal>
>         specifies that the function is to be executed with the
> !       privileges of the user that created it.
>        </para>
>   
>        <para>
> --- 401,407 ----
>         is to be executed with the privileges of the user that calls it.
>         That is the default.  <literal>SECURITY DEFINER</literal>
>         specifies that the function is to be executed with the
> !       privileges of the user that owns it.
>        </para>
>   
>        <para>
> *************** SELECT * FROM dup(42);
> *** 747,753 ****
>   
>      <para>
>       Because a <literal>SECURITY DEFINER</literal> 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,
>       <xref linkend="guc-search-path"> should be set to exclude any schemas
>       writable by untrusted users.  This prevents
> --- 747,753 ----
>   
>      <para>
>       Because a <literal>SECURITY DEFINER</literal> 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,
>       <xref linkend="guc-search-path"> should be set to exclude any schemas
>       writable by untrusted users.  This prevents

> 
> -- 
> Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-docs


-- 
  Bruce Momjian  <bruce@momjian.us>        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 +


-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs



view thread (4+ messages)

Message-ID: <20170321023339.GC2045@momjian.us>
Permalink:  ../20170321023339.GC2045@momjian.us/
Also on:    postgresql.org/message-id/20170321023339.GC2045@momjian.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: bruce@momjian.us, nw@hydaspes.if.org
  Subject: Re: Fix for function ownership
  In-Reply-To: <20170321023339.GC2045@momjian.us>

* 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