Prevent pg_basebackup running as root

Поиск
Список
Период
Сортировка
От Ian Barwick
Тема Prevent pg_basebackup running as root
Дата
Msg-id CABvVfJVqOdD2neLkYdygdOHvbWz_5K_iWiqY+psMfA=FeAa3qQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Prevent pg_basebackup running as root
Список pgsql-hackers
Hi

We encountered an unfortunate case of $SUBJECT the other day where it
would have been preferable to catch the error before rather than after pg_basebackup ran.

I can't think of any practical reason why pg_basebackup would ever need to
be run as root; we disallow that for initdb, pg_ctl and pg_upgrade, so it
seems reasonable to do the same for pg_basebackup. Trivial patch attached,
which as with the other cases will allow only the --help/--version options
to be executed as root, otherwise nothing else.

The patch doesn't update the pg_basebackup documentation page; we don't
mention it in the pg_ctl and pg_upgrade pages either and it doesn't seem
particularly important to mention it explicitly.

I'll add this to the March CF.


Regards

Ian Barwick


--
  Ian Barwick                   https://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services
Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: BufFileRead() error signalling
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Prevent pg_basebackup running as root