- include kauth.h for kauth_authorize_generic.
- wrap a long line.
This commit is contained in:
parent
c1c911e17b
commit
66d08528ca
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dhu.c,v 1.43 2006/05/14 21:45:00 elad Exp $ */
|
||||
/* $NetBSD: dhu.c,v 1.44 2006/05/15 20:44:04 yamt Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2003, Hugh Graham.
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -68,7 +68,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: dhu.c,v 1.43 2006/05/14 21:45:00 elad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dhu.c,v 1.44 2006/05/15 20:44:04 yamt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -82,6 +82,7 @@ __KERNEL_RCSID(0, "$NetBSD: dhu.c,v 1.43 2006/05/14 21:45:00 elad Exp $");
|
|||
#include <sys/kernel.h>
|
||||
#include <sys/syslog.h>
|
||||
#include <sys/device.h>
|
||||
#include <sys/kauth.h>
|
||||
|
||||
#include <machine/bus.h>
|
||||
#include <machine/scb.h>
|
||||
|
@ -467,7 +468,8 @@ dhuopen(dev, flag, mode, l)
|
|||
(void) dhuparam(tp, &tp->t_termios);
|
||||
ttsetwater(tp);
|
||||
} else if ((tp->t_state & TS_XCLUDE) &&
|
||||
kauth_authorize_generic(l->l_proc->p_cred, KAUTH_GENERIC_ISSUSER, &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);
|
||||
/* Use DMBIS and *not* DMSET or else we clobber incoming bits */
|
||||
if (dhumctl(sc, line, DML_DTR|DML_RTS, DMBIS) & DML_DCD)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dl.c,v 1.33 2006/05/14 21:45:00 elad Exp $ */
|
||||
/* $NetBSD: dl.c,v 1.34 2006/05/15 20:44:04 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -111,7 +111,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: dl.c,v 1.33 2006/05/14 21:45:00 elad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dl.c,v 1.34 2006/05/15 20:44:04 yamt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -125,6 +125,7 @@ __KERNEL_RCSID(0, "$NetBSD: dl.c,v 1.33 2006/05/14 21:45:00 elad Exp $");
|
|||
#include <sys/kernel.h>
|
||||
#include <sys/syslog.h>
|
||||
#include <sys/device.h>
|
||||
#include <sys/kauth.h>
|
||||
|
||||
#include <machine/bus.h>
|
||||
|
||||
|
@ -356,7 +357,8 @@ dlopen(dev_t dev, int flag, int mode, struct lwp *l)
|
|||
ttsetwater(tp);
|
||||
|
||||
} else if ((tp->t_state & TS_XCLUDE) &&
|
||||
kauth_authorize_generic(p->p_cred, KAUTH_GENERIC_ISSUSER, &p->p_acflag) != 0)
|
||||
kauth_authorize_generic(p->p_cred, KAUTH_GENERIC_ISSUSER,
|
||||
&p->p_acflag) != 0)
|
||||
return EBUSY;
|
||||
|
||||
return ((*tp->t_linesw->l_open)(dev, tp));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: xd.c,v 1.61 2006/05/14 21:47:00 elad Exp $ */
|
||||
/* $NetBSD: xd.c,v 1.62 2006/05/15 20:40:55 yamt Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
|
@ -51,7 +51,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: xd.c,v 1.61 2006/05/14 21:47:00 elad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: xd.c,v 1.62 2006/05/15 20:40:55 yamt Exp $");
|
||||
|
||||
#undef XDC_DEBUG /* full debug */
|
||||
#define XDC_DIAG /* extra sanity checks */
|
||||
|
@ -76,6 +76,7 @@ __KERNEL_RCSID(0, "$NetBSD: xd.c,v 1.61 2006/05/14 21:47:00 elad Exp $");
|
|||
#include <sys/syslog.h>
|
||||
#include <sys/dkbad.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/kauth.h>
|
||||
|
||||
#include <machine/bus.h>
|
||||
#include <machine/intr.h>
|
||||
|
@ -1120,8 +1121,8 @@ xdioctl(dev, command, addr, flag, l)
|
|||
|
||||
case DIOSXDCMD:
|
||||
xio = (struct xd_iocmd *) addr;
|
||||
if ((error = kauth_authorize_generic(l->l_proc->p_cred, KAUTH_GENERIC_ISSUSER,
|
||||
&l->l_proc->p_acflag)) != 0)
|
||||
if ((error = kauth_authorize_generic(l->l_proc->p_cred,
|
||||
KAUTH_GENERIC_ISSUSER, &l->l_proc->p_acflag)) != 0)
|
||||
return (error);
|
||||
return (xdc_ioctlcmd(xd, dev, xio));
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: xy.c,v 1.64 2006/05/14 21:47:00 elad Exp $ */
|
||||
/* $NetBSD: xy.c,v 1.65 2006/05/15 20:40:55 yamt Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
|
@ -51,7 +51,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.64 2006/05/14 21:47:00 elad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.65 2006/05/15 20:40:55 yamt Exp $");
|
||||
|
||||
#undef XYC_DEBUG /* full debug */
|
||||
#undef XYC_DIAG /* extra sanity checks */
|
||||
|
@ -76,6 +76,7 @@ __KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.64 2006/05/14 21:47:00 elad Exp $");
|
|||
#include <sys/syslog.h>
|
||||
#include <sys/dkbad.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/kauth.h>
|
||||
|
||||
#include <machine/bus.h>
|
||||
#include <machine/intr.h>
|
||||
|
@ -1033,8 +1034,7 @@ xyioctl(dev, command, addr, flag, l)
|
|||
case DIOSXDCMD:
|
||||
xio = (struct xd_iocmd *) addr;
|
||||
if ((error = kauth_authorize_generic(l->l_proc->p_cred,
|
||||
KAUTH_GENERIC_ISSUSER,
|
||||
&l->l_proc->p_acflag)) != 0)
|
||||
KAUTH_GENERIC_ISSUSER, &l->l_proc->p_acflag)) != 0)
|
||||
return (error);
|
||||
return (xyc_ioctlcmd(xy, dev, xio));
|
||||
|
||||
|
|
Loading…
Reference in New Issue