diff options
author | Roland McGrath <roland@gnu.org> | 1996-04-07 17:44:31 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1996-04-07 17:44:31 +0000 |
commit | 3125073e100f2d6f82144b1e07321a340b538967 (patch) | |
tree | 24ab164f08dadcd506c038ccafb4f0fe381c77d0 | |
parent | * sysdeps/mach/hurd/fork.c (__fork): Don't leak send-rights to the (diff) | |
download | glibc-3125073e100f2d6f82144b1e07321a340b538967.tar.gz glibc-3125073e100f2d6f82144b1e07321a340b538967.tar.bz2 glibc-3125073e100f2d6f82144b1e07321a340b538967.zip |
Sun Apr 7 10:37:30 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>cvs/libc-960408
* sysdeps/mach/hurd/fork.c: Don't leak send rights to the child's proc
port in the parent.
Fri Apr 5 17:43:41 1996 Miles Bader <miles@gnu.ai.mit.edu>
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | sysdeps/mach/hurd/fork.c | 3 |
2 files changed, 8 insertions, 3 deletions
@@ -1,7 +1,9 @@ -Fri Apr 5 17:43:41 1996 Miles Bader <miles@gnu.ai.mit.edu> +Sun Apr 7 10:37:30 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu> + + * sysdeps/mach/hurd/fork.c: Don't leak send rights to the child's proc + port in the parent. - * sysdeps/mach/hurd/fork.c (__fork): Don't leak send-rights to the - child's proc port in the parent. +Fri Apr 5 17:43:41 1996 Miles Bader <miles@gnu.ai.mit.edu> * sysdeps/mach/hurd/i386/sigreturn.c (__sigreturn): Store MACH_PORT_DEAD in the thread reply-port variable before destroying diff --git a/sysdeps/mach/hurd/fork.c b/sysdeps/mach/hurd/fork.c index 8d730ae4fb..5814cc2db2 100644 --- a/sysdeps/mach/hurd/fork.c +++ b/sysdeps/mach/hurd/fork.c @@ -297,6 +297,7 @@ __fork (void) Give the child as many references for it as we have. */ mach_port_urefs_t refs, *record_refs = NULL; mach_port_t insert; + mach_msg_type_name_t insert_type = MACH_MSG_TYPE_COPY_SEND; if (portnames[i] == newtask) /* Skip the name we use for the child's task port. */ continue; @@ -309,6 +310,7 @@ __fork (void) /* Get the proc server port for the new task. */ if (err = __proc_task2proc (portnames[i], newtask, &insert)) LOSE; + insert_type = MACH_MSG_TYPE_MOVE_SEND; } else if (portnames[i] == ss->thread) { @@ -347,6 +349,7 @@ __fork (void) if (j < nthreads) continue; + /* Copy our own send right. */ insert = portnames[i]; } /* Find out how many user references we have for |