diff options
-rw-r--r-- | exec/ChangeLog | 4 | ||||
-rw-r--r-- | exec/exec.c | 1 | ||||
-rw-r--r-- | exec/hashexec.c | 3 | ||||
-rw-r--r-- | exec/main.c | 9 |
4 files changed, 14 insertions, 3 deletions
diff --git a/exec/ChangeLog b/exec/ChangeLog index 1fcc642d..2a568a3b 100644 --- a/exec/ChangeLog +++ b/exec/ChangeLog @@ -1,3 +1,7 @@ +2000-03-17 Thomas Bushnell, BSG <tb@mit.edu> + + * main.c (S_exec_init): Don't use MOVE_SEND in Hurd RPC. + 2000-03-17 Roland McGrath <roland@baalperazim.frob.com> * exec.c (do_exec): Use ports_get_send_right. diff --git a/exec/exec.c b/exec/exec.c index 8baeb909..a7666edf 100644 --- a/exec/exec.c +++ b/exec/exec.c @@ -1469,6 +1469,7 @@ do_exec (file_t file, if (new != MACH_PORT_NULL && reauth) { mach_port_t ref = mach_reply_port (), authed; + /* MAKE_SEND is safe here because we destroy REF ourselves. */ e.error = io_reauthenticate (new, ref, MACH_MSG_TYPE_MAKE_SEND); if (! e.error) e.error = auth_user_authenticate diff --git a/exec/hashexec.c b/exec/hashexec.c index a6695b4d..b6bc4f32 100644 --- a/exec/hashexec.c +++ b/exec/hashexec.c @@ -74,6 +74,9 @@ check_hashbang (struct execdata *e, { error_t err; mach_port_t ref; + + /* MAKE_SEND is safe here because we destroy REF ourselves. */ + error_t uauth (auth_t auth) { return auth_user_authenticate (auth, diff --git a/exec/main.c b/exec/main.c index 033f7f0f..d366d960 100644 --- a/exec/main.c +++ b/exec/main.c @@ -1,6 +1,6 @@ /* GNU Hurd standard exec server, main program and server mechanics. - Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. + Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999, 2000 Free Software Foundation, Inc. Written by Roland McGrath. This file is part of the GNU Hurd. @@ -228,13 +228,16 @@ S_exec_init (struct trivfs_protid *protid, initial boot-time canonical sets. */ { struct trivfs_protid *cred; + mach_port_t right; + err = trivfs_open (fsys, iohelp_create_iouser (make_idvec (), make_idvec ()), 0, MACH_PORT_NULL, &cred); assert_perror (err); - proc_execdata_notify (procserver, ports_get_right (cred), - MACH_MSG_TYPE_MAKE_SEND); + right = ports_get_send_right (cred); + proc_execdata_notify (procserver, right, MACH_MSG_TYPE_COPY_SEND); + mach_port_deallocate (mach_task_self (), right); } err = get_privileged_ports (&host_priv, NULL); |