Why ACL_EXECUTE is checked on FindConversion()?
От | KaiGai Kohei |
---|---|
Тема | Why ACL_EXECUTE is checked on FindConversion()? |
Дата | |
Msg-id | 4A8BB095.6090501@ak.jp.nec.com обсуждение исходный текст |
Ответы |
Re: Why ACL_EXECUTE is checked on FindConversion()?
|
Список | pgsql-hackers |
When FindConversion() is called, it also checks current user's ACL_EXECUTE privilege on the conproc of the fetched conversion. Why this check is applied on FindConversion(), instead of FindDefaultConversion()? The FindConversion() returns the OID of conversion for the given name and namespace, or InvalidOid if not found or user does not have ACL_EXECUTE privilege. It is called from DropConversionsCommand(), RenameConversion(), AlterConversionOwner() and CommentConversion(), to obtain OID of the target conversion to be modified by DDL statement. On the other hand, FindDefaultConversionProc() does not apply such kind of permission checks, though it is called from SetClientEncoding(). The conversion procedure is implicitly called when user communicates to the server backend, so it seems to me quite natural if FindDefaultConversionProc() checks user's ACL_EXECUTE privilege. But it is checked when we lookup the target conversion on DDL statement. It's unclear for me what is the intension of this check. Thanks, -- OSS Platform Development Division, NEC KaiGai Kohei <kaigai@ak.jp.nec.com>
В списке pgsql-hackers по дате отправления: