summaryrefslogtreecommitdiff
path: root/sys/kern/kern_sig.c
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2011-04-02 17:04:36 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2011-04-02 17:04:36 +0000
commit99a2057acb47dac10d8566bc4ab6a117de267634 (patch)
tree1901b960139f21d0cb0248fa97c5c61ccfe5bb17 /sys/kern/kern_sig.c
parent11ae302ebcf8bbe27cb1c13a64dce31c551cdac8 (diff)
Move P_SUGID and P_SUGIDEXEC from struct proc to struct process, so
that you can't evade the checks by doing the dirty work in an rthread ok blambert@, deraadt@
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r--sys/kern/kern_sig.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 3d900be04b4..39bf31572e7 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sig.c,v 1.117 2011/03/07 07:07:13 guenther Exp $ */
+/* $OpenBSD: kern_sig.c,v 1.118 2011/04/02 17:04:35 guenther Exp $ */
/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
/*
@@ -103,7 +103,7 @@ cansignal(struct proc *p, struct pcred *pc, struct proc *q, int signum)
* Using kill(), only certain signals can be sent to setugid
* child processes
*/
- if (q->p_flag & P_SUGID) {
+ if (q->p_p->ps_flags & PS_SUGID) {
switch (signum) {
case 0:
case SIGKILL:
@@ -1395,8 +1395,8 @@ coredump(struct proc *p)
* group privileges, unless the nosuidcoredump sysctl is set to 2,
* in which case dumps are put into /var/crash/.
*/
- if (((p->p_flag & P_SUGID) && (error = suser(p, 0))) ||
- ((p->p_flag & P_SUGID) && nosuidcoredump)) {
+ if (((p->p_p->ps_flags & PS_SUGID) && (error = suser(p, 0))) ||
+ ((p->p_p->ps_flags & PS_SUGID) && nosuidcoredump)) {
if (nosuidcoredump == 2)
dir = "/var/crash/";
else