pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Fix for function ownership
4+ messages / 2 participants
[nested] [flat]

* Fix for function ownership
@ 2016-09-24 00:31 Bruce Momjian <bruce@momjian.us>
  2016-09-24 01:23 ` Re: Fix for function ownership Tom Lane <tgl@sss.pgh.pa.us>
  2017-03-21 02:33 ` Re: Fix for function ownership Bruce Momjian <bruce@momjian.us>
  0 siblings, 2 replies; 4+ messages in thread

From: Bruce Momjian @ 2016-09-24 00:31 UTC (permalink / raw)
  To: pgsql-docs; +Cc: Nathan Wagner <nw@hydaspes.if.org>

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  <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

Attachments:

owner.diff (text/x-diff, 1.6K) download 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
^ permalink raw reply [nested|flat] 4+ messages in thread

* Re: Fix for function ownership
  2016-09-24 00:31 Fix for function ownership Bruce Momjian <bruce@momjian.us>
@ 2016-09-24 01:23 ` Tom Lane <tgl@sss.pgh.pa.us>
  2016-09-24 01:28   ` Re: Fix for function ownership Bruce Momjian <bruce@momjian.us>
  1 sibling, 1 reply; 4+ messages in thread

From: Tom Lane @ 2016-09-24 01:23 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: pgsql-docs; Nathan Wagner <nw@hydaspes.if.org>

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

Looks like an improvement to me.  Are there any other places with
similar wording?

			regards, tom lane


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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Fix for function ownership
  2016-09-24 00:31 Fix for function ownership Bruce Momjian <bruce@momjian.us>
  2016-09-24 01:23 ` Re: Fix for function ownership Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-09-24 01:28   ` Bruce Momjian <bruce@momjian.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Bruce Momjian @ 2016-09-24 01:28 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-docs; Nathan Wagner <nw@hydaspes.if.org>

On Fri, Sep 23, 2016 at 09:23:25PM -0400, Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > 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.
> 
> Looks like an improvement to me.  Are there any other places with
> similar wording?

I couldn't find any others.  I looked for "user that created".

-- 
  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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Fix for function ownership
  2016-09-24 00:31 Fix for function ownership Bruce Momjian <bruce@momjian.us>
@ 2017-03-21 02:33 ` Bruce Momjian <bruce@momjian.us>
  1 sibling, 0 replies; 4+ messages in thread

From: Bruce Momjian @ 2017-03-21 02:33 UTC (permalink / raw)
  To: pgsql-docs; +Cc: Nathan Wagner <nw@hydaspes.if.org>

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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2017-03-21 02:33 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-09-24 00:31 Fix for function ownership Bruce Momjian <bruce@momjian.us>
2016-09-24 01:23 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-09-24 01:28   ` Bruce Momjian <bruce@momjian.us>
2017-03-21 02:33 ` Bruce Momjian <bruce@momjian.us>

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