Re: View permissions in 7.1

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: View permissions in 7.1
Дата
Msg-id 14093.988927982@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: View permissions in 7.1  (Lieven Van Acker <lieven@elisa.be>)
Список pgsql-general
Lieven Van Acker <lieven@elisa.be> writes:
> Well, in fact, -at this point - I don't need setuid, because the
> function current_adm() has to lookup the effective uid of the calling
> user. The point is I want to filter the records depending on the uid
> of the user calling the top-level view. So as I can understand, views
> that are called by other views run still within the same session -
> thus returning the effective uid, right?

The problem is that current_adm() fails for lack of read access on the
users table, when it's invoked on behalf of the unprivileged user.

I think that what you really want to be using for the lookup is
SESSION_USER not CURRENT_USER.  There's no difference at the moment,
but there will be once we have setuid functions ...

            regards, tom lane

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Metaphone function attachment
Следующее
От: Michelle Murrain
Дата:
Сообщение: Re: Ideal hardware configuration for pgsql