From nobody@FreeBSD.org Fri Aug 18 12:42:40 2006 Return-Path: Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E7C416A4E1 for ; Fri, 18 Aug 2006 12:42:40 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F7A643D45 for ; Fri, 18 Aug 2006 12:42:40 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k7ICgdHQ003586 for ; Fri, 18 Aug 2006 12:42:39 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k7ICgdcG003585; Fri, 18 Aug 2006 12:42:39 GMT (envelope-from nobody) Message-Id: <200608181242.k7ICgdcG003585@www.freebsd.org> Date: Fri, 18 Aug 2006 12:42:39 GMT From: Michael MacInnis To: freebsd-gnats-submit@FreeBSD.org Subject: /bin/sh pwd bug after cd into restricted directory X-Send-Pr-Version: www-2.3 >Number: 102227 >Category: bin >Synopsis: Re: bin/101316: /bin/sh pwd bug after cd into restricted directory >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Aug 18 12:50:15 GMT 2006 >Closed-Date: Fri Aug 18 17:34:47 GMT 2006 >Last-Modified: Sun Sep 3 13:40:19 GMT 2006 >Originator: Michael MacInnis >Release: 5.3-RELEASE >Organization: >Environment: >Description: >How-To-Repeat: >Fix: 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); } >Release-Note: >Audit-Trail: State-Changed-From-To: open->closed State-Changed-By: linimon State-Changed-When: Fri Aug 18 17:34:29 UTC 2006 State-Changed-Why: Misfiled followup to bin/101316; content migrated. http://www.freebsd.org/cgi/query-pr.cgi?pr=102227 From: Gleb Smirnoff To: Michael MacInnis Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: bin/102227: /bin/sh pwd bug after cd into restricted directory Date: Sun, 3 Sep 2006 17:32:16 +0400 Michael, On Fri, Aug 18, 2006 at 12:42:39PM +0000, Michael MacInnis wrote: M> >How-To-Repeat: M> M> >Fix: please submit the How-To-Repeat recipe for the PR. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE >Unformatted: