Re: BUG #14872: libpq requires a home directory

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: dcwatson(at)gmail(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14872: libpq requires a home directory
Date: 2017-10-25 22:35:17
Message-ID: CAB7nPqTUiDc9+D7_k9i3AsWo5-+pjSE6scnu6_L14ecObwdXdA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Oct 25, 2017 at 2:40 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Sigh. We keep breaking that use-case... which is unsurprising because
> nobody tests it.

:(
And really that's quite a common configuration to have a user
dedicated to Postgres that has no actual home folder.

> According to previous go-rounds, eg commits 5b4067798 and bd58d9d88,
> we should just silently do nothing if we can't get the home directory.

Yes, this should be skipped. fe-secure-openssl.c is actually doing the
correct thing.

> Poking around, it looks like parseServiceInfo's search for
> ~/.pg_service.conf has the same disease, but that code's been like that
> since 2010 --- I wonder why it's not causing you problems? Are you maybe
> setting PGSERVICEFILE to prevent that from failing?

Yeah... I was halfway into hacking a patch for that but got drowned
into other things until I saw your message. Are you working on a
patch?
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2017-10-25 22:40:20 Re: BUG #14872: libpq requires a home directory
Previous Message Tom Lane 2017-10-25 22:10:36 Re: BUG #14872: libpq requires a home directory