summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2000-03-17 10:31:00 +0000
committerRoland McGrath <roland@gnu.org>2000-03-17 10:31:00 +0000
commitdf988e23ee71e8b6b4446f8150f6908f9877002f (patch)
tree45602223980d305e4f9a3d012c9bdfdd37df158d
parent401739df317b1dced1ce98a4367d78e385a4b843 (diff)
2000-03-17 Roland McGrath <roland@baalperazim.frob.com>
* io-reauthenticate.c (netfs_S_io_reauthenticate): Use ports_get_send_right.
-rw-r--r--libnetfs/io-reauthenticate.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/libnetfs/io-reauthenticate.c b/libnetfs/io-reauthenticate.c
index c88e773d..1791e8d9 100644
--- a/libnetfs/io-reauthenticate.c
+++ b/libnetfs/io-reauthenticate.c
@@ -1,5 +1,5 @@
-/*
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/*
+ Copyright (C) 1995,96,2000 Free Software Foundation, Inc.
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -25,19 +25,16 @@ error_t
netfs_S_io_reauthenticate (struct protid *user, mach_port_t rend_port)
{
struct protid *newpi;
- error_t err;
mach_port_t newright;
-
+
if (!user)
return EOPNOTSUPP;
-
+
mutex_lock (&user->po->np->lock);
newpi = netfs_make_protid (user->po, 0);
- newright = ports_get_right (newpi);
- err = mach_port_insert_right (mach_task_self (), newright, newright,
- MACH_MSG_TYPE_MAKE_SEND);
- assert_perror (err);
+ newright = ports_get_send_right (newpi);
+ assert (newright != MACH_PORT_NULL);
newpi->user = iohelp_reauth (netfs_auth_server_port, rend_port, newright, 1);