tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: sh(1) and ksh(1) default PATH
On Mon, 15 Aug 2022, Hauke Fath wrote:
On Sun, 14 Aug 2022 09:04:21 +0000 (UTC), RVP wrote:
Linux has a pam_env.so which reads /etc/environment and
/etc/environment.d/* for this kind of thing. I was looking
for something like that on NetBSD a while back...
login.conf(5) can set PATH.
Yeah, I looked into that for someone a while ago, and that doesn't work in
all cases. For example:
1. xdm
The `setenv' capability doesn't work in xdm (the code just won't work
as it stands); and in any case, xdm prefers a different method for
setting PATH and env. (the `DisplayManager.*' resource settings).
2. su
The default PAM variant does honour `setenv', but, the non-PAM one
doesn't look like it does (it only does PATH).
3. sudo/doas/...
3rd-party programs don't seem to grok `setenv'
OTOH, all of these, if they use PAM, do seem to call pam_getenvlist()
and use properly the returned variables.
-RVP
Home |
Main Index |
Thread Index |
Old Index