In secmodel_bsd44_securelevel_system_cb(), compare dev_t dev with
NODEV, not 0, since 0 is a legit value for a dev_t. Now I can 'mount /dev/wd0a /mnt' again.
This commit is contained in:
parent
d5978e20f4
commit
8a6588acaf
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: secmodel_bsd44_securelevel.c,v 1.2 2006/09/08 21:57:38 elad Exp $ */
|
||||
/* $NetBSD: secmodel_bsd44_securelevel.c,v 1.3 2006/09/13 02:35:26 dyoung Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2006 Elad Efrat <elad@NetBSD.org>
|
||||
* All rights reserved.
|
||||
|
@ -38,7 +38,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: secmodel_bsd44_securelevel.c,v 1.2 2006/09/08 21:57:38 elad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: secmodel_bsd44_securelevel.c,v 1.3 2006/09/13 02:35:26 dyoung Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_insecure.h"
|
||||
|
@ -174,7 +174,7 @@ secmodel_bsd44_securelevel_system_cb(kauth_cred_t cred, kauth_action_t action,
|
|||
struct vnode *vp = arg2;
|
||||
dev_t dev = (dev_t)(u_long)arg3;
|
||||
|
||||
if (vp == NULL || dev == 0)
|
||||
if (vp == NULL || dev == NODEV)
|
||||
break;
|
||||
|
||||
switch (vp->v_type) {
|
||||
|
|
Loading…
Reference in New Issue