Some filesystem nits

Jeroen Ruigrok/asmodai asmodai at in-nomine.org
Mon Jul 4 10:53:14 PDT 2005


On DragonFly 1.3.2:

[19:36] [asmodai at purgatory] (512) {0} $ mkdir -p a/b
(/home/asmodai/test)
[19:36] [asmodai at purgatory] (513) {0} $ cd a/b 
(/home/asmodai/test/a/b)
[19:36] [asmodai at purgatory] (513) {0} $ rm -rf ~/test/a
(/home/asmodai/test/a/b)
[19:36] [asmodai at purgatory] (514) {0} $ cd ..
cd: socket is not connected: ..

On FreeBSD 4.11:

[19:36] [asmodai at nexus] (530) {0} $ mkdir -p a/b
(/home/asmodai)
[19:36] [asmodai at nexus] (531) {0} $ cd a/b
(/home/asmodai/a/b)
[19:36] [asmodai at nexus] (532) {0} $ rm -rf ~/a
(/home/asmodai/a/b)
[19:36] [asmodai at nexus] (533) {0} $ cd ..
cd: no such file or directory: ..

FreeBSD 5.4:

[2:39] [asmodai at sparc64] (515) {0} $ mkdir -p a/b
(/tmp)
[2:39] [asmodai at sparc64] (516) {0} $ cd a/b
(/tmp/a/b)
[2:39] [asmodai at sparc64] (517) {0} $ rm -rf /tmp/a
(/tmp/a/b)
[2:39] [asmodai at sparc64] (518) {0} $ cd ..
cd: no such file or directory: ..

NetBSD 2.0.1:

> mkdir -p a/b
> cd a/b
> rm -rf /tmp/a
> cd ..
. .: No such file or directory.

OpenBSD 3.7:

[2:42] [asmodai at sparc64] (503) {0} $ mkdir -p a/b
(/tmp)
[2:42] [asmodai at sparc64] (504) {0} $ cd a/b
(/tmp/a/b)
[2:42] [asmodai at sparc64] (505) {0} $ rm -rf /tmp/a
(/tmp/a/b)
[2:43] [asmodai at sparc64] (506) {0} $ cd ..
cd: no such file or directory: ..

AIX 4.3:

> cd /tmp
> mkdir -p a/b
> cd a/b
> rm -rf /tmp/a
rm: 0653-610 Cannot remove current directory /tmp/a/b.

Solaris 9:

sparc64% mkdir -p a/b
sparc64% cd a/b
sparc64% rm -rf /tmp/a
rm: Cannot remove any directory in the path of the current working directory
/tmp/a/b

Solaris 10:

> mkdir -p a/b
> cd a/b
> rm -rf /tmp/a
rm: Cannot remove any directory in the path of the current working directory
/tmp/a/b

Our error message is dumb to say the least. :P
And question is whether we want to allow a user to remove a directory which
is in the path of the cwd.

-- 
Jeroen Ruigrok van der Werven <asmodai(at)wxs.nl> / asmodai / kita no mono
Free Tibet! http://www.savetibet.org/ | http://ashemedai.deviantart.com/
http://www.tendra.org/   | http://www.in-nomine.org/
We have met the enemy and they are ours...





More information about the Bugs mailing list