Re: SECURITY DEFINER changes CURRENT_USER?

Поиск
Список
Период
Сортировка
От Matthew Horoschun
Тема Re: SECURITY DEFINER changes CURRENT_USER?
Дата
Msg-id 119F16EC-BA7A-11D7-9764-000393B3A702@canprint.com.au
обсуждение исходный текст
Ответ на SECURITY DEFINER changes CURRENT_USER?  (Chris Travers <chris@travelamericas.com>)
Список pgsql-sql
Hi Chris,

You want to use "session_user".

> I would expect this to change the password of the user currently 
> logged in but instead it changes MY password.  Evidently when a 
> function is called which is set to SECURITY DEFINER, it changes the 
> context of the current user.  The CURRENT_USER then returns the name 
> of the definer rather than the invoker of the function.
>
> So this being said-- are there any workarounds that don't allow anyone 
> to change anyone else's password?

Cheers



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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Return a set of values from postgres Function
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: changing an update via rules