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

From Jeff Davis
Subject Re: Fixing insecure security definer functions
Date
Msg-id 1171479562.10824.137.camel@dogma.v10.wvs
Whole thread Raw
In response to Re: Fixing insecure security definer functions  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, 2007-02-13 at 20:01 -0500, Tom Lane wrote:
> I would suggest that the search path be added as an explicit parameter
> to CREATE FUNCTION, with a default of the current setting.  The main
> reason for this is that it's going to be a real PITA for pg_dump if we
> don't allow an explicit specification.
> 
> It might also be worth allowing "PATH NULL" or some such locution to
> specify the current behavior, for those who really want it.  (In
> particular, most C functions would want this to avoid useless overhead
> for calls to things that aren't affected by search path.)
> 

It might also be useful to allow something such as PATH CURRENT to
attach the current schema as the search path for all calls of that
function. 

This would be useful because then SQL scripts for installing 3rd party
modules could install nicely into any schema by merely setting
search_path before running the script.

For instance, PostGIS doesn't support installing into a schema other
than "public" because they want to have a static SQL install script
rather than generate one based on your desired search path.

Regards,Jeff Davis



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: HOT WIP Patch - version 1
Next
From: Bruce Momjian
Date:
Subject: Re: Plan for compressed varlena headers