summaryrefslogtreecommitdiff
path: root/sys/dev/sbus
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2018-02-19 08:59:54 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2018-02-19 08:59:54 +0000
commitf44ff454cd0da5e1133d8f57877628c13d346dc5 (patch)
treea859411ce3744fe07063c4159a939baca3f01e49 /sys/dev/sbus
parent4272ed38eae20e0ca38fa48ddd2fcc64c78d02ec (diff)
Remove almost unused `flags' argument of suser().
The account flag `ASU' will no longer be set but that makes suser() mpsafe since it no longer mess with a per-process field. No objection from millert@, ok tedu@, bluhm@
Diffstat (limited to 'sys/dev/sbus')
-rw-r--r--sys/dev/sbus/magma.c6
-rw-r--r--sys/dev/sbus/spif.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/sbus/magma.c b/sys/dev/sbus/magma.c
index 22f9fe69683..0ecd08fef15 100644
--- a/sys/dev/sbus/magma.c
+++ b/sys/dev/sbus/magma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: magma.c,v 1.27 2017/12/30 23:08:29 guenther Exp $ */
+/* $OpenBSD: magma.c,v 1.28 2018/02/19 08:59:52 mpi Exp $ */
/*-
* Copyright (c) 1998 Iain Hibbert
@@ -892,7 +892,7 @@ mttyopen(dev_t dev, int flags, int mode, struct proc *p)
SET(tp->t_state, TS_CARR_ON);
else
CLR(tp->t_state, TS_CARR_ON);
- } else if (ISSET(tp->t_state, TS_XCLUDE) && suser(p, 0) != 0) {
+ } else if (ISSET(tp->t_state, TS_XCLUDE) && suser(p) != 0) {
return (EBUSY); /* superuser can break exclusive access */
} else {
s = spltty();
@@ -1054,7 +1054,7 @@ mttyioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p)
break;
case TIOCSFLAGS:
- if (suser(p, 0))
+ if (suser(p))
error = EPERM;
else
mp->mp_openflags = *((int *)data) &
diff --git a/sys/dev/sbus/spif.c b/sys/dev/sbus/spif.c
index 8f6c242f09e..2c2f0115070 100644
--- a/sys/dev/sbus/spif.c
+++ b/sys/dev/sbus/spif.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spif.c,v 1.20 2017/12/30 23:08:29 guenther Exp $ */
+/* $OpenBSD: spif.c,v 1.21 2018/02/19 08:59:52 mpi Exp $ */
/*
* Copyright (c) 1999-2002 Jason L. Wright (jason@thought.net)
@@ -390,7 +390,7 @@ sttyopen(dev, flags, mode, p)
else
CLR(tp->t_state, TS_CARR_ON);
}
- else if (ISSET(tp->t_state, TS_XCLUDE) && suser(p, 0) != 0) {
+ else if (ISSET(tp->t_state, TS_XCLUDE) && suser(p) != 0) {
return (EBUSY);
} else {
s = spltty();
@@ -505,7 +505,7 @@ sttyioctl(dev, cmd, data, flags, p)
*((int *)data) = sp->sp_openflags;
break;
case TIOCSFLAGS:
- if (suser(p, 0))
+ if (suser(p))
error = EPERM;
else
sp->sp_openflags = *((int *)data) &