Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory

Поиск
Список
Период
Сортировка
От Christoph Moench-Tegeder
Тема Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory
Дата
Msg-id Ydtrv7YnD+ac+eQV@elch.exwg.net
обсуждение исходный текст
Ответ на Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory