From owner-freebsd-current Sat Jun 23 10: 6:41 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 570FB37B405 for ; Sat, 23 Jun 2001 10:06:39 -0700 (PDT) (envelope-from dillon@earth.backplane.com) Received: (from dillon@localhost) by earth.backplane.com (8.11.3/8.11.2) id f5NH6a872811; Sat, 23 Jun 2001 10:06:36 -0700 (PDT) (envelope-from dillon) Date: Sat, 23 Jun 2001 10:06:36 -0700 (PDT) From: Matt Dillon Message-Id: <200106231706.f5NH6a872811@earth.backplane.com> To: Bruce Evans Cc: Bakul Shah , current@FreeBSD.ORG Subject: Re: Ok, try this patch. (was Re: symlink(2) [Was: Re: tcsh.cat]) References: 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 Ok, Bruce... the symlink patch has been sitting in my tree for a week now. I am going to let you decide whether I should commit it or not. If not, into the trash heap it goes. This is likely to be the only way the problem will be solved since creating an empty symlink via the 'ln -s' utility is perfect legal. So, in or out? -Matt Index: kern/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 --- kern/vfs_lookup.c 2001/05/20 12:11:57 1.38.2.2 +++ kern/vfs_lookup.c 2001/06/18 01:39:46 @@ -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); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message