From 8a6588acafb00e4a93b9603244db904cdecf6f7b Mon Sep 17 00:00:00 2001 From: dyoung Date: Wed, 13 Sep 2006 02:35:26 +0000 Subject: [PATCH] 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. --- sys/secmodel/bsd44/secmodel_bsd44_securelevel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/secmodel/bsd44/secmodel_bsd44_securelevel.c b/sys/secmodel/bsd44/secmodel_bsd44_securelevel.c index f45c231c4cde..9958c438501d 100644 --- a/sys/secmodel/bsd44/secmodel_bsd44_securelevel.c +++ b/sys/secmodel/bsd44/secmodel_bsd44_securelevel.c @@ -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 * All rights reserved. @@ -38,7 +38,7 @@ */ #include -__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) {