Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat Convert to use p_opptr rather than p_oppid. Part ...



details:   https://anonhg.NetBSD.org/src/rev/c8c40f7369bc
branches:  trunk
changeset: 534506:c8c40f7369bc
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sun Jul 28 18:42:41 2002 +0000

description:
Convert to use p_opptr rather than p_oppid. Part of fix for
security/14444 by David Sainty.

diffstat:

 sys/compat/irix/irix_signal.c       |  11 +++++------
 sys/compat/netbsd32/netbsd32_wait.c |  11 +++++------
 sys/compat/svr4_32/svr4_32_misc.c   |  11 +++++------
 3 files changed, 15 insertions(+), 18 deletions(-)

diffs (99 lines):

diff -r 5bd181610619 -r c8c40f7369bc sys/compat/irix/irix_signal.c
--- a/sys/compat/irix/irix_signal.c     Sun Jul 28 17:54:05 2002 +0000
+++ b/sys/compat/irix/irix_signal.c     Sun Jul 28 18:42:41 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: irix_signal.c,v 1.18 2002/07/04 23:32:10 thorpej Exp $ */
+/*     $NetBSD: irix_signal.c,v 1.19 2002/07/28 18:42:41 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 1994, 2001-2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: irix_signal.c,v 1.18 2002/07/04 23:32:10 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: irix_signal.c,v 1.19 2002/07/28 18:42:41 jdolecek Exp $");
 
 #include <sys/types.h>
 #include <sys/signal.h>
@@ -801,11 +801,10 @@
                         * parent a SIGCHLD.  The rest of the cleanup will be
                         * done when the old parent waits on the child.
                         */
-                       if ((q->p_flag & P_TRACED) &&
-                           q->p_oppid != q->p_pptr->p_pid) {
-                               t = pfind(q->p_oppid);
+                       if ((q->p_flag & P_TRACED) && q->p_opptr != q->p_pptr){
+                               t = q->p_opptr;
                                proc_reparent(q, t ? t : initproc);
-                               q->p_oppid = 0;
+                               q->p_opptr = NULL;
                                q->p_flag &= ~(P_TRACED|P_WAITED|P_FSTRACE);
                                psignal(q->p_pptr, SIGCHLD);
                                wakeup((caddr_t)q->p_pptr);
diff -r 5bd181610619 -r c8c40f7369bc sys/compat/netbsd32/netbsd32_wait.c
--- a/sys/compat/netbsd32/netbsd32_wait.c       Sun Jul 28 17:54:05 2002 +0000
+++ b/sys/compat/netbsd32/netbsd32_wait.c       Sun Jul 28 18:42:41 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_wait.c,v 1.2 2001/11/13 02:09:10 lukem Exp $  */
+/*     $NetBSD: netbsd32_wait.c,v 1.3 2002/07/28 18:42:42 jdolecek Exp $       */
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_wait.c,v 1.2 2001/11/13 02:09:10 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_wait.c,v 1.3 2002/07/28 18:42:42 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -102,11 +102,10 @@
                         * parent a SIGCHLD.  The rest of the cleanup will be
                         * done when the old parent waits on the child.
                         */
-                       if ((p->p_flag & P_TRACED) &&
-                           p->p_oppid != p->p_pptr->p_pid) {
-                               t = pfind(p->p_oppid);
+                       if ((p->p_flag & P_TRACED) && p->p_opptr != p->p_pptr){
+                               t = p->p_opptr;
                                proc_reparent(p, t ? t : initproc);
-                               p->p_oppid = 0;
+                               p->p_opptr = NULL;
                                p->p_flag &= ~(P_TRACED|P_WAITED|P_FSTRACE);
                                psignal(p->p_pptr, SIGCHLD);
                                wakeup((caddr_t)p->p_pptr);
diff -r 5bd181610619 -r c8c40f7369bc sys/compat/svr4_32/svr4_32_misc.c
--- a/sys/compat/svr4_32/svr4_32_misc.c Sun Jul 28 17:54:05 2002 +0000
+++ b/sys/compat/svr4_32/svr4_32_misc.c Sun Jul 28 18:42:41 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: svr4_32_misc.c,v 1.12 2002/03/31 22:22:49 christos Exp $        */
+/*     $NetBSD: svr4_32_misc.c,v 1.13 2002/07/28 18:42:42 jdolecek Exp $        */
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -44,7 +44,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.12 2002/03/31 22:22:49 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.13 2002/07/28 18:42:42 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1260,11 +1260,10 @@
                         * parent a SIGCHLD.  The rest of the cleanup will be
                         * done when the old parent waits on the child.
                         */
-                       if ((q->p_flag & P_TRACED) &&
-                           q->p_oppid != q->p_pptr->p_pid) {
-                               t = pfind(q->p_oppid);
+                       if ((q->p_flag & P_TRACED) && q->p_opptr != q->p_pptr){
+                               t = q->p_opptr;
                                proc_reparent(q, t ? t : initproc);
-                               q->p_oppid = 0;
+                               q->p_opptr = NULL;
                                q->p_flag &= ~(P_TRACED|P_WAITED|P_FSTRACE);
                                psignal(q->p_pptr, SIGCHLD);
                                wakeup((caddr_t)q->p_pptr);



Home | Main Index | Thread Index | Old Index