From c0a0fb85e2d6abfdef7db883befc8271ea0abaf8 Mon Sep 17 00:00:00 2001 From: Thomas Moestl Date: Wed, 6 Jun 2001 23:34:38 +0000 Subject: [PATCH] Fix an instance of NDINIT in the extattrctl syscall: LOCKLEAF was or'ed to the operation parameter, not to the flags as it should be. Reviewed by: rwatson --- sys/kern/vfs_extattr.c | 2 +- sys/kern/vfs_syscalls.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index 75d3eb7522ee..850914ce02a7 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -3707,7 +3707,7 @@ extattrctl(p, uap) */ filename_vp = NULL; if (SCARG(uap, filename) != NULL) { - NDINIT(&nd, LOOKUP | LOCKLEAF, FOLLOW, UIO_USERSPACE, + NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, SCARG(uap, filename), p); if ((error = namei(&nd)) != 0) return (error); diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 75d3eb7522ee..850914ce02a7 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -3707,7 +3707,7 @@ extattrctl(p, uap) */ filename_vp = NULL; if (SCARG(uap, filename) != NULL) { - NDINIT(&nd, LOOKUP | LOCKLEAF, FOLLOW, UIO_USERSPACE, + NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, SCARG(uap, filename), p); if ((error = namei(&nd)) != 0) return (error);