Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jul 1999 03:10:02 -0700 (PDT)
From:      Niall Smart <niall@pobox.com>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/12578: `` subshell taints PWD
Message-ID:  <199907131010.DAA44084@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/12578; it has been noted by GNATS.

From: Niall Smart <niall@pobox.com>
To: Sheldon Hearn <sheldonh@uunet.co.za>
Cc: hackers@freebsd.org, bugs@freebsd.org
Subject: Re: bin/12578: `` subshell taints PWD
Date: Mon, 12 Jul 1999 18:37:13 +0000

 Sheldon Hearn wrote:
 
 > cd /tmp
 > echo .`cd /`.
 > pwd
 > 
 > Any takers?
 
 The patch appended seems to fix this, I'd like someone familiar
 with sh to review it though, since this may be symptomatic of
 a general problem with command substitution.
 
 > PS: And no, this is not an invitation to chat about the default shell
 >     for the base system. :-)
 
 You're hinting it should be /bin/sh for root, right?
 
 Regards,
 
 Niall
 
 
 *** eval.c~     Mon May 10 16:10:16 1999
 --- eval.c      Mon Jul 12 18:27:44 1999
 ***************
 *** 710,715 ****
 --- 710,716 ----
             && ((flags & EV_EXIT) == 0 || Tflag))
          || ((flags & EV_BACKCMD) != 0
             && (cmdentry.cmdtype != CMDBUILTIN
 +                || cmdentry.u.index == CDCMD
                  || cmdentry.u.index == DOTCMD
                  || cmdentry.u.index == EVALCMD))) {
                 jp = makejob(cmd, 1);
 
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907131010.DAA44084>