summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-07-08 01:30:26 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-07-08 01:30:26 +0000
commitae43555cca2333171e6c28b5230c85422c8587a4 (patch)
tree66ddf3c8447c2e2ba4e00ee9f31bb65f584e5a80
parent1e6744df4d3a64a6b848998b44a7fc7cdbe4456d (diff)
(S_io_reauthenticate): Don't use unsafe MOVE_SEND in call to
auth_server_authenticate.
-rw-r--r--pfinet/io-ops.c3
-rw-r--r--pflocal/io.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/pfinet/io-ops.c b/pfinet/io-ops.c
index 1eaae9bd..35281ce0 100644
--- a/pfinet/io-ops.c
+++ b/pfinet/io-ops.c
@@ -377,13 +377,14 @@ S_io_reauthenticate (struct sock_user *user,
auth = getauth ();
err = auth_server_authenticate (auth,
rend,
- MACH_MSG_TYPE_MOVE_SEND,
+ MACH_MSG_TYPE_COPY_SEND,
ports_get_right (newuser),
MACH_MSG_TYPE_MAKE_SEND,
&gen_uids, &genuidlen,
&aux_uids, &auxuidlen,
&gen_gids, &gengidlen,
&aux_gids, &auxgidlen);
+ mach_port_deallocate (mach_task_self (), rend);
assert (!err); /* XXX */
mach_port_deallocate (mach_task_self (), auth);
diff --git a/pflocal/io.c b/pflocal/io.c
index 5f6348d2..bae8317d 100644
--- a/pflocal/io.c
+++ b/pflocal/io.c
@@ -402,10 +402,11 @@ S_io_reauthenticate (struct sock_user *user, mach_port_t rendezvous)
auth_server = getauth ();
err =
auth_server_authenticate (auth_server,
- rendezvous, MACH_MSG_TYPE_MOVE_SEND,
+ rendezvous, MACH_MSG_TYPE_COPY_SEND,
new_user_port, MACH_MSG_TYPE_MAKE_SEND,
&uids, &num_uids, &aux_uids, &num_aux_uids,
&gids, &num_gids, &aux_gids, &num_aux_gids);
+ mach_port_deallocate (mach_task_self (), rendezvous);
mach_port_deallocate (mach_task_self (), auth_server);
/* Throw away the ids we went through all that trouble to get... */