Module Name:    src
Committed By:   drochner
Date:           Fri Apr 27 18:12:01 UTC 2012

Modified Files:
        src/sys/nfs: nfs_vnops.c

Log Message:
fix access permission check which got broken by some kauth rework
in March, affected mostly systems with NFS root fs


To generate a diff of this commit:
cvs rdiff -u -r1.293 -r1.294 src/sys/nfs/nfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/nfs/nfs_vnops.c
diff -u src/sys/nfs/nfs_vnops.c:1.293 src/sys/nfs/nfs_vnops.c:1.294
--- src/sys/nfs/nfs_vnops.c:1.293	Mon Nov 28 08:05:06 2011
+++ src/sys/nfs/nfs_vnops.c	Fri Apr 27 18:12:01 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_vnops.c,v 1.293 2011/11/28 08:05:06 tls Exp $	*/
+/*	$NetBSD: nfs_vnops.c,v 1.294 2012/04/27 18:12:01 drochner Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.293 2011/11/28 08:05:06 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.294 2012/04/27 18:12:01 drochner Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_nfs.h"
@@ -3373,8 +3373,9 @@ nfsspec_access(void *v)
 		}
 	}
 
-	return (genfs_can_access(va.va_type, va.va_mode,
-	    va.va_uid, va.va_gid, ap->a_mode, ap->a_cred));
+	return kauth_authorize_vnode(ap->a_cred, kauth_access_action(ap->a_mode,
+	    va.va_type, va.va_mode), vp, NULL, genfs_can_access(va.va_type,
+	    va.va_mode, va.va_uid, va.va_gid, ap->a_mode, ap->a_cred));
 }
 
 /*

Reply via email to