Re: Is my home $HOME or is it getpwent()->pw_dir ?

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Chapman Flack <chap(at)anastigmatix(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Is my home $HOME or is it getpwent()->pw_dir ?
Date: 2021-12-20 14:15:12
Message-ID: 1fb92e0d-a40e-cd8c-4989-85ac08025dc5@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 18.12.21 21:57, Chapman Flack wrote:
> I sometimes do some testing as nobody, on a distro where
> getpwent(nobody)->pw_dir is a directory that nobody can't write.
> So I end up setting $HOME to a directory that, um, is writable.
>
> When I start psql, strace shows $HOME being honored when looking
> for .terminfo and .inputrc, and getpwent()->pw_dir being used
> to look for .pgpass, .psqlrc, and .psql_history, which of course
> aren't there.
>
> I'm sure the .terminfo and .inputrc lookups are being done by library code.
> In my experience, it seems traditionally unixy to let $HOME take precedence.

See this patch: https://commitfest.postgresql.org/36/3362/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2021-12-20 14:24:40 Re: speed up verifying UTF-8
Previous Message Peter Eisentraut 2021-12-20 14:05:15 Re: Getting rid of regression test input/ and output/ files