Re: BUG #15120: use of getcwd(3)/chdir(2) during path resolution(exec.c)

Поиск
Список
Период
Сортировка
От Petar Bogdanovic
Тема Re: BUG #15120: use of getcwd(3)/chdir(2) during path resolution(exec.c)
Дата
Msg-id 20180317205544.GA3507@pintail.NGC068
обсуждение исходный текст
Ответ на Re: BUG #15120: use of getcwd(3)/chdir(2) during path resolution(exec.c)  (Christoph Berg <myon@debian.org>)
Список pgsql-bugs
On Sat, Mar 17, 2018 at 09:40:51PM +0100, Christoph Berg wrote:
> $ chmod 700 .
> $ sudo -u postgres psql
> could not change directory to "/home/cbe": Permission denied
> 
> I never observed any negative side effects of it, though. (Except for
> the obvious fact that "\i somethinginmyhome.sql" won't work.)


At least on NetBSD, shutting down the system with sudo while being in a
0700 directory will make the pgsql rc-script fail (because it relies on
pg_ctl), i.e. pull the plug on a running pgsql instance.

One could argue that the NetBSD /etc/rc script should, in general, chdir
before doing anything but relying on getcwd/chdir still seems suboptimal.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #15120: use of getcwd(3)/chdir(2) during path resolution (exec.c)
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #15116: pg_recvlogical always fails