Re: [BUG] SECURITY DEFINER on call handler makes daemon crash

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [BUG] SECURITY DEFINER on call handler makes daemon crash
Дата
Msg-id 1315.1269059839@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [BUG] SECURITY DEFINER on call handler makes daemon crash  (KaiGai Kohei <kaigai@kaigai.gr.jp>)
Ответы Re: [BUG] SECURITY DEFINER on call handler makes daemon crash  (KaiGai Kohei <kaigai@ak.jp.nec.com>)
Список pgsql-hackers
KaiGai Kohei <kaigai@kaigai.gr.jp> writes:
> Is it an expected behavior that PostgreSQL tries to execute foo() with
> privileges of the owner of language call handler because of its security
> definer property? This server crash is just a result.

A language call handler has no function properties of its own --- which
is why attaching SECURITY DEFINER to it is both useless and meaningless.
The appropriate function properties for any call are those of the user
function being called, which the handler is merely a support for.

You could argue that we should put call handlers into their own table
instead of pg_proc, since they aren't really user-callable functions;
that would prevent people from thinking that something like this is
sane.  However, they share just enough infrastructure with real
functions that it didn't seem worth doing it that way.

I see no value whatsoever in making the world safe for people to attach
SECURITY DEFINER to handlers.  It's an incorrect declaration, and
superusers need to know better than to declare C functions with
incorrect properties.
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: 9.0 release notes done
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Streaming replication status