From 717fd10aa36287e1fd5f2d50ba6897c2362c0f7f Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Fri, 16 Apr 1999 14:04:42 +0000 Subject: ln bug fix --- sys/kern/vfs_lookup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index fce0bd94090..1acc9172103 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_lookup.c,v 1.16 1999/01/11 05:12:24 millert Exp $ */ +/* $OpenBSD: vfs_lookup.c,v 1.17 1999/04/16 14:04:41 deraadt Exp $ */ /* $NetBSD: vfs_lookup.c,v 1.17 1996/02/09 19:00:59 christos Exp $ */ /* @@ -182,7 +182,7 @@ namei(ndp) cnp->cn_flags |= HASBUF; return (0); } - if ((cnp->cn_flags & LOCKPARENT) && ndp->ni_pathlen == 1) + if ((cnp->cn_flags & LOCKPARENT) && (cnp->cn_flags & ISLASTCN)) VOP_UNLOCK(ndp->ni_dvp, 0, p); if (ndp->ni_loopcnt++ >= MAXSYMLINKS) { error = ELOOP; -- cgit v1.2.3