Re: [PATCH] pgpassfile connection option - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [PATCH] pgpassfile connection option
Date
Msg-id CA+TgmoZ_wDEZN7xF8aZHKSCUX_dzEaBXT5ywZy2XgBGenUc5Lg@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] pgpassfile connection option  (Oskari Saarenmaa <os@ohmu.fi>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Add PGDLLEXPORT to PG_FUNCTION_INFO_V1
Next
From: Jonathan Jacobson
Date:
Subject: Multiple psql history files