Re: [hackers] [ubase] Set TERM to linux if needed for su and login || sin
On Tue, Jun 03, 2014 at 07:44:49PM +0200, Roberto E. Vargas Caballero wrote:
> > but -p is specifically used to tell login whether to preserve or discard
> > the parent environment. What happens if -p is not set? I decided to put
> > TERM=linux because ubase is linux specific.
>
> I think -p is only suitable for values that can be obtained from /etc/passwd,
> for example HOME or SHELL, but in the case of TERM, you only can take the
> correct value from the environment of the parent. I don't know what says
> POSIX about this issue, but maybe should be interesting take a look on it.
From OpenBSD login manpage:
-p By default, login discards any previous environment. The -p
option disables this behavior.
I don't think POSIX covers this stuff.
I'll do this:
-p will preserve *all* of the parent's environment and unconditionally set
the values obtained from entries in /etc/passwd (i.e. no fiddling with TERM).
not setting -p will discard *all* of the parent's environment and unconditionally
set the values obtained from entries in /etc/passwd. (i.e. no fiddling
with TERM).
Does it seem reasonable?
Received on Tue Jun 03 2014 - 19:51:19 CEST
This archive was generated by hypermail 2.3.0
: Tue Jun 03 2014 - 20:00:09 CEST