Re: ALTER SYSTEM vs symlink

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: ALTER SYSTEM vs symlink
Дата
Msg-id CAHGQGwFEfcwtPdBFD54RRN7OSBsfhVFxP9P0j0vez5qmmsGZCQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: ALTER SYSTEM vs symlink  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Tue, Nov 3, 2015 at 6:08 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Mon, Nov 2, 2015 at 3:41 PM, Stephen Frost <sfrost@snowman.net> wrote:
>>> Two different methods of restricting ALTER SYSTEM have already been
>>> discussed on this thread: one using file permissions, and the other
>>> using ProcessUtility_hook.  I personally think that's good enough.
>>
>> The issue which I have with these suggestions is that one requires users
>> to install an as-yet-unwritten module and the other is to hack with
>> permissions in the data directory.  As we've all seen, people playing in
>> $PGDATA is generally a bad idea.
>
> Well, fair enough.  I think somebody could write that module in about
> an hour, though.  All you have to do is latch onto ProcessUtility_hook
> and throw an error if you've got yourself an AlterSystemStmt.

BTW, I wrote that module 9 month before for pleasure.
https://github.com/MasaoFujii/pg_disallow_utility

If we want to prevent superuser from modifying the configuration file,
not only ALTER SYSTEM but also COPY PROGRAM should be restricted.
Otherwise, superuser can execute arbitrary OS command via COPY PROGRAM
and easily modify any file.

Regards,

-- 
Fujii Masao



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

Предыдущее
От: Torsten Zuehlsdorff
Дата:
Сообщение: Re: September 2015 Commitfest
Следующее
От: YUriy Zhuravlev
Дата:
Сообщение: Re: Some questions about the array.