summaryrefslogtreecommitdiff
path: root/sys/arch
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/arch
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/arch')
-rw-r--r--sys/arch/alpha/alpha/mem.c4
-rw-r--r--sys/arch/alpha/alpha/promcons.c4
-rw-r--r--sys/arch/amd64/amd64/mem.c6
-rw-r--r--sys/arch/amd64/amd64/sys_machdep.c4
-rw-r--r--sys/arch/arm/arm/mem.c6
-rw-r--r--sys/arch/arm64/arm64/mem.c6
-rw-r--r--sys/arch/arm64/dev/pluart.c4
-rw-r--r--sys/arch/armv7/dev/pluart.c4
-rw-r--r--sys/arch/armv7/exynos/exuart.c6
-rw-r--r--sys/arch/armv7/imx/imxuart.c4
-rw-r--r--sys/arch/hppa/dev/pdc.c4
-rw-r--r--sys/arch/i386/i386/amdmsr.c4
-rw-r--r--sys/arch/i386/i386/mem.c6
-rw-r--r--sys/arch/i386/i386/sys_machdep.c4
-rw-r--r--sys/arch/luna88k/dev/siotty.c6
-rw-r--r--sys/arch/macppc/macppc/mem.c4
-rw-r--r--sys/arch/sh/dev/scif.c6
-rw-r--r--sys/arch/sh/sh/mem.c4
-rw-r--r--sys/arch/socppc/socppc/mem.c4
-rw-r--r--sys/arch/sparc64/dev/pcons.c4
-rw-r--r--sys/arch/sparc64/dev/sab.c6
-rw-r--r--sys/arch/sparc64/dev/sbbc.c4
-rw-r--r--sys/arch/sparc64/dev/vcctty.c4
-rw-r--r--sys/arch/sparc64/dev/vcons.c4
24 files changed, 56 insertions, 56 deletions
diff --git a/sys/arch/alpha/alpha/mem.c b/sys/arch/alpha/alpha/mem.c
index ec29894dff9..290ff9cccd8 100644
--- a/sys/arch/alpha/alpha/mem.c
+++ b/sys/arch/alpha/alpha/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.33 2017/12/14 03:30:43 guenther Exp $ */
+/* $OpenBSD: mem.c,v 1.34 2018/02/19 08:59:52 mpi Exp $ */
/* $NetBSD: mem.c,v 1.26 2000/03/29 03:48:20 simonb Exp $ */
/*
@@ -84,7 +84,7 @@ mmopen(dev_t dev, int flag, int mode, struct proc *p)
break;
#ifdef APERTURE
case 4:
- if (suser(p, 0) != 0 || !allowaperture)
+ if (suser(p) != 0 || !allowaperture)
return (EPERM);
/* authorize only one simultaneous open() unless
diff --git a/sys/arch/alpha/alpha/promcons.c b/sys/arch/alpha/alpha/promcons.c
index fff80b84125..9efabd3bf1c 100644
--- a/sys/arch/alpha/alpha/promcons.c
+++ b/sys/arch/alpha/alpha/promcons.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: promcons.c,v 1.18 2017/12/30 20:46:59 guenther Exp $ */
+/* $OpenBSD: promcons.c,v 1.19 2018/02/19 08:59:52 mpi Exp $ */
/* $NetBSD: promcons.c,v 1.5 1996/11/13 22:20:55 cgd Exp $ */
/*
@@ -90,7 +90,7 @@ promopen(dev, flag, mode, p)
ttsetwater(tp);
setuptimeout = 1;
- } else if (tp->t_state&TS_XCLUDE && suser(p, 0) != 0) {
+ } else if (tp->t_state&TS_XCLUDE && suser(p) != 0) {
splx(s);
return EBUSY;
}
diff --git a/sys/arch/amd64/amd64/mem.c b/sys/arch/amd64/amd64/mem.c
index 7fc09e1fb4a..da186df1f09 100644
--- a/sys/arch/amd64/amd64/mem.c
+++ b/sys/arch/amd64/amd64/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.33 2017/12/14 03:30:43 guenther Exp $ */
+/* $OpenBSD: mem.c,v 1.34 2018/02/19 08:59:52 mpi Exp $ */
/*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1982, 1986, 1990, 1993
@@ -92,7 +92,7 @@ mmopen(dev_t dev, int flag, int mode, struct proc *p)
break;
#ifdef APERTURE
case 4:
- if (suser(p, 0) != 0 || !allowaperture)
+ if (suser(p) != 0 || !allowaperture)
return (EPERM);
/* authorize only one simultaneous open() unless
@@ -198,7 +198,7 @@ mmmmap(dev_t dev, off_t off, int prot)
switch (minor(dev)) {
/* minor device 0 is physical memory */
case 0:
- if (suser(p, 0) != 0 && amd64_pa_used(off))
+ if (suser(p) != 0 && amd64_pa_used(off))
return -1;
return off;
diff --git a/sys/arch/amd64/amd64/sys_machdep.c b/sys/arch/amd64/amd64/sys_machdep.c
index aa28fba509c..7189a6e7722 100644
--- a/sys/arch/amd64/amd64/sys_machdep.c
+++ b/sys/arch/amd64/amd64/sys_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sys_machdep.c,v 1.19 2018/01/07 18:54:44 guenther Exp $ */
+/* $OpenBSD: sys_machdep.c,v 1.20 2018/02/19 08:59:52 mpi Exp $ */
/* $NetBSD: sys_machdep.c,v 1.1 2003/04/26 18:39:32 fvdl Exp $ */
/*-
@@ -55,7 +55,7 @@ amd64_iopl(struct proc *p, void *args, register_t *retval)
struct trapframe *tf = p->p_md.md_regs;
struct amd64_iopl_args ua;
- if ((error = suser(p, 0)) != 0)
+ if ((error = suser(p)) != 0)
return error;
#ifdef APERTURE
diff --git a/sys/arch/arm/arm/mem.c b/sys/arch/arm/arm/mem.c
index ec82d414342..e37b44deaaa 100644
--- a/sys/arch/arm/arm/mem.c
+++ b/sys/arch/arm/arm/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.20 2017/12/14 03:30:43 guenther Exp $ */
+/* $OpenBSD: mem.c,v 1.21 2018/02/19 08:59:52 mpi Exp $ */
/* $NetBSD: mem.c,v 1.11 2003/10/16 12:02:58 jdolecek Exp $ */
/*
@@ -115,7 +115,7 @@ mmopen(dev_t dev, int flag, int mode, struct proc *p)
break;
#ifdef APERTURE
case 4:
- if (suser(p, 0) != 0 || !allowaperture)
+ if (suser(p) != 0 || !allowaperture)
return (EPERM);
/* authorize only one simultaneous open() unless
@@ -239,7 +239,7 @@ mmmmap(dev_t dev, off_t off, int prot)
/* minor device 0 is physical memory */
if ((paddr_t)off >= ptoa((paddr_t)physmem) &&
- suser(p, 0) != 0)
+ suser(p) != 0)
return -1;
return off;
}
diff --git a/sys/arch/arm64/arm64/mem.c b/sys/arch/arm64/arm64/mem.c
index a64e9f1ab69..0b82310539d 100644
--- a/sys/arch/arm64/arm64/mem.c
+++ b/sys/arch/arm64/arm64/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.4 2018/02/17 22:33:00 kettenis Exp $ */
+/* $OpenBSD: mem.c,v 1.5 2018/02/19 08:59:52 mpi Exp $ */
/* $NetBSD: mem.c,v 1.11 2003/10/16 12:02:58 jdolecek Exp $ */
/*
@@ -114,7 +114,7 @@ mmopen(dev_t dev, int flag, int mode, struct proc *p)
break;
#ifdef APERTURE
case 4:
- if (suser(p, 0) != 0 || !allowaperture)
+ if (suser(p) != 0 || !allowaperture)
return (EPERM);
/* authorize only one simultaneous open() unless
@@ -238,7 +238,7 @@ mmmmap(dev_t dev, off_t off, int prot)
/* minor device 0 is physical memory */
if ((paddr_t)off >= ptoa((paddr_t)physmem) &&
- suser(p, 0) != 0)
+ suser(p) != 0)
return -1;
return off;
}
diff --git a/sys/arch/arm64/dev/pluart.c b/sys/arch/arm64/dev/pluart.c
index 4c29f481ada..33090a7f21a 100644
--- a/sys/arch/arm64/dev/pluart.c
+++ b/sys/arch/arm64/dev/pluart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pluart.c,v 1.6 2017/08/29 13:33:03 jsg Exp $ */
+/* $OpenBSD: pluart.c,v 1.7 2018/02/19 08:59:52 mpi Exp $ */
/*
* Copyright (c) 2014 Patrick Wildt <patrick@blueri.se>
@@ -792,7 +792,7 @@ pluartioctl( dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
case TIOCGFLAGS:
break;
case TIOCSFLAGS:
- error = suser(p, 0);
+ error = suser(p);
if (error != 0)
return(EPERM);
break;
diff --git a/sys/arch/armv7/dev/pluart.c b/sys/arch/armv7/dev/pluart.c
index b5af7b643b2..400fa891af8 100644
--- a/sys/arch/armv7/dev/pluart.c
+++ b/sys/arch/armv7/dev/pluart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pluart.c,v 1.6 2017/10/27 11:23:28 kevlo Exp $ */
+/* $OpenBSD: pluart.c,v 1.7 2018/02/19 08:59:52 mpi Exp $ */
/*
* Copyright (c) 2014 Patrick Wildt <patrick@blueri.se>
@@ -794,7 +794,7 @@ pluartioctl( dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
case TIOCGFLAGS:
break;
case TIOCSFLAGS:
- error = suser(p, 0);
+ error = suser(p);
if (error != 0)
return(EPERM);
break;
diff --git a/sys/arch/armv7/exynos/exuart.c b/sys/arch/armv7/exynos/exuart.c
index fc7a216a63a..020cc91c127 100644
--- a/sys/arch/armv7/exynos/exuart.c
+++ b/sys/arch/armv7/exynos/exuart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exuart.c,v 1.13 2017/10/27 11:23:28 kevlo Exp $ */
+/* $OpenBSD: exuart.c,v 1.14 2018/02/19 08:59:52 mpi Exp $ */
/*
* Copyright (c) 2005 Dale Rahn <drahn@motorola.com>
*
@@ -645,7 +645,7 @@ exuartopen(dev_t dev, int flag, int mode, struct proc *p)
SET(tp->t_state, TS_CARR_ON); /* XXX */
- } 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();
@@ -825,7 +825,7 @@ exuartioctl( dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
break;
case TIOCSFLAGS:
- error = suser(p, 0);
+ error = suser(p);
if (error != 0)
return(EPERM);
diff --git a/sys/arch/armv7/imx/imxuart.c b/sys/arch/armv7/imx/imxuart.c
index 5f2e686511b..cbdefd76c2b 100644
--- a/sys/arch/armv7/imx/imxuart.c
+++ b/sys/arch/armv7/imx/imxuart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: imxuart.c,v 1.17 2017/12/30 13:34:56 kettenis Exp $ */
+/* $OpenBSD: imxuart.c,v 1.18 2018/02/19 08:59:52 mpi Exp $ */
/*
* Copyright (c) 2005 Dale Rahn <drahn@motorola.com>
*
@@ -742,7 +742,7 @@ imxuartioctl( dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
break;
case TIOCSFLAGS:
- error = suser(p, 0);
+ error = suser(p);
if (error != 0)
return(EPERM);
diff --git a/sys/arch/hppa/dev/pdc.c b/sys/arch/hppa/dev/pdc.c
index 4ec046c820f..7835c64cc68 100644
--- a/sys/arch/hppa/dev/pdc.c
+++ b/sys/arch/hppa/dev/pdc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pdc.c,v 1.39 2011/08/16 17:26:04 kettenis Exp $ */
+/* $OpenBSD: pdc.c,v 1.40 2018/02/19 08:59:52 mpi Exp $ */
/*
* Copyright (c) 1998-2003 Michael Shalayeff
@@ -223,7 +223,7 @@ pdcopen(dev, flag, mode, p)
ttsetwater(tp);
setuptimeout = 1;
- } else if (tp->t_state&TS_XCLUDE && suser(p, 0) != 0) {
+ } else if (tp->t_state&TS_XCLUDE && suser(p) != 0) {
splx(s);
return (EBUSY);
}
diff --git a/sys/arch/i386/i386/amdmsr.c b/sys/arch/i386/i386/amdmsr.c
index 77eeca48d35..c096ceb5d38 100644
--- a/sys/arch/i386/i386/amdmsr.c
+++ b/sys/arch/i386/i386/amdmsr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: amdmsr.c,v 1.9 2010/04/20 22:05:41 tedu Exp $ */
+/* $OpenBSD: amdmsr.c,v 1.10 2018/02/19 08:59:52 mpi Exp $ */
/*
* Copyright (c) 2008 Marc Balmer <mbalmer@openbsd.org>
@@ -107,7 +107,7 @@ amdmsropen(dev_t dev, int flags, int devtype, struct proc *p)
if (amdmsr_cd.cd_ndevs == 0 || minor(dev) != 0)
return ENXIO;
- if (suser(p, 0) != 0 || !allowaperture)
+ if (suser(p) != 0 || !allowaperture)
return EPERM;
/* allow only one simultaneous open() */
if (amdmsr_open_cnt > 0)
diff --git a/sys/arch/i386/i386/mem.c b/sys/arch/i386/i386/mem.c
index e9af7eb43fa..903b3add790 100644
--- a/sys/arch/i386/i386/mem.c
+++ b/sys/arch/i386/i386/mem.c
@@ -1,5 +1,5 @@
/* $NetBSD: mem.c,v 1.31 1996/05/03 19:42:19 christos Exp $ */
-/* $OpenBSD: mem.c,v 1.53 2017/12/14 03:30:43 guenther Exp $ */
+/* $OpenBSD: mem.c,v 1.54 2018/02/19 08:59:52 mpi Exp $ */
/*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1982, 1986, 1990, 1993
@@ -90,7 +90,7 @@ mmopen(dev_t dev, int flag, int mode, struct proc *p)
break;
#ifdef APERTURE
case 4:
- if (suser(p, 0) != 0 || !allowaperture)
+ if (suser(p) != 0 || !allowaperture)
return (EPERM);
/* authorize only one simultaneous open() unless
@@ -210,7 +210,7 @@ mmmmap(dev_t dev, off_t off, int prot)
switch (minor(dev)) {
/* minor device 0 is physical memory */
case 0:
- if ((u_int)off > ptoa(physmem) && suser(p, 0) != 0)
+ if ((u_int)off > ptoa(physmem) && suser(p) != 0)
return -1;
return off;
diff --git a/sys/arch/i386/i386/sys_machdep.c b/sys/arch/i386/i386/sys_machdep.c
index 5011af82168..a9b0b4643d2 100644
--- a/sys/arch/i386/i386/sys_machdep.c
+++ b/sys/arch/i386/i386/sys_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sys_machdep.c,v 1.38 2017/12/30 20:46:59 guenther Exp $ */
+/* $OpenBSD: sys_machdep.c,v 1.39 2018/02/19 08:59:52 mpi Exp $ */
/* $NetBSD: sys_machdep.c,v 1.28 1996/05/03 19:42:29 christos Exp $ */
/*-
@@ -81,7 +81,7 @@ i386_iopl(struct proc *p, void *args, register_t *retval)
struct trapframe *tf = p->p_md.md_regs;
struct i386_iopl_args ua;
- if ((error = suser(p, 0)) != 0)
+ if ((error = suser(p)) != 0)
return error;
#ifdef APERTURE
if (!allowaperture && securelevel > 0)
diff --git a/sys/arch/luna88k/dev/siotty.c b/sys/arch/luna88k/dev/siotty.c
index fd75f8b71bc..d0d519af816 100644
--- a/sys/arch/luna88k/dev/siotty.c
+++ b/sys/arch/luna88k/dev/siotty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: siotty.c,v 1.21 2017/11/03 06:54:06 aoyama Exp $ */
+/* $OpenBSD: siotty.c,v 1.22 2018/02/19 08:59:52 mpi Exp $ */
/* $NetBSD: siotty.c,v 1.9 2002/03/17 19:40:43 atatat Exp $ */
/*-
@@ -469,7 +469,7 @@ sioopen(dev_t dev, int flag, int mode, struct proc *p)
tp = sc->sc_tty;
if ((tp->t_state & TS_ISOPEN) && (tp->t_state & TS_XCLUDE)
- && suser(p, 0) != 0)
+ && suser(p) != 0)
return EBUSY;
if ((tp->t_state & TS_ISOPEN) == 0) {
@@ -592,7 +592,7 @@ sioioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
siomctl(sc, *(int *)data, DMBIC);
break;
case TIOCSFLAGS: /* Instruct how serial port behaves */
- error = suser(p, 0);
+ error = suser(p);
if (error != 0)
return EPERM;
sc->sc_flags = *(int *)data;
diff --git a/sys/arch/macppc/macppc/mem.c b/sys/arch/macppc/macppc/mem.c
index 0ea44c381ac..4c233eda122 100644
--- a/sys/arch/macppc/macppc/mem.c
+++ b/sys/arch/macppc/macppc/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.26 2017/12/14 03:30:43 guenther Exp $ */
+/* $OpenBSD: mem.c,v 1.27 2018/02/19 08:59:52 mpi Exp $ */
/* $NetBSD: mem.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */
/*
@@ -204,7 +204,7 @@ mmopen(dev_t dev, int flag, int mode, struct proc *p)
break;
#ifdef APERTURE
case 4:
- if (suser(p, 0) != 0 || !allowaperture)
+ if (suser(p) != 0 || !allowaperture)
return (EPERM);
/* authorize only one simultaneous open() unless
diff --git a/sys/arch/sh/dev/scif.c b/sys/arch/sh/dev/scif.c
index b035fc320a6..5cf0039201d 100644
--- a/sys/arch/sh/dev/scif.c
+++ b/sys/arch/sh/dev/scif.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scif.c,v 1.18 2017/12/30 20:46:59 guenther Exp $ */
+/* $OpenBSD: scif.c,v 1.19 2018/02/19 08:59:52 mpi Exp $ */
/* $NetBSD: scif.c,v 1.47 2006/07/23 22:06:06 ad Exp $ */
/*-
@@ -686,7 +686,7 @@ scifopen(dev_t dev, int flag, int mode, struct proc *p)
if (ISSET(tp->t_state, TS_ISOPEN) &&
ISSET(tp->t_state, TS_XCLUDE) &&
- suser(p, 0) != 0)
+ suser(p) != 0)
return (EBUSY);
s = spltty();
@@ -859,7 +859,7 @@ scifioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
break;
case TIOCSFLAGS:
- error = suser(p, 0);
+ error = suser(p);
if (error)
break;
sc->sc_swflags = *(int *)data;
diff --git a/sys/arch/sh/sh/mem.c b/sys/arch/sh/sh/mem.c
index a42e0cd3782..51c3b036441 100644
--- a/sys/arch/sh/sh/mem.c
+++ b/sys/arch/sh/sh/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.10 2017/12/14 03:30:43 guenther Exp $ */
+/* $OpenBSD: mem.c,v 1.11 2018/02/19 08:59:52 mpi Exp $ */
/* $NetBSD: mem.c,v 1.21 2006/07/23 22:06:07 ad Exp $ */
/*
@@ -214,7 +214,7 @@ mmmmap(dev_t dev, off_t off, int prot)
if (minor(dev) != 0)
return (-1);
- if (__mm_mem_addr((paddr_t)off) == FALSE && suser(p, 0) != 0)
+ if (__mm_mem_addr((paddr_t)off) == FALSE && suser(p) != 0)
return (-1);
return ((paddr_t)off);
}
diff --git a/sys/arch/socppc/socppc/mem.c b/sys/arch/socppc/socppc/mem.c
index 109790ae753..90abc1d6a0c 100644
--- a/sys/arch/socppc/socppc/mem.c
+++ b/sys/arch/socppc/socppc/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.8 2017/12/14 03:30:43 guenther Exp $ */
+/* $OpenBSD: mem.c,v 1.9 2018/02/19 08:59:52 mpi Exp $ */
/* $NetBSD: mem.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */
/*
@@ -71,7 +71,7 @@ mmopen(dev_t dev, int flag, int mode, struct proc *p)
break;
#ifdef xAPERTURE
case 4:
- if (suser(p, 0) != 0 || !allowaperture)
+ if (suser(p) != 0 || !allowaperture)
return (EPERM);
/* authorize only one simultaneous open() */
diff --git a/sys/arch/sparc64/dev/pcons.c b/sys/arch/sparc64/dev/pcons.c
index 81ee4155b8f..5f33896ba8f 100644
--- a/sys/arch/sparc64/dev/pcons.c
+++ b/sys/arch/sparc64/dev/pcons.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcons.c,v 1.23 2017/12/30 20:46:59 guenther Exp $ */
+/* $OpenBSD: pcons.c,v 1.24 2018/02/19 08:59:52 mpi Exp $ */
/* $NetBSD: pcons.c,v 1.7 2001/05/02 10:32:20 scw Exp $ */
/*-
@@ -240,7 +240,7 @@ pconsopen(dev, flag, mode, p)
tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
pconsparam(tp, &tp->t_termios);
ttsetwater(tp);
- } else if ((tp->t_state & TS_XCLUDE) && suser(p, 0))
+ } else if ((tp->t_state & TS_XCLUDE) && suser(p))
return EBUSY;
tp->t_state |= TS_CARR_ON;
diff --git a/sys/arch/sparc64/dev/sab.c b/sys/arch/sparc64/dev/sab.c
index 9d9915a90b0..d518f2c28ef 100644
--- a/sys/arch/sparc64/dev/sab.c
+++ b/sys/arch/sparc64/dev/sab.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sab.c,v 1.34 2017/12/30 23:08:29 guenther Exp $ */
+/* $OpenBSD: sab.c,v 1.35 2018/02/19 08:59:52 mpi Exp $ */
/*
* Copyright (c) 2001 Jason L. Wright (jason@thought.net)
@@ -719,7 +719,7 @@ sabttyopen(dev, flags, mode, p)
else
tp->t_state &= ~TS_CARR_ON;
} else if ((tp->t_state & TS_XCLUDE) &&
- (!suser(p, 0))) {
+ (!suser(p))) {
return (EBUSY);
} else {
s = spltty();
@@ -885,7 +885,7 @@ sabttyioctl(dev, cmd, data, flags, p)
*((int *)data) = sc->sc_openflags;
break;
case TIOCSFLAGS:
- if (suser(p, 0))
+ if (suser(p))
error = EPERM;
else
sc->sc_openflags = *((int *)data) &
diff --git a/sys/arch/sparc64/dev/sbbc.c b/sys/arch/sparc64/dev/sbbc.c
index eb4b2bd8444..66ba35467d7 100644
--- a/sys/arch/sparc64/dev/sbbc.c
+++ b/sys/arch/sparc64/dev/sbbc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sbbc.c,v 1.12 2017/04/30 16:45:45 mpi Exp $ */
+/* $OpenBSD: sbbc.c,v 1.13 2018/02/19 08:59:52 mpi Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
*
@@ -528,7 +528,7 @@ sbbcopen(dev_t dev, int flag, int mode, struct proc *p)
tp->t_lflag = TTYDEF_LFLAG;
tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
ttsetwater(tp);
- } else if ((tp->t_state & TS_XCLUDE) && suser(p, 0))
+ } else if ((tp->t_state & TS_XCLUDE) && suser(p))
return (EBUSY);
tp->t_state |= TS_CARR_ON;
diff --git a/sys/arch/sparc64/dev/vcctty.c b/sys/arch/sparc64/dev/vcctty.c
index 8486b1284fc..a837811839f 100644
--- a/sys/arch/sparc64/dev/vcctty.c
+++ b/sys/arch/sparc64/dev/vcctty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vcctty.c,v 1.13 2018/01/17 15:52:33 stsp Exp $ */
+/* $OpenBSD: vcctty.c,v 1.14 2018/02/19 08:59:52 mpi Exp $ */
/*
* Copyright (c) 2009 Mark Kettenis
*
@@ -333,7 +333,7 @@ vccttyopen(dev_t dev, int flag, int mode, struct proc *p)
tp->t_lflag = TTYDEF_LFLAG;
tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
ttsetwater(tp);
- } else if ((tp->t_state & TS_XCLUDE) && suser(p, 0))
+ } else if ((tp->t_state & TS_XCLUDE) && suser(p))
return (EBUSY);
tp->t_state |= TS_CARR_ON;
diff --git a/sys/arch/sparc64/dev/vcons.c b/sys/arch/sparc64/dev/vcons.c
index 213a134cc1c..3e138ed2734 100644
--- a/sys/arch/sparc64/dev/vcons.c
+++ b/sys/arch/sparc64/dev/vcons.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vcons.c,v 1.15 2017/04/30 16:45:45 mpi Exp $ */
+/* $OpenBSD: vcons.c,v 1.16 2018/02/19 08:59:52 mpi Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
*
@@ -195,7 +195,7 @@ vconsopen(dev_t dev, int flag, int mode, struct proc *p)
tp->t_lflag = TTYDEF_LFLAG;
tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
ttsetwater(tp);
- } else if ((tp->t_state & TS_XCLUDE) && suser(p, 0))
+ } else if ((tp->t_state & TS_XCLUDE) && suser(p))
return (EBUSY);
tp->t_state |= TS_CARR_ON;