has_language_privilege returns incorrect answer for non-superuser

Поиск
Список
Период
Сортировка
От Joe Conway
Тема has_language_privilege returns incorrect answer for non-superuser
Дата
Msg-id 4FFB842C.6090804@joeconway.com
обсуждение исходный текст
Ответы Re: has_language_privilege returns incorrect answer for non-superuser  (Magnus Hagander <magnus@hagander.net>)
Re: has_language_privilege returns incorrect answer for non-superuser  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
I noticed today that has_language_privilege() returns incorrect answer
for non-superuser, e.g.:

8<---------------------------------------------------
select has_language_privilege('nobody',                             'plperlu',
'usage');has_language_privilege
------------------------t
(1 row)

test1=# \c - nobody
You are now connected to database "test1" as user "nobody".

create function f() returns text as $$ $$ language plperlu;
ERROR:  permission denied for language plperlu
8<---------------------------------------------------

I verified this behavior on head as well as 9.1 (didn't bother looking
any further back). Looks like the reason is that CreateFunction()
correctly checks lanpltrusted, whereas pg_language_aclmask() does not.

Seems like a bug to me -- opinions?

Joe

-- 
Joe Conway
credativ LLC: http://www.credativ.us
Linux, PostgreSQL, and general Open Source
Training, Service, Consulting, & 24x7 Support



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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Testing of various opclasses for ranges
Следующее
От: Bruce Momjian
Дата:
Сообщение: Use of rsync for data directory copying