Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Jul 1999 18:37:13 +0000
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
Message-ID:  <378A35D9.F43A7E5A@pobox.com>
References:  <71323.931793488@axl.noc.iafrica.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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-hackers" in the body of the message




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