Re: [v9.1] Add security hook on initialization of instance

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [v9.1] Add security hook on initialization of instance
Дата
Msg-id AANLkTinHhKXDrpso94GT6XC-48yZ5ws3xuFd5NLTR94_@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [v9.1] Add security hook on initialization of instance  (KaiGai Kohei <kaigai@ak.jp.nec.com>)
Ответы Re: [v9.1] Add security hook on initialization of instance  (KaiGai Kohei <kaigai@ak.jp.nec.com>)
Список pgsql-hackers
2010/6/14 KaiGai Kohei <kaigai@ak.jp.nec.com>:
> On the hook, I'd like to obtain security context of the client process
> which connected to the PostgreSQL instance. It is not available at the
> _PG_init() phase, because clients don't connect yet.

Can't you just call getpeercon() the first time you need the context
and cache it in a backend-local variable?  Then you don't need a hook
at all.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


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

Предыдущее
От: KaiGai Kohei
Дата:
Сообщение: Re: ExecutorCheckPerms() hook
Следующее
От: KaiGai Kohei
Дата:
Сообщение: Re: [v9.1] Add security hook on initialization of instance