summaryrefslogtreecommitdiff
path: root/sys/arch/i386
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/i386
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/i386')
-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
3 files changed, 7 insertions, 7 deletions
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)