diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2003-08-15 20:32:22 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2003-08-15 20:32:22 +0000 |
commit | a1ee01486d4d2da0dce2fd97a58ca548a402d598 (patch) | |
tree | eb06f4625b973fc701bb62d6902e4f1eb40bb4f2 /sys/arch/sparc/dev | |
parent | 1a3299929d48eae52404e0b75267c111d07d2af4 (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/sparc/dev')
-rw-r--r-- | sys/arch/sparc/dev/magma.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc/dev/spif.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc/dev/xd.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc/dev/xy.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc/dev/z8530tty.c | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/sys/arch/sparc/dev/magma.c b/sys/arch/sparc/dev/magma.c index e5f91cf9f06..60c457aa1bd 100644 --- a/sys/arch/sparc/dev/magma.c +++ b/sys/arch/sparc/dev/magma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: magma.c,v 1.14 2003/02/11 19:20:26 mickey Exp $ */ +/* $OpenBSD: magma.c,v 1.15 2003/08/15 20:32:14 tedu Exp $ */ /* * magma.c * @@ -1110,7 +1110,7 @@ int error; break; case TIOCSFLAGS: - if( suser(p->p_ucred, &p->p_acflag) ) + if( suser(p, 0) ) error = EPERM; else mp->mp_openflags = *((int *)data) & diff --git a/sys/arch/sparc/dev/spif.c b/sys/arch/sparc/dev/spif.c index 46a92ca70af..c56255e8a49 100644 --- a/sys/arch/sparc/dev/spif.c +++ b/sys/arch/sparc/dev/spif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spif.c,v 1.15 2003/06/02 18:40:59 jason Exp $ */ +/* $OpenBSD: spif.c,v 1.16 2003/08/15 20:32:14 tedu Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -451,7 +451,7 @@ sttyioctl(dev, cmd, data, flags, p) *((int *)data) = sp->sp_openflags; break; case TIOCSFLAGS: - if (suser(p->p_ucred, &p->p_acflag)) + if (suser(p, 0)) error = EPERM; else sp->sp_openflags = *((int *)data) & diff --git a/sys/arch/sparc/dev/xd.c b/sys/arch/sparc/dev/xd.c index 68b8e1b19bc..553bd22de3c 100644 --- a/sys/arch/sparc/dev/xd.c +++ b/sys/arch/sparc/dev/xd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xd.c,v 1.24 2002/06/08 18:52:45 art Exp $ */ +/* $OpenBSD: xd.c,v 1.25 2003/08/15 20:32:14 tedu Exp $ */ /* $NetBSD: xd.c,v 1.37 1997/07/29 09:58:16 fair Exp $ */ /* @@ -899,7 +899,7 @@ xdioctl(dev, command, addr, flag, p) case DIOSXDCMD: xio = (struct xd_iocmd *) addr; - if ((error = suser(p->p_ucred, &p->p_acflag)) != 0) + if ((error = suser(p, 0)) != 0) return (error); return (xdc_ioctlcmd(xd, dev, xio)); diff --git a/sys/arch/sparc/dev/xy.c b/sys/arch/sparc/dev/xy.c index 1d943ebcb7a..fd38dc371d3 100644 --- a/sys/arch/sparc/dev/xy.c +++ b/sys/arch/sparc/dev/xy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xy.c,v 1.21 2002/06/08 18:52:45 art Exp $ */ +/* $OpenBSD: xy.c,v 1.22 2003/08/15 20:32:14 tedu Exp $ */ /* $NetBSD: xy.c,v 1.26 1997/07/19 21:43:56 pk Exp $ */ /* @@ -860,7 +860,7 @@ xyioctl(dev, command, addr, flag, p) case DIOSXDCMD: xio = (struct xd_iocmd *) addr; - if ((error = suser(p->p_ucred, &p->p_acflag)) != 0) + if ((error = suser(p, 0)) != 0) return (error); return (xyc_ioctlcmd(xy, dev, xio)); diff --git a/sys/arch/sparc/dev/z8530tty.c b/sys/arch/sparc/dev/z8530tty.c index 038d8b42ad2..d9e0f119b63 100644 --- a/sys/arch/sparc/dev/z8530tty.c +++ b/sys/arch/sparc/dev/z8530tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: z8530tty.c,v 1.2 2003/06/02 23:27:54 millert Exp $ */ +/* $OpenBSD: z8530tty.c,v 1.3 2003/08/15 20:32:14 tedu Exp $ */ /* $NetBSD: z8530tty.c,v 1.13 1996/10/16 20:42:14 gwr Exp $ */ /*- @@ -749,7 +749,7 @@ zsioctl(dev, cmd, data, flag, p) break; case TIOCSFLAGS: - error = suser(p->p_ucred, &p->p_acflag); + error = suser(p, 0); if (error != 0) break; zst->zst_swflags = *(int *)data; |