Module Name: src
Committed By: elad
Date: Thu May 7 20:32:23 UTC 2009
Modified Files:
src/sys/ufs/lfs: lfs_vfsops.c
Log Message:
Use genfs_can_mount().
To generate a diff of this commit:
cvs rdiff -u -r1.272 -r1.273 src/sys/ufs/lfs/lfs_vfsops.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/ufs/lfs/lfs_vfsops.c
diff -u src/sys/ufs/lfs/lfs_vfsops.c:1.272 src/sys/ufs/lfs/lfs_vfsops.c:1.273
--- src/sys/ufs/lfs/lfs_vfsops.c:1.272 Sat Apr 4 10:33:59 2009
+++ src/sys/ufs/lfs/lfs_vfsops.c Thu May 7 20:32:23 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_vfsops.c,v 1.272 2009/04/04 10:33:59 ad Exp $ */
+/* $NetBSD: lfs_vfsops.c,v 1.273 2009/05/07 20:32:23 elad Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007, 2007
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.272 2009/04/04 10:33:59 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.273 2009/05/07 20:32:23 elad Exp $");
#if defined(_KERNEL_OPT)
#include "opt_lfs.h"
@@ -619,15 +619,14 @@
* If mount by non-root, then verify that user has necessary
* permissions on the device.
*/
- if (error == 0 && kauth_authorize_generic(l->l_cred,
- KAUTH_GENERIC_ISSUSER, NULL) != 0) {
+ if (error == 0) {
accessmode = VREAD;
if (update ?
(mp->mnt_iflag & IMNT_WANTRDWR) != 0 :
(mp->mnt_flag & MNT_RDONLY) == 0)
accessmode |= VWRITE;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
- error = VOP_ACCESS(devvp, accessmode, l->l_cred);
+ error = genfs_can_mount(devvp, accessmode, l->l_cred);
VOP_UNLOCK(devvp, 0);
}