Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Aug 2006 15:50:20 GMT
From:      "Michael MacInnis" <michaelmacinnis@rogers.com>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/101316: /bin/sh pwd bug after cd into restricted directory
Message-ID:  <200608181550.k7IFoKdx058934@freefall.freebsd.org>

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

From: "Michael MacInnis" <michaelmacinnis@rogers.com>
To: <bug-followup@FreeBSD.org>,
	<aragon@phat.za.net>
Cc:  
Subject: Re: bin/101316: /bin/sh pwd bug after cd into restricted directory
Date: Fri, 18 Aug 2006 11:42:20 -0400

 Adding a call to updatepwd(NULL) in cd.c seems to fix the problem:
 
 @@ -202,6 +202,7 @@
  
  	INTOFF;
  	if (updatepwd(badstat ? NULL : dest) < 0 || chdir(curdir) < 0) {
 +		updatepwd(NULL);
  		INTON;
  		return (-1);
  	}
 
 This may also address PR bin/64990.
 
 Michael MacInnis.



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