From 1d361c4dd0a5b562337b97b65c8ea673549f9374 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 17 Mar 2000 10:25:58 +0000 Subject: 2000-03-17 Roland McGrath * io-reauthenticate.c (diskfs_S_io_reauthenticate): Use ports_get_send_right. --- libdiskfs/io-reauthenticate.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'libdiskfs') diff --git a/libdiskfs/io-reauthenticate.c b/libdiskfs/io-reauthenticate.c index 3fc780d2..e2c0e68b 100644 --- a/libdiskfs/io-reauthenticate.c +++ b/libdiskfs/io-reauthenticate.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1994, 1995, 1996 Free Software Foundation + Copyright (C) 1994,95,96,2000 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -30,7 +30,7 @@ diskfs_S_io_reauthenticate (struct protid *cred, if (cred == 0) return EOPNOTSUPP; - /* This routine must carefully ignore EINTR because we + /* This routine must carefully ignore EINTR because we are a simpleroutine, so callers won't know to restart. */ mutex_lock (&cred->po->np->lock); @@ -43,16 +43,14 @@ diskfs_S_io_reauthenticate (struct protid *cred, return err; } - newright = ports_get_right (newcred); - err = mach_port_insert_right (mach_task_self (), newright, newright, - MACH_MSG_TYPE_MAKE_SEND); - assert_perror (err); + newright = ports_get_send_right (newcred); + assert (newright != MACH_PORT_NULL); - diskfs_finish_protid (newcred, iohelp_reauth (diskfs_auth_server_port, + diskfs_finish_protid (newcred, iohelp_reauth (diskfs_auth_server_port, rend_port, newright, 1)); mach_port_deallocate (mach_task_self (), rend_port); mach_port_deallocate (mach_task_self (), newright); - + mutex_unlock (&cred->po->np->lock); ports_port_deref (newcred); -- cgit v1.2.3