Re: Fixing insecure security definer functions - Mailing list pgsql-hackers

From Sergiy Vyshnevetskiy
Subject Re: Fixing insecure security definer functions
Date
Msg-id Pine.LNX.4.64.0708102115590.28860@uanet.vostok.net
Whole thread Raw
In response to Re: Fixing insecure security definer functions  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> 3. Add optional clauses to CREATE FUNCTION and ALTER FUNCTION to specify
> the propath value.  I suggest, but am not wedded to,
>     PATH 'foo, bar'
>     PATH NONE
> Since PATH NONE is the default, it's not really needed in CREATE
> FUNCTION, but it seems useful to allow it for ALTER FUNCTION.

I think NONE may be a bit misleading, as if path will be empty.
CURRENT sounds better for this.

Add    PATH SAVED
as shorthand to    PATH current_setting('search_path')
as well.

Default should be SAVED for SECURITY DEFINER functions.
A parameter to set the default for SECURITY INVOKER functions would be 
nice too.


pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: crypting prosrc in pg_proc
Next
From: Steve Atkins
Date:
Subject: Re: crypting prosrc in pg_proc