summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2000-03-17 10:25:58 +0000
committerRoland McGrath <roland@gnu.org>2000-03-17 10:25:58 +0000
commit1d361c4dd0a5b562337b97b65c8ea673549f9374 (patch)
treede463a18387203408ac564e41e7f92dd7f567315 /libdiskfs
parent2fff036f679436f3be75b05d3c58a44720e15e5c (diff)
2000-03-17 Roland McGrath <roland@baalperazim.frob.com>
* io-reauthenticate.c (diskfs_S_io_reauthenticate): Use ports_get_send_right.
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/io-reauthenticate.c14
1 files changed, 6 insertions, 8 deletions
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);