misc/120571: pwd reports false path even when change to directory fails

Robinson Sathaseevan robinson at sathas.com
Tue Feb 12 22:10:01 UTC 2008


>Number:         120571
>Category:       misc
>Synopsis:       pwd reports false path even when change to directory fails
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 12 22:10:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Robinson Sathaseevan
>Release:        FreeBSD 6.3
>Organization:
None
>Environment:
FreeBSD quad.phub.net.cable.rogers.com 6.3-RELEASE FreeBSD 6.3-RELEASE #0: Wed Jan 16 04:45:45 UTC 2008     root at dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP  i386
>Description:
If a directory has permissions drwx------ and I try to change into it without being the owner, then the cd command fails. But pwd thinks I successfully changed into that directory and incorrectly reports as such.
>How-To-Repeat:
$ whoami
roby
$ pwd
/usr/local/etc
$ ls -ld s*
drwx------  2 root  wheel    512 Feb 12 11:30 samba
-rw-r--r--  1 root  wheel   3312 Feb 12 11:34 screenrc
-r--r--r--  1 root  wheel  10313 Feb 12 11:30 smb.conf
-r--r--r--  1 root  wheel  10313 Feb 12 11:30 smb.conf.sample
-r--r-----  1 root  wheel   1148 Feb 12 09:17 sudoers
-r--r--r--  1 root  wheel   1150 Nov 30 20:20 sudoers.default
$ cd samba
cd: can't cd to samba
$ pwd
/usr/local/etc/samba
$ ls -ld s*
drwx------  2 root  wheel    512 Feb 12 11:30 samba
-rw-r--r--  1 root  wheel   3312 Feb 12 11:34 screenrc
-rw-r--r--  1 root  wheel  10313 Feb 12 11:30 smb.conf
-r--r--r--  1 root  wheel  10313 Feb 12 11:30 smb.conf.sample
-r--r-----  1 root  wheel   1148 Feb 12 09:17 sudoers
-r--r--r--  1 root  wheel   1150 Nov 30 20:20 sudoers.default
$ cd ..
$ pwd
/usr/local/etc
$

>Fix:
n/a

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list