Re: Extension security improvement: Add support for extensions with an owned schema

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Extension security improvement: Add support for extensions with an owned schema
Дата
Msg-id 139657.1718819744@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Extension security improvement: Add support for extensions with an owned schema  (Jelte Fennema-Nio <me@jeltef.nl>)
Ответы Re: Extension security improvement: Add support for extensions with an owned schema
Список pgsql-hackers
Jelte Fennema-Nio <me@jeltef.nl> writes:
> On Wed, 19 Jun 2024 at 17:28, Robert Haas <robertmhaas@gmail.com> wrote:
>> I have a feeling that this might be pretty annoying to implement, and
>> if that is true, then never mind.

> Based on a quick look it's not trivial, but also not super bad.
> Basically it seems like in src/backend/catalog/namespace.c, every time
> we loop over activeSearchPath and CurrentExtensionObject is set, then
> we should skip any item that's not stored in pg_catalog, unless
> there's a DEPENDENCY_EXTENSION pg_depend entry for the item (and that
> pg_depend entry references the extension or the requires list).

We could change the lookup rules that apply during execution of
an extension script, but we already restrict search_path at that
time so I'm not sure how much further this'd move the goalposts.

The *real* problem IMO is that if you create a PL function or
(old-style) SQL function within an extension, execution of that
function is not similarly protected.

            regards, tom lane



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

Предыдущее
От: Jelte Fennema-Nio
Дата:
Сообщение: Re: Extension security improvement: Add support for extensions with an owned schema
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Maybe don't process multi xmax in FreezeMultiXactId() if it is already marked as invalid?