Where to stick function setuid

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Where to stick function setuid
Дата
Msg-id Pine.LNX.4.21.0009091611120.2484-100000@localhost.localdomain
обсуждение исходный текст
Ответ на Re: Trigger functions don't obey "strict" setting?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Where to stick function setuid
Список pgsql-hackers
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@gmx.net       http://yi.org/peter-e/



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: "setuid" functions, a solution to the RI privilege problem
Следующее
От: Tom Samplonius
Дата:
Сообщение: Re: Scalability, Clustering