Re: ExecutorCheckPerms() hook

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: ExecutorCheckPerms() hook
Дата
Msg-id 20100525102849.GN21875@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: ExecutorCheckPerms() hook  (KaiGai Kohei <kaigai@ak.jp.nec.com>)
Список pgsql-hackers
KaiGai,

* KaiGai Kohei (kaigai@ak.jp.nec.com) wrote:
> OK, the attached patch reworks it according to the way.

I havn't looked at it yet, but the hook was added to ExecCheckRTPerms(),
not RTE.  This was for two main reasons- it seemed simpler to us and it
meant that any security module implemented would have access to
essentially everything we know the query is going to use all at once
(instead of on a per-range-table basis).  That could be particularly
useful if you wanted to, say, enforce a constraint that says "no two
tables of different labels shall ever be used in the same query at the
same time" (perhaps with some caveats on that, etc).

Could you change this patch to use ExecCheckRTPerms() instead?

> * ExecCheckRTEPerms() becomes to take 2nd argument the caller to suggest
>   behavior on access violation. The 'abort' argument is true, it raises
>   an error using aclcheck_error() or ereport(). Otherwise, it returns
>   false immediately without rest of checks.
>
> * DoCopy() and RI_Initial_Check() were reworked to call ExecCheckRTEPerms()
>   with locally built RangeTblEntry.

Does this change fix the issue you had in RI_Initial_Check()?
Thanks,
    Stephen

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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: Regression testing for psql
Следующее
От: Florian Pflug
Дата:
Сообщение: Re: ROLLBACK TO SAVEPOINT