summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2014-03-27 04:38:41 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2014-03-27 04:38:41 +0000
commitef0cd5ce7eeb0009e5795c2938083b59d03da106 (patch)
treecd2f3e94e546982d03f3bd67ca6c3659330ed112
parent9690548aeae804ef379f176c662b100288f938d3 (diff)
Check for PS_SUGID/PS_SUGIDEXEC against the correct set of flags
ok deraadt@
-rw-r--r--sys/dev/systrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/systrace.c b/sys/dev/systrace.c
index a69e282bceb..981883ce190 100644
--- a/sys/dev/systrace.c
+++ b/sys/dev/systrace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: systrace.c,v 1.64 2014/03/26 05:23:42 guenther Exp $ */
+/* $OpenBSD: systrace.c,v 1.65 2014/03/27 04:38:40 guenther Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -1251,7 +1251,7 @@ systrace_attach(struct fsystrace *fst, pid_t pid)
* traced. This is good security.]
*/
if ((proc->p_cred->p_ruid != p->p_cred->p_ruid ||
- ISSET(proc->p_flag, PS_SUGID | PS_SUGIDEXEC)) &&
+ ISSET(proc->p_p->ps_flags, PS_SUGID | PS_SUGIDEXEC)) &&
(error = suser(p, 0)) != 0)
goto out;