From owner-freebsd-current Fri Aug 31 11:55:16 2001 Delivered-To: freebsd-current@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id 0CA9637B405; Fri, 31 Aug 2001 11:55:11 -0700 (PDT) Received: (from dillon@localhost) by earth.backplane.com (8.11.6/8.11.2) id f7VItAD66848; Fri, 31 Aug 2001 11:55:10 -0700 (PDT) (envelope-from dillon) Date: Fri, 31 Aug 2001 11:55:10 -0700 (PDT) From: Matt Dillon Message-Id: <200108311855.f7VItAD66848@earth.backplane.com> To: Jordan Hubbard Cc: "Brian F. Feldman" , Bruce Evans , "Brian F. Feldman" , "Steve O'Hara-Smith" , David Wolfskill , current@FreeBSD.ORG Subject: MFC request (was Re: symlink(2) [Was: Re: tcsh.cat]) References: <200108311836.f7VIaog15767@green.bikeshed.org> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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