- include kauth.h for kauth_authorize_generic.
- whitespace.
This commit is contained in:
parent
28e8a16825
commit
52da04717a
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: biconsdev.c,v 1.14 2006/05/14 21:42:27 elad Exp $ */
|
||||
/* $NetBSD: biconsdev.c,v 1.15 2006/05/15 12:39:05 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999-2001
|
||||
@ -67,7 +67,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: biconsdev.c,v 1.14 2006/05/14 21:42:27 elad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: biconsdev.c,v 1.15 2006/05/15 12:39:05 yamt Exp $");
|
||||
|
||||
#include "biconsdev.h"
|
||||
#include <sys/param.h>
|
||||
@ -77,6 +77,7 @@ __KERNEL_RCSID(0, "$NetBSD: biconsdev.c,v 1.14 2006/05/14 21:42:27 elad Exp $");
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/tty.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/kauth.h>
|
||||
|
||||
#include <dev/cons.h>
|
||||
#include <dev/hpc/bicons.h>
|
||||
@ -182,7 +183,7 @@ biconsdevopen(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
(void)(*tp->t_param)(tp, &tp->t_termios);
|
||||
ttsetwater(tp);
|
||||
} else if (tp->t_state & TS_XCLUDE &&
|
||||
kauth_authorize_generic(l->l_proc->p_cred, KAUTH_GENERIC_ISSUSER,
|
||||
kauth_authorize_generic(l->l_proc->p_cred, KAUTH_GENERIC_ISSUSER,
|
||||
&l->l_proc->p_acflag) != 0)
|
||||
return (EBUSY);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: hpf1275a_tty.c,v 1.8 2006/05/14 21:42:27 elad Exp $ */
|
||||
/* $NetBSD: hpf1275a_tty.c,v 1.9 2006/05/15 12:39:05 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004 Valeriy E. Ushakov
|
||||
@ -28,7 +28,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: hpf1275a_tty.c,v 1.8 2006/05/14 21:42:27 elad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: hpf1275a_tty.c,v 1.9 2006/05/15 12:39:05 yamt Exp $");
|
||||
|
||||
#include "opt_wsdisplay_compat.h"
|
||||
|
||||
@ -40,6 +40,7 @@ __KERNEL_RCSID(0, "$NetBSD: hpf1275a_tty.c,v 1.8 2006/05/14 21:42:27 elad Exp $"
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/proc.h> /* XXX: for curproc */
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kauth.h>
|
||||
#ifdef GPROF
|
||||
#include <sys/gmon.h>
|
||||
#endif
|
||||
@ -307,7 +308,8 @@ hpf1275a_open(dev_t dev, struct tty *tp)
|
||||
struct hpf1275a_softc *sc;
|
||||
int error, s;
|
||||
|
||||
if ((error = kauth_authorize_generic(p->p_cred, KAUTH_GENERIC_ISSUSER, &p->p_acflag)) != 0)
|
||||
if ((error = kauth_authorize_generic(p->p_cred, KAUTH_GENERIC_ISSUSER,
|
||||
&p->p_acflag)) != 0)
|
||||
return (error);
|
||||
|
||||
s = spltty();
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ofcons.c,v 1.26 2006/05/14 21:42:28 elad Exp $ */
|
||||
/* $NetBSD: ofcons.c,v 1.27 2006/05/15 12:40:30 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ofcons.c,v 1.26 2006/05/14 21:42:28 elad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ofcons.c,v 1.27 2006/05/15 12:40:30 yamt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
@ -41,6 +41,7 @@ __KERNEL_RCSID(0, "$NetBSD: ofcons.c,v 1.26 2006/05/14 21:42:28 elad Exp $");
|
||||
#include <sys/systm.h>
|
||||
#include <sys/callout.h>
|
||||
#include <sys/tty.h>
|
||||
#include <sys/kauth.h>
|
||||
|
||||
#include <dev/cons.h>
|
||||
|
||||
@ -146,7 +147,8 @@ ofcons_open(dev, flag, mode, l)
|
||||
ofcons_param(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))
|
||||
kauth_authorize_generic(l->l_proc->p_cred, KAUTH_GENERIC_ISSUSER,
|
||||
&l->l_proc->p_acflag))
|
||||
return EBUSY;
|
||||
tp->t_state |= TS_CARR_ON;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user