sh bug

From: a.s. mitrohin <swp_at_uni-altai.ru>
Date: Mon, 22 Mar 2004 20:46:00 +0600
helo.

builtin cd unable change work directory buf curdir grow anyway.

example

# mkdir -p /tmp/1/2
# chmod 770 /tmp/1/2
# cd /tmp/1
# touch 1.txt
# pwd
/tmp/1
# ls -l
total 1
drwxrwx---  2 root  wheel  512 22 อมา 11:22 2
-rw-r--r--  1 root  wheel    0 22 อมา 11:22 1.txt
# su -m cyrus
$ pwd
/tmp/1
$ cd 2
cd: can't cd to 2
$ pwd
/tmp/1/2
$ ls -l
total 1
drwxrwx---  2 root  wheel  512 22 อมา 11:22 2
-rw-r--r--  1 root  wheel    0 22 อมา 11:22 1.txt
$ cd 2
cd: can't cd to 2
$ pwd
/tmp/1/2/2
$ ls -l
total 1
drwxrwx---  2 root  wheel  512 22 อมา 11:22 2
-rw-r--r--  1 root  wheel    0 22 อมา 11:22 1.txt
$ cd 2
cd: can't cd to 2
$ pwd
/tmp/1/2/2/2
$ ls -l
total 1
drwxrwx---  2 root  wheel  512 22 อมา 11:22 2
-rw-r--r--  1 root  wheel    0 22 อมา 11:22 1.txt
$ cd .
$ pwd
/tmp/1
$ ^D

/swp
Received on Mon Mar 22 2004 - 05:46:33 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:48 UTC