Re: Where to stick function setuid

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Where to stick function setuid
Date: 2000-09-17 13:11:17
Message-ID: Pine.LNX.4.21.0009171510420.576-100000@peter
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Where were we on this? Yes/No/Maybe?

Peter Eisentraut writes:

> Tom Lane writes:
>
> > > Btw., FunctionCallInvoke() would look to be the most prominent place to
> > > hook in the "setuid" feature. For that purpose I'd make the macro an
> > > inline function instead.
> >
> > Ugh. The performance cost would be excessive.
>
> In the path of a "normal" function call is only one extra `if (bool)'
> statement. There are certainly more "excessive" performance problems than
> that, no?
>
> > 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.

--
Peter Eisentraut peter_e(at)gmx(dot)net http://yi.org/peter-e/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-09-17 17:48:37 Re: broken locale in 7.0.2 without multibyte support (FreeBSD 4.1-RELEASE) ?
Previous Message Peter Eisentraut 2000-09-17 13:05:00 Re: broken locale in 7.0.2 without multibyte support (FreeBSD 4.1-RELEASE) ?