summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_prot.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_prot.c')
-rw-r--r--sys/kern/kern_prot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 882a083656a..e707c68e0da 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_prot.c,v 1.40 2010/01/14 23:12:11 schwarze Exp $ */
+/* $OpenBSD: kern_prot.c,v 1.41 2010/01/28 19:23:06 guenther Exp $ */
/* $NetBSD: kern_prot.c,v 1.33 1996/02/09 18:59:42 christos Exp $ */
/*
@@ -282,7 +282,7 @@ sys_setpgid(struct proc *curp, void *v, register_t *retval)
newpgrp = pool_get(&pgrp_pool, PR_WAITOK);
if (pid != 0 && pid != curp->p_pid) {
- if ((targp = pfind(pid)) == 0 || !inferior(targp)) {
+ if ((targp = pfind(pid)) == 0 || !inferior(targp, curp)) {
error = ESRCH;
goto out;
}