From wh@MX.BA-Stuttgart.De  Mon Dec 30 15:52:03 1996
Received: from terminator.informatik.ba-stuttgart.de (terminator.informatik.ba-stuttgart.de [141.31.1.21])
          by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id PAA29067
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 30 Dec 1996 15:52:01 -0800 (PST)
Received: from helbig.informatik.ba-stuttgart.de (helbig.informatik.ba-stuttgart.de [141.31.166.22]) by terminator.informatik.ba-stuttgart.de (8.7.6/8.7.3) with ESMTP id XAA27612 for <FreeBSD-gnats-submit@freebsd.org>; Mon, 30 Dec 1996 23:51:26 +0100
Received: (from wh@localhost)
          by helbig.informatik.ba-stuttgart.de (8.8.4/8.8.4)
	  id AAA00671; Tue, 31 Dec 1996 00:51:57 +0100 (MET)
Message-Id: <199612302351.AAA00671@helbig.informatik.ba-stuttgart.de>
Date: Tue, 31 Dec 1996 00:51:57 +0100 (MET)
From: Helbig@MX.BA-Stuttgart.De
Reply-To: Helbig@MX.BA-Stuttgart.De
To: FreeBSD-gnats-submit@freebsd.org
Subject: strange output of sh's pwd on symlinked directories
X-Send-Pr-Version: 3.2

>Number:         2331
>Category:       bin
>Synopsis:       strange output of sh's pwd on symlinked directories
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    steve
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 30 16:00:01 PST 1996
>Closed-Date:    Sat Jan 4 11:14:42 PST 1997
>Last-Modified:  Sat Jan  4 11:15:31 PST 1997
>Originator:     Wolfgang Helbig
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
>Environment:

	

>Description:
The shell builtin prints wrong names if you cd .. up crossing a
symlinked directory.

>How-To-Repeat:
Assuming standard configuration, i. e.  /home is a symbolic link to /usr/home:
$ cd /home
$ pwd
/home
$ cd ..
$ pwd 
/
^
$ /bin/pwd
/usr
^^^^
If you do an ls here, you get the contents of /usr and not of / as is shown
by pwd.
The first time I did this, I thought I've overridden / by /usr.

>Fix:
	
when in doubt, use /bin/pwd.  
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->steve 
Responsible-Changed-By: steve 
Responsible-Changed-When: Mon Dec 30 16:29:58 PST 1996 
Responsible-Changed-Why:  
I got this one.  After all I am probably the one that 
broke it. :( 
State-Changed-From-To: open->closed 
State-Changed-By: steve 
State-Changed-When: Sat Jan 4 11:14:42 PST 1997 
State-Changed-Why:  
Fixed in revision 1.12 of cd.c. 
>Unformatted:
