Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/nfs fix access permission check which got broken by some...



details:   https://anonhg.NetBSD.org/src/rev/cefb035bc97d
branches:  trunk
changeset: 779040:cefb035bc97d
user:      drochner <drochner%NetBSD.org@localhost>
date:      Fri Apr 27 18:12:01 2012 +0000

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

diffstat:

 sys/nfs/nfs_vnops.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 04299a3967dd -r cefb035bc97d sys/nfs/nfs_vnops.c
--- a/sys/nfs/nfs_vnops.c       Fri Apr 27 15:45:37 2012 +0000
+++ b/sys/nfs/nfs_vnops.c       Fri Apr 27 18:12:01 2012 +0000
@@ -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 @@
                }
        }
 
-       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));
 }
 
 /*



Home | Main Index | Thread Index | Old Index