Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory - Mailing list pgsql-hackers

From Christoph Moench-Tegeder
Subject Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory
Date
Msg-id Ydtrv7YnD+ac+eQV@elch.exwg.net
Whole thread Raw
In response to Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory
List pgsql-hackers
## Tom Lane (tgl@sss.pgh.pa.us):

> Isn't that a flat out violation of POSIX 8.3 Other Environment Variables?
> 
>     HOME
>         The system shall initialize this variable at the time of login to
>         be a pathname of the user's home directory. See <pwd.h>.
> 
> To claim it's not, you have to claim these programs aren't logged in,
> in which case where did they get any privileges from?

After poking around across some Linuxes, it looks like people silently
agreed that "services" are not logged-in users: among the daemons,
having HOME set (as observed in /proc/*/environ) is an exception,
not the norm. I'm not sure if that's a "new" thing with systemd,
I don't have a linux with pure SysV-init available (but I guess those
are rare animals anyways).

Regards,
Christoph

-- 
Spare Space



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory