Re: pg_regress: lookup shellprog in $PATH

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_regress: lookup shellprog in $PATH
Дата
Msg-id 1321298.1661393664@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pg_regress: lookup shellprog in $PATH  (Gurjeet Singh <gurjeet@singh.im>)
Ответы Re: pg_regress: lookup shellprog in $PATH  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Gurjeet Singh <gurjeet@singh.im> writes:
> Please see attached the one-letter patch that fixes this problem. I have
> chosen to replace the execl() call with execlp(), which performs a lookup
> in $PATH, and finds the 'sh' to use for running the postmaster.

I can't say that I think this is a great fix.  It creates security
questions that did not exist before, even without the point you
make about Windows considering execlp deprecated.

Given the lack of complaints about how pg_ctl works, I'd be inclined
to follow its lead and just hard-wire "/bin/sh", removing the whole
SHELLPROG/shellprog dance.  I have not heard of anyone using the
theoretical ability to compile pg_regress with some other value.

> The Nixpkgs and NixOS distro includes all the supported versions of
> Postgres, so one would assume they would've also encountered, and solved,
> this problem. But they didn't. My best guess as to why, is, I believe they
> never bothered to run `make check` on their built binaries.

TBH, it's not clear to me that that project is competent enough to
be something we should take into account.  But in any case, I'd
rather see us using fewer ways to do this, not more.

            regards, tom lane



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

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: shadow variables - pg15 edition
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_regress: lookup shellprog in $PATH