summaryrefslogtreecommitdiff
path: root/sys/dev/systrace.c
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/dev/systrace.c
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/dev/systrace.c')
-rw-r--r--sys/dev/systrace.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/systrace.c b/sys/dev/systrace.c
index d31b6914da3..d7c8972207d 100644
--- a/sys/dev/systrace.c
+++ b/sys/dev/systrace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: systrace.c,v 1.30 2003/06/16 06:36:40 itojun Exp $ */
+/* $OpenBSD: systrace.c,v 1.31 2003/08/15 20:32:16 tedu Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -533,7 +533,7 @@ systraceioctl(dev, cmd, data, flag, p)
TAILQ_INIT(&fst->messages);
TAILQ_INIT(&fst->policies);
- if (suser(p->p_ucred, &p->p_acflag) == 0)
+ if (suser(p, 0) == 0)
fst->issuser = 1;
fst->p_ruid = p->p_cred->p_ruid;
fst->p_rgid = p->p_cred->p_rgid;
@@ -1155,7 +1155,7 @@ systrace_attach(struct fsystrace *fst, pid_t pid)
*/
if ((proc->p_cred->p_ruid != p->p_cred->p_ruid ||
ISSET(proc->p_flag, P_SUGID)) &&
- (error = suser(p->p_ucred, &p->p_acflag)) != 0)
+ (error = suser(p, 0)) != 0)
goto out;
/*