Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/common emul_find(): actually, the emulation root ...
details: https://anonhg.NetBSD.org/src/rev/c05deb715c30
branches: trunk
changeset: 503207:c05deb715c30
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Fri Feb 02 21:17:45 2001 +0000
description:
emul_find(): actually, the emulation root vnode dance has to be done for
CHECK_ALT_SYMLINK() same way as for CHECK_ALT_EXISTS()
This fixes lossage reported on current-users and kern/12019 by Ross Harvey.
diffstat:
sys/compat/common/compat_util.c | 15 +++++----------
1 files changed, 5 insertions(+), 10 deletions(-)
diffs (36 lines):
diff -r 590567b42139 -r c05deb715c30 sys/compat/common/compat_util.c
--- a/sys/compat/common/compat_util.c Fri Feb 02 21:08:42 2001 +0000
+++ b/sys/compat/common/compat_util.c Fri Feb 02 21:17:45 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_util.c,v 1.19 2001/01/22 19:50:56 jdolecek Exp $ */
+/* $NetBSD: compat_util.c,v 1.20 2001/02/02 21:17:45 jdolecek Exp $ */
/*-
* Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -144,7 +144,10 @@
*cp = '/';
break;
case CHECK_ALT_FL_EXISTS:
- NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, buf, p);
+ case CHECK_ALT_FL_SYMLINK:
+ NDINIT(&nd, LOOKUP,
+ (sflag == CHECK_ALT_FL_SYMLINK) ? NOFOLLOW : FOLLOW,
+ UIO_SYSSPACE, buf, p);
if ((error = namei(&nd)) != 0)
goto bad;
@@ -176,14 +179,6 @@
}
break;
-
- case CHECK_ALT_FL_SYMLINK:
- NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, buf, p);
-
- if ((error = namei(&nd)) != 0)
- goto bad;
-
- break;
}
vrele(nd.ni_vp);
Home |
Main Index |
Thread Index |
Old Index