summaryrefslogtreecommitdiff
path: root/sys/arch/macppc
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2003-08-15 20:32:22 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2003-08-15 20:32:22 +0000
commita1ee01486d4d2da0dce2fd97a58ca548a402d598 (patch)
treeeb06f4625b973fc701bb62d6902e4f1eb40bb4f2 /sys/arch/macppc
parent1a3299929d48eae52404e0b75267c111d07d2af4 (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/macppc')
-rw-r--r--sys/arch/macppc/dev/z8530tty.c4
-rw-r--r--sys/arch/macppc/macppc/mem.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/macppc/dev/z8530tty.c b/sys/arch/macppc/dev/z8530tty.c
index 7387cd3145f..d7698c953f7 100644
--- a/sys/arch/macppc/dev/z8530tty.c
+++ b/sys/arch/macppc/dev/z8530tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: z8530tty.c,v 1.2 2003/06/02 23:27:49 millert Exp $ */
+/* $OpenBSD: z8530tty.c,v 1.3 2003/08/15 20:32:13 tedu Exp $ */
/* $NetBSD: z8530tty.c,v 1.13 1996/10/16 20:42:14 gwr Exp $ */
/*-
@@ -754,7 +754,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;
diff --git a/sys/arch/macppc/macppc/mem.c b/sys/arch/macppc/macppc/mem.c
index 34706077a28..4b02cfcae85 100644
--- a/sys/arch/macppc/macppc/mem.c
+++ b/sys/arch/macppc/macppc/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.9 2003/06/02 23:27:50 millert Exp $ */
+/* $OpenBSD: mem.c,v 1.10 2003/08/15 20:32:13 tedu Exp $ */
/* $NetBSD: mem.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */
/*
@@ -77,7 +77,7 @@ mmopen(dev, flag, mode, p)
break;
#ifdef APERTURE
case 4:
- if (suser(p->p_ucred, &p->p_acflag) != 0 || !allowaperture)
+ if (suser(p, 0) != 0 || !allowaperture)
return (EPERM);
/* authorize only one simultaneous open() */