Date: Fri, 31 Aug 2001 11:55:10 -0700 (PDT) From: Matt Dillon <dillon@earth.backplane.com> To: Jordan Hubbard <jkh@FreeBSD.ORG> Cc: "Brian F. Feldman" <green@FreeBSD.ORG>, Bruce Evans <bde@zeta.org.au>, "Brian F. Feldman" <green@FreeBSD.ORG>, "Steve O'Hara-Smith" <steveo@eircom.net>, David Wolfskill <david@catwhisker.org>, current@FreeBSD.ORG Subject: MFC request (was Re: symlink(2) [Was: Re: tcsh.cat]) Message-ID: <200108311855.f7VItAD66848@earth.backplane.com> References: <200108311836.f7VIaog15767@green.bikeshed.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This argument is just rehashing something that came up in June. Man
you people have short memories!
I comitted a fix to -current two months ago. It's still in my -stable
tree... if Jordan gives the O.K., I will MFC it to -stable.
-Matt
Index: vfs_lookup.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/vfs_lookup.c,v
retrieving revision 1.38.2.2
diff -u -r1.38.2.2 vfs_lookup.c
--- vfs_lookup.c 2001/05/20 12:11:57 1.38.2.2
+++ vfs_lookup.c 2001/08/31 18:53:22
@@ -200,6 +200,12 @@
break;
}
linklen = MAXPATHLEN - auio.uio_resid;
+ if (linklen == 0) {
+ if (ndp->ni_pathlen > 1)
+ zfree(namei_zone, cp);
+ error = ENOENT;
+ break;
+ }
if (linklen + ndp->ni_pathlen >= MAXPATHLEN) {
if (ndp->ni_pathlen > 1)
zfree(namei_zone, cp);
:..
:> > > $ cp foo bar
:> > > cp: foo is a directory (not copied)
:> > >
:> > > foo is certainly not a directory. The bug seems to be in fts.
:> >
:> > No, "foo" certainly _is_ a directory. It is precisely the same thing as
:> > ".".
:>
:> No, the empty pathname has been invalid and not an alias for "." since at
:> least the first version of POSIX.
:
:I didn't read the rest of the thread til later ;) The fact remains that
:FreeBSD interprets it as such in namei(), and is it not an undefined
:behavior according to POSIX?
:
:--
: Brian Fundakowski Feldman \ FreeBSD: The Power to Serve! /
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108311855.f7VItAD66848>
