Re: [PATCH] pgpassfile connection option

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [PATCH] pgpassfile connection option
Дата
Msg-id CA+TgmoZ_wDEZN7xF8aZHKSCUX_dzEaBXT5ywZy2XgBGenUc5Lg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] pgpassfile connection option  (Oskari Saarenmaa <os@ohmu.fi>)
Список pgsql-hackers
On Tue, Oct 11, 2016 at 5:06 PM, Oskari Saarenmaa <os@ohmu.fi> wrote:
>   $ PASSWORD=xyz psql 'password=$PASSWORD dbname=foo'
>
> This does have the hazard of making it very easy to accidentally use double
> quotes instead of single quotes and have the shell expand the variable
> making it visible in process listing though.

It has the hazard that environment variables are visible in the
process listing anyway on many platforms.  On Linux, try "ps auxeww";
on MacOS X, try "ps -efEww".  At a quick glance, it seems that on both
of those platforms you have to either be root or be the same user that
owns the process, but I'm not sure that every platform will have it
locked down that tightly and even that might be more exposure than you
really want.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Add PGDLLEXPORT to PG_FUNCTION_INFO_V1
Следующее
От: Jonathan Jacobson
Дата:
Сообщение: Multiple psql history files