diff options
| author | kleink <kleink@NetBSD.org> | 2005-09-06 21:40:37 +0000 |
|---|---|---|
| committer | kleink <kleink@NetBSD.org> | 2005-09-06 21:40:37 +0000 |
| commit | aece7a90fd0f2feeb714e83a20e24f2206a1a45b (patch) | |
| tree | 041b2a528dba9b81ece12e303295c1d444de74eb /sys/arch/atari/dev | |
| parent | 6fa3ab87b7547e893d57f42c9ca81ba61bdb00fe (diff) | |
Change the driver open function's conditional for overriding exclusive tty
use from checking the proc's uid to suser(9), and account for the use of
privileges. Noted by David Holland in PR kern/31126.
Diffstat (limited to 'sys/arch/atari/dev')
| -rw-r--r-- | sys/arch/atari/dev/ite.c | 6 | ||||
| -rw-r--r-- | sys/arch/atari/dev/ser.c | 6 | ||||
| -rw-r--r-- | sys/arch/atari/dev/zs.c | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/sys/arch/atari/dev/ite.c b/sys/arch/atari/dev/ite.c index 345b30261db..23d8eccce54 100644 --- a/sys/arch/atari/dev/ite.c +++ b/sys/arch/atari/dev/ite.c @@ -1,4 +1,4 @@ -/* $NetBSD: ite.c,v 1.46 2005/06/04 14:42:36 he Exp $ */ +/* $NetBSD: ite.c,v 1.47 2005/09/06 21:40:37 kleink 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.46 2005/06/04 14:42:36 he Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.47 2005/09/06 21:40:37 kleink Exp $"); #include "opt_ddb.h" @@ -442,7 +442,7 @@ iteopen(dev, mode, devtype, p) else tp = ip->tp; if ((tp->t_state & (TS_ISOPEN | TS_XCLUDE)) == (TS_ISOPEN | TS_XCLUDE) - && p->p_ucred->cr_uid != 0) + && suser(p->p_ucred, &p->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 1e3651911cd..20d757b788f 100644 --- a/sys/arch/atari/dev/ser.c +++ b/sys/arch/atari/dev/ser.c @@ -1,4 +1,4 @@ -/* $NetBSD: ser.c,v 1.25 2005/06/04 14:31:15 he Exp $ */ +/* $NetBSD: ser.c,v 1.26 2005/09/06 21:40:37 kleink Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -100,7 +100,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ser.c,v 1.25 2005/06/04 14:31:15 he Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ser.c,v 1.26 2005/09/06 21:40:37 kleink Exp $"); #include "opt_ddb.h" #include "opt_mbtype.h" @@ -397,7 +397,7 @@ seropen(dev, flag, mode, p) if (ISSET(tp->t_state, TS_ISOPEN) && ISSET(tp->t_state, TS_XCLUDE) && - p->p_ucred->cr_uid != 0) + suser(p->p_ucred, &p->p_acflag) != 0) return (EBUSY); s = spltty(); diff --git a/sys/arch/atari/dev/zs.c b/sys/arch/atari/dev/zs.c index 036aa3506b2..f312584b497 100644 --- a/sys/arch/atari/dev/zs.c +++ b/sys/arch/atari/dev/zs.c @@ -1,4 +1,4 @@ -/* $NetBSD: zs.c,v 1.43 2005/06/04 14:42:36 he Exp $ */ +/* $NetBSD: zs.c,v 1.44 2005/09/06 21:40:37 kleink Exp $ */ /* * Copyright (c) 1992, 1993 @@ -82,7 +82,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.43 2005/06/04 14:42:36 he Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.44 2005/09/06 21:40:37 kleink Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -402,7 +402,7 @@ struct proc *p; if ((tp->t_state & TS_ISOPEN) && (tp->t_state & TS_XCLUDE) && - p->p_ucred->cr_uid != 0) + suser(p->p_ucred, &p->p_acflag) != 0) return (EBUSY); s = spltty(); |
