From nobody@FreeBSD.org  Fri Jun 22 16:21:14 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id D711C16A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 22 Jun 2007 16:21:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id CB47D13C469
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 22 Jun 2007 16:21:14 +0000 (UTC)
	(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 l5MGLETL024532
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 22 Jun 2007 16:21:14 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l5MGLE9M024531;
	Fri, 22 Jun 2007 16:21:14 GMT
	(envelope-from nobody)
Message-Id: <200706221621.l5MGLE9M024531@www.freebsd.org>
Date: Fri, 22 Jun 2007 16:21:14 GMT
From: Jam <bumborumbo@hotmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: The builtin pwd in sh has odd behavior
X-Send-Pr-Version: www-3.0

>Number:         113951
>Category:       bin
>Synopsis:       The builtin pwd in sh(1) has odd behavior
>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 Jun 22 16:30:03 GMT 2007
>Closed-Date:    Sat Jul 28 07:54:42 GMT 2007
>Last-Modified:  Sat Jul 28 07:54:42 GMT 2007
>Originator:     Jam
>Release:        FreeBSD 6.2-STABLE
>Organization:
Bam
>Environment:
FreeBSD server.xxx.no-ip.com 6.2-STABLE FreeBSD 6.2-STABLE #1: Mon Jun 11 03:25:39 EDT 2007     root@server.xxx.no-ip.com:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
the builtin pwd of sh has odd behavior when trying to chdir to an
unreadable and unexecutable directory.
>How-To-Repeat:
Assuming you have a limited user account named 'limiteduser'

1. Make a directory while logged in to root named
  '/usr/home/limiteduser/offlimit' for example
2. Do 'chmod go=- /usr/home/limiteduser/offlimit'
3. Login from the limited account which uses 'sh' as default shell
4. Do 'cd offlimit'
5. Now check 'pwd' (this will probably call sh's built in pwd)... pwd
   will wrongfully show that you have successfully chdir'ed.
6. To make this problem look worse, try to 'cd offlimit' again.
7. Your 'pwd' will no doubt look like /usr/home/limiteduser/offlimit/offlimit
8. Keep doing step 6 and pwd will grow and grow and grow ... until it hits
   a resource limit or something
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-i386->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Jul 27 11:03:17 UTC 2007 
Responsible-Changed-Why:  
reclassify. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113951 
State-Changed-From-To: open->closed 
State-Changed-By: stefanf 
State-Changed-When: Sat Jul 28 07:54:03 UTC 2007 
State-Changed-Why:  
Duplicate of bin/64990.  Thanks anyway. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113951 
>Unformatted:
