summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/dev/sab.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2003-08-15 20:32:22 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2003-08-15 20:32:22 +0000
commita1ee01486d4d2da0dce2fd97a58ca548a402d598 (patch)
treeeb06f4625b973fc701bb62d6902e4f1eb40bb4f2 /sys/arch/sparc64/dev/sab.c
parent1a3299929d48eae52404e0b75267c111d07d2af4 (diff)
change arguments to suser. suser now takes the process, and a flags
argument. old cred only calls user suser_ucred. this will allow future work to more flexibly implement the idea of a root process. looks like something i saw in freebsd, but a little different. use of suser_ucred vs suser in file system code should be looked at again, for the moment semantics remain unchanged. review and input from art@ testing and further review miod@
Diffstat (limited to 'sys/arch/sparc64/dev/sab.c')
-rw-r--r--sys/arch/sparc64/dev/sab.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/sparc64/dev/sab.c b/sys/arch/sparc64/dev/sab.c
index fc22a641db7..14250d7f600 100644
--- a/sys/arch/sparc64/dev/sab.c
+++ b/sys/arch/sparc64/dev/sab.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sab.c,v 1.13 2003/06/24 21:54:39 henric Exp $ */
+/* $OpenBSD: sab.c,v 1.14 2003/08/15 20:32:15 tedu Exp $ */
/*
* Copyright (c) 2001 Jason L. Wright (jason@thought.net)
@@ -696,7 +696,7 @@ sabttyopen(dev, flags, mode, p)
else
tp->t_state &= ~TS_CARR_ON;
} else if ((tp->t_state & TS_XCLUDE) &&
- (!suser(p->p_ucred, &p->p_acflag))) {
+ (!suser(p, 0))) {
return (EBUSY);
} else {
s = spltty();
@@ -862,7 +862,7 @@ sabttyioctl(dev, cmd, data, flags, p)
*((int *)data) = sc->sc_openflags;
break;
case TIOCSFLAGS:
- if (suser(p->p_ucred, &p->p_acflag))
+ if (suser(p, 0))
error = EPERM;
else
sc->sc_openflags = *((int *)data) &