diff options
author | Miles Bader <miles@gnu.org> | 1995-11-06 22:57:27 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1995-11-06 22:57:27 +0000 |
commit | 75884d172cbee6cd968c7d93bf3fe9132e42f57d (patch) | |
tree | eecc4afd8a2d7581dd28488880de3e76785afc39 | |
parent | 17aa9d8024e8d9e05231295d2c5eb50441f1dc01 (diff) |
(fshelp_fetch_root):
When PORT_TYPE is MACH_MSG_TYPE_MAKE_SEND, make the right *before* using it.
Don't bother reauthenticating the underlying node returned by CALLBACK2 --
it already has the right ids. This also gets rid of a problem with giving
away our auth port prematurely.
-rw-r--r-- | libfshelp/fetch-root.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/libfshelp/fetch-root.c b/libfshelp/fetch-root.c index 682197a4..ffac383e 100644 --- a/libfshelp/fetch-root.c +++ b/libfshelp/fetch-root.c @@ -63,14 +63,14 @@ fshelp_fetch_root (struct transbox *box, void *cookie, if (port == MACH_PORT_NULL) return port; + if (port_type == MACH_MSG_TYPE_MAKE_SEND) + mach_port_insert_right (mach_task_self (), port, port,port_type); + rend = mach_reply_port (); err = io_reauthenticate (port, rend, MACH_MSG_TYPE_MAKE_SEND); assert_perror (err); - if (port_type == MACH_MSG_TYPE_MAKE_SEND) - mach_port_insert_right (mach_task_self (), port, port,port_type); - err = auth_user_authenticate (newauth, port, rend, MACH_MSG_TYPE_MAKE_SEND, &ret); @@ -86,15 +86,9 @@ fshelp_fetch_root (struct transbox *box, void *cookie, error_t fetch_underlying (int flags, mach_port_t *underlying, mach_msg_type_name_t *underlying_type) { - error_t err = + return (*callback2) (box->cookie, cookie, flags, underlying, underlying_type); - if (!err) - { - *underlying = reauth (*underlying, *underlying_type); - *underlying_type = MACH_MSG_TYPE_MOVE_SEND; - } - return err; } if (box->flags & TRANSBOX_STARTING) |