zsh-workers
 help / color / mirror / code / Atom feed
From: Andrej Borsenkow <borsenkow.msk@sni.de>
To: Juergen Peter bluen <bluen@ee.uni-sb.de>
Cc: zsh-workers@math.gatech.edu
Subject: Re: incorrect behavior of zsh under su on SUNOS-4.1.3
Date: Tue, 10 Jun 1997 09:59:56 +0400 (MSD)	[thread overview]
Message-ID: <Pine.SV4.3.95.970610094136.977A-100000@itsrm1> (raw)
In-Reply-To: <199706090840.KAA02522@ee.uni-sb.de>

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@sni.de
-------------------------------------------------------------------------



      parent reply	other threads:[~1997-06-10  6:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-09  8:40 Juergen Peter bluen
1997-06-09 16:09 ` Zefram
1997-06-10  5:59 ` Andrej Borsenkow [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.SV4.3.95.970610094136.977A-100000@itsrm1 \
    --to=borsenkow.msk@sni.de \
    --cc=bluen@ee.uni-sb.de \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).