summaryrefslogtreecommitdiff
path: root/sys/dev/sbus
diff options
context:
space:
mode:
authorelad <elad@NetBSD.org>2006-05-14 21:42:26 +0000
committerelad <elad@NetBSD.org>2006-05-14 21:42:26 +0000
commit2867b68bc3d7cdb1bb7b9f8367e4aa0b2fa765f4 (patch)
treea0add7b65b60ddf03960733156c82bfb90bc978d /sys/dev/sbus
parentfc9422c9d9d5eec5abd0d58ae5fa47aedf2198e3 (diff)
integrate kauth.
Diffstat (limited to 'sys/dev/sbus')
-rw-r--r--sys/dev/sbus/magma.c8
-rw-r--r--sys/dev/sbus/spif.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/sbus/magma.c b/sys/dev/sbus/magma.c
index de6347a602c..501c51db9e8 100644
--- a/sys/dev/sbus/magma.c
+++ b/sys/dev/sbus/magma.c
@@ -1,4 +1,4 @@
-/* $NetBSD: magma.c,v 1.32 2005/12/24 20:27:52 perry Exp $ */
+/* $NetBSD: magma.c,v 1.33 2006/05/14 21:47:00 elad Exp $ */
/*
* magma.c
*
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: magma.c,v 1.32 2005/12/24 20:27:52 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: magma.c,v 1.33 2006/05/14 21:47:00 elad Exp $");
#if 0
#define MAGMA_DEBUG
@@ -926,7 +926,7 @@ mttyopen(dev, flags, mode, l)
if (ISSET(tp->t_state, TS_ISOPEN) &&
ISSET(tp->t_state, TS_XCLUDE) &&
- suser(l->l_proc->p_ucred, &l->l_proc->p_acflag) != 0)
+ kauth_authorize_generic(l->l_proc->p_cred, KAUTH_GENERIC_ISSUSER, &l->l_proc->p_acflag) != 0)
return (EBUSY);
s = spltty();
@@ -1164,7 +1164,7 @@ mttyioctl(dev, cmd, data, flags, l)
break;
case TIOCSFLAGS:
- if( suser(l->l_proc->p_ucred, &l->l_proc->p_acflag) )
+ if (kauth_authorize_generic(l->l_proc->p_cred, KAUTH_GENERIC_ISSUSER, &l->l_proc->p_acflag) )
error = EPERM;
else
mp->mp_openflags = *((int *)data) &
diff --git a/sys/dev/sbus/spif.c b/sys/dev/sbus/spif.c
index e8d3509c68c..b776ae80dcb 100644
--- a/sys/dev/sbus/spif.c
+++ b/sys/dev/sbus/spif.c
@@ -1,4 +1,4 @@
-/* $NetBSD: spif.c,v 1.4 2005/12/11 12:23:44 christos Exp $ */
+/* $NetBSD: spif.c,v 1.5 2006/05/14 21:47:00 elad Exp $ */
/* $OpenBSD: spif.c,v 1.12 2003/10/03 16:44:51 miod Exp $ */
/*
@@ -41,7 +41,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spif.c,v 1.4 2005/12/11 12:23:44 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spif.c,v 1.5 2006/05/14 21:47:00 elad Exp $");
#include "spif.h"
#if NSPIF > 0
@@ -385,7 +385,7 @@ stty_open(dev, flags, mode, l)
CLR(tp->t_state, TS_CARR_ON);
}
else if (ISSET(tp->t_state, TS_XCLUDE) &&
- suser(l->l_proc->p_ucred, &l->l_proc->p_acflag) != 0) {
+ kauth_authorize_generic(l->l_proc->p_cred, KAUTH_GENERIC_ISSUSER, &l->l_proc->p_acflag) != 0) {
return (EBUSY);
} else {
s = spltty();
@@ -497,7 +497,7 @@ stty_ioctl(dev, cmd, data, flags, l)
*((int *)data) = sp->sp_openflags;
break;
case TIOCSFLAGS:
- if( suser(l->l_proc->p_ucred, &l->l_proc->p_acflag) )
+ if (kauth_authorize_generic(l->l_proc->p_cred, KAUTH_GENERIC_ISSUSER, &l->l_proc->p_acflag) )
error = EPERM;
else
sp->sp_openflags = *((int *)data) &