Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: incorrect behavior of zsh under su on SUNOS-4.1.3
- X-seq: zsh-workers 3226
- From: Andrej Borsenkow <borsenkow.msk@xxxxxx>
- To: Juergen Peter bluen <bluen@xxxxxxxxxxxx>
- Subject: Re: incorrect behavior of zsh under su on SUNOS-4.1.3
- Date: Tue, 10 Jun 1997 09:59:56 +0400 (MSD)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <199706090840.KAA02522@xxxxxxxxxxxx>
- Reply-to: borsenkow.msk@xxxxxx
On Mon, 9 Jun 1997, Juergen Peter bluen wrote:
> Hello Folks,
>
> Some problems have been encountered here when using ZSH-3.1.2 on a
> SunOS-4.1.3 system.
>
> It looks very much like that if invoked from other programs in a way
> like
>
> exec("/path/to/zsh", argv[0], other_args)
>
> what many programs do to spawn a shell or a subshell,
> zsh_name (the variable in the sourcecode) is set to argv[0] of the
> spawning program.
>
> This looks quite ok for me (at least for most programs), but when the
> shell-spawning program is /bin/su (or /usr/5bin/su) of SunOS, this
> prevents the shell from reading its initialisation files (/etc/zshenv
> and so on), which isn´t correct behaviour according to the
> documentation of su(1). Other programs calling exec*(2) in a similar
> way lead to the same problem (I checked elm-2.4 for example).
>
I just tried it with my /bin/su, and I don't quite understand, what do you
mean. If called as 'su user' zsh is called with
execve ("/usr/bin/zsh", "zsh", ...)
and if called as 'su - user' zsh is called with
execve ("/usr/bin/zsh", "-zsh", ...)
The problem in the first case is, that environment is not changed, that
is, HOME still points to original user's home, and zsh tries to source
startup files from wrong directory. If they don't exist (e.g., on my
system root doesn't have ~/.z* files at all), it appears, as if startup
files weren't sourced.
could you provide example of exact exec's in your case?
greetings
-------------------------------------------------------------------------
Andrej Borsenkow Fax: +7 (095) 252 01 05
SNI ITS Moscow Tel: +7 (095) 252 13 88
NERV: borsenkow.msk E-Mail: borsenkow.msk@xxxxxx
-------------------------------------------------------------------------
Messages sorted by:
Reverse Date,
Date,
Thread,
Author