diff options
| author | elad <elad@NetBSD.org> | 2006-05-14 21:55:09 +0000 |
|---|---|---|
| committer | elad <elad@NetBSD.org> | 2006-05-14 21:55:09 +0000 |
| commit | 8ccb6c9341bcfed2a50a9bc07595d10ff53e454b (patch) | |
| tree | c8e690482c0cd0c86f4d193866f46345e2f557e7 /sys/arch/atari/dev | |
| parent | 2867b68bc3d7cdb1bb7b9f8367e4aa0b2fa765f4 (diff) | |
integrate kauth.
Diffstat (limited to 'sys/arch/atari/dev')
| -rw-r--r-- | sys/arch/atari/dev/ite.c | 7 | ||||
| -rw-r--r-- | sys/arch/atari/dev/ser.c | 9 | ||||
| -rw-r--r-- | sys/arch/atari/dev/zs.c | 9 |
3 files changed, 14 insertions, 11 deletions
diff --git a/sys/arch/atari/dev/ite.c b/sys/arch/atari/dev/ite.c index 3eddb1d4014..0c3db94ebc9 100644 --- a/sys/arch/atari/dev/ite.c +++ b/sys/arch/atari/dev/ite.c @@ -1,4 +1,4 @@ -/* $NetBSD: ite.c,v 1.50 2006/03/26 04:44:08 thorpej Exp $ */ +/* $NetBSD: ite.c,v 1.51 2006/05/14 21:55:10 elad Exp $ */ /* * Copyright (c) 1990 The Regents of the University of California. @@ -81,7 +81,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.50 2006/03/26 04:44:08 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.51 2006/05/14 21:55:10 elad Exp $"); #include "opt_ddb.h" @@ -98,6 +98,7 @@ __KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.50 2006/03/26 04:44:08 thorpej Exp $"); #include <sys/callout.h> #include <sys/proc.h> #include <dev/cons.h> +#include <sys/kauth.h> #include <machine/cpu.h> @@ -442,7 +443,7 @@ iteopen(dev, mode, devtype, l) else tp = ip->tp; if ((tp->t_state & (TS_ISOPEN | TS_XCLUDE)) == (TS_ISOPEN | 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); if ((ip->flags & ITE_ACTIVE) == 0) { ite_on(dev, 0); diff --git a/sys/arch/atari/dev/ser.c b/sys/arch/atari/dev/ser.c index a49d70c9bdf..02f69c933bb 100644 --- a/sys/arch/atari/dev/ser.c +++ b/sys/arch/atari/dev/ser.c @@ -1,4 +1,4 @@ -/* $NetBSD: ser.c,v 1.28 2006/03/06 18:42:58 he Exp $ */ +/* $NetBSD: ser.c,v 1.29 2006/05/14 21:55:10 elad Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -100,7 +100,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ser.c,v 1.28 2006/03/06 18:42:58 he Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ser.c,v 1.29 2006/05/14 21:55:10 elad Exp $"); #include "opt_ddb.h" #include "opt_mbtype.h" @@ -120,6 +120,7 @@ __KERNEL_RCSID(0, "$NetBSD: ser.c,v 1.28 2006/03/06 18:42:58 he Exp $"); #include <sys/syslog.h> #include <sys/types.h> #include <sys/device.h> +#include <sys/kauth.h> #include <m68k/asm_single.h> @@ -392,7 +393,7 @@ seropen(dev, flag, 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(); @@ -610,7 +611,7 @@ serioctl(dev, cmd, data, flag, l) break; case TIOCSFLAGS: - error = suser(l->l_proc->p_ucred, &l->l_proc->p_acflag); + error = kauth_authorize_generic(l->l_proc->p_cred, KAUTH_GENERIC_ISSUSER, &l->l_proc->p_acflag); if (error) return (error); sc->sc_swflags = *(int *)data; diff --git a/sys/arch/atari/dev/zs.c b/sys/arch/atari/dev/zs.c index 56638750743..9b22f930573 100644 --- a/sys/arch/atari/dev/zs.c +++ b/sys/arch/atari/dev/zs.c @@ -1,4 +1,4 @@ -/* $NetBSD: zs.c,v 1.46 2006/03/08 23:46:23 lukem Exp $ */ +/* $NetBSD: zs.c,v 1.47 2006/05/14 21:55:10 elad Exp $ */ /* * Copyright (c) 1992, 1993 @@ -82,7 +82,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.46 2006/03/08 23:46:23 lukem Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.47 2006/05/14 21:55:10 elad Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -96,6 +96,7 @@ __KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.46 2006/03/08 23:46:23 lukem Exp $"); #include <sys/time.h> #include <sys/kernel.h> #include <sys/syslog.h> +#include <sys/kauth.h> #include <machine/cpu.h> #include <machine/iomap.h> @@ -402,7 +403,7 @@ struct lwp *l; if ((tp->t_state & TS_ISOPEN) && (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(); @@ -907,7 +908,7 @@ struct lwp *l; case TIOCSFLAGS: { int userbits = 0; - error = suser(l->l_proc->p_ucred, &l->l_proc->p_acflag); + error = kauth_authorize_generic(l->l_proc->p_cred, KAUTH_GENERIC_ISSUSER, &l->l_proc->p_acflag); if(error != 0) return (EPERM); |
