bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] symlink lookups in ext2fs


From: Moritz Schulte
Subject: Re: [PATCH] symlink lookups in ext2fs
Date: Mon, 03 Dec 2001 21:41:01 +0100
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1

Roland McGrath <roland@gnu.org> writes:

> A patch without a bug report is almost always ignored.

Sorry, I thought it was obvious, since it's a little change.

Here the bug, now in verbose mode:

moritz@hurd:~$ touch foo
moritz@hurd:~$ ln -s foo foo2
moritz@hurd:~$ ln -s $PWD/foo foo3
moritz@hurd:~$ ls -l foo*
-rw-r--r--    1 moritz   moritz          0 Dec  3 23:56 foo
lrwxr-xr-x    1 moritz   moritz          3 Dec  3 23:56 foo2 -> foo
lrwxr-xr-x    1 moritz   moritz         16 Dec  3 23:56 foo3 -> /home/moritz/foo
moritz@hurd:~$ ls foo2/
ls: foo2/: Not a directory
moritz@hurd:~$ ls foo3/
foo3/
moritz@hurd:~$ 

The point is that the lookup on 'foo3/' succeeds, which is wrong,
IMHO.  ENOTDIR should be returned, just like on the lookup of 'foo2/'.

The reason is that diskfs_S_dir_lookup() didn't append a trailing
slash to the retryname, if the lookup had a trailing slash appended.

                moritz
-- 
moritz@duesseldorf.ccc.de - http://duesseldorf.ccc.de/~moritz/
GPG fingerprint = 3A14 3923 15BE FD57 FC06  B501 0841 2D7B 6F98 4199



reply via email to

[Prev in Thread] Current Thread [Next in Thread]