Re: Where to stick function setuid - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Where to stick function setuid
Date
Msg-id 6716.969213130@sss.pgh.pa.us
Whole thread Raw
In response to Re: Where to stick function setuid  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Where were we on this? Yes/No/Maybe?
>> 
>>>> Instead, when fmgr is setting up to call a setuid function, have it
>>>> insert an extra level of function handler that does the
>>>> save/setup/restore of current UID.
>> 
>> I don't quite understand. Do you mean like a PL function handler? But then
>> this thing wouldn't work for external PL's unless we either have a setuid
>> version of each or have nested handlers.

Sorry, I forgot to reply.  Nested handlers were exactly what I was
advocating.  Or more accurately, *a* nested handler; you'd only need
one regardless of the target function's language.  I'm envisioning
that it'd have fn_extra pointing at a block that contains the UID to
be used for the call and the FmgrInfo for the underlying function.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: broken locale in 7.0.2 without multibyte support (FreeBSD 4.1-RELEASE) ?
Next
From: Tom Lane
Date:
Subject: Re: ascii to character conversion in postgres