summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-04-27 11:18:52 +0000
committerphk <phk@FreeBSD.org>1999-04-27 11:18:52 +0000
commit16e3fbd2c114d665755299002f1c50dd11ba7245 (patch)
treed7f6bebfe177ae90b67d27603da4d211433088e5 /sys/amd64
parentaba5e776bb95610ea3e3355cbf47aadb844773eb (diff)
downloadFreeBSD-src-16e3fbd2c114d665755299002f1c50dd11ba7245.zip
FreeBSD-src-16e3fbd2c114d665755299002f1c50dd11ba7245.tar.gz
Suser() simplification:
1: s/suser/suser_xxx/ 2: Add new function: suser(struct proc *), prototyped in <sys/proc.h>. 3: s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/ The remaining suser_xxx() calls will be scrutinized and dealt with later. There may be some unneeded #include <sys/cred.h>, but they are left as an exercise for Bruce. More changes to the suser() API will come along with the "jail" code.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/mem.c6
-rw-r--r--sys/amd64/amd64/sys_machdep.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/amd64/amd64/mem.c b/sys/amd64/amd64/mem.c
index 36fdd27..de75354 100644
--- a/sys/amd64/amd64/mem.c
+++ b/sys/amd64/amd64/mem.c
@@ -38,7 +38,7 @@
*
* from: Utah $Hdr: mem.c 1.13 89/10/08$
* from: @(#)mem.c 7.2 (Berkeley) 5/9/91
- * $Id: mem.c,v 1.54 1999/02/02 14:14:05 bde Exp $
+ * $Id: mem.c,v 1.55 1999/04/07 03:57:45 msmith Exp $
*/
/*
@@ -185,7 +185,7 @@ mmopen(dev, flags, fmt, p)
return ENODEV;
#endif
case 14:
- error = suser(p->p_ucred, &p->p_acflag);
+ error = suser(p);
if (error != 0)
return (error);
if (securelevel > 0)
@@ -552,7 +552,7 @@ random_ioctl(dev, cmd, data, flags, p)
* Even inspecting the state is privileged, since it gives a hint
* about how easily the randomness might be guessed.
*/
- error = suser(p->p_ucred, &p->p_acflag);
+ error = suser(p);
if (error != 0)
return (error);
diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c
index 17aa580..9c3df36 100644
--- a/sys/amd64/amd64/sys_machdep.c
+++ b/sys/amd64/amd64/sys_machdep.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)sys_machdep.c 5.5 (Berkeley) 1/19/91
- * $Id: sys_machdep.c,v 1.38 1998/12/07 21:58:19 archie Exp $
+ * $Id: sys_machdep.c,v 1.39 1999/01/28 01:59:50 dillon Exp $
*
*/
@@ -185,7 +185,7 @@ i386_set_ioperm(p, args)
if ((error = copyin(args, &ua, sizeof(struct i386_ioperm_args))) != 0)
return (error);
- if ((error = suser(p->p_ucred, &p->p_acflag)) != 0)
+ if ((error = suser(p)) != 0)
return (error);
if (securelevel > 0)
return (EPERM);
OpenPOWER on IntegriCloud