Date: Fri, 29 May 2009 10:02:44 +0000 (UTC) From: Dag-Erling Smorgrav <des@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/kern vfs_lookup.c src/sys/sys namei.h Message-ID: <200905291007.n4TA7iDr012165@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
des 2009-05-29 10:02:44 UTC
FreeBSD src repository
Modified files:
sys/kern vfs_lookup.c
sys/sys namei.h
Log:
SVN rev 193028 on 2009-05-29 10:02:44Z by des
Let vfs_lookup() return ENOTDIR if the path has a trailing slash and
the last component is a symlink to something that isn't a directory.
We introduce a new namei flag, TRAILINGSLASH, which is set by lookup()
if the last component is followed by a slash. The trailing slash is
then stripped, as before. If the final component is a symlink,
lookup() will return to namei(), which will expand the symlink and
call lookup() with the new path. When all symlinks have been
resolved, lookup() checks if the TRAILINGSLASH flag is set, and if it
is, and the vnode it ended up with is not a directory, it returns
ENOTDIR.
PR: kern/21768
Submitted by: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
MFC after: 3 weeks
Revision Changes Path
1.126 +12 -8 src/sys/kern/vfs_lookup.c
1.52 +2 -1 src/sys/sys/namei.h
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905291007.n4TA7iDr012165>
