aboutsummaryrefslogtreecommitdiff
path: root/libdiskfs/io-reauthenticate.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2001-06-16 20:23:09 +0000
committerRoland McGrath <roland@gnu.org>2001-06-16 20:23:09 +0000
commit487bba2f0cd506b4a79e1d92184a5f80d827954f (patch)
treef26a7bc5548e27603cdd3a239fec26490b2f8b4a /libdiskfs/io-reauthenticate.c
parenta2529808d1aaf878eb6fff54ab491bd3d47db894 (diff)
downloadhurd-487bba2f0cd506b4a79e1d92184a5f80d827954f.tar.gz
hurd-487bba2f0cd506b4a79e1d92184a5f80d827954f.tar.bz2
hurd-487bba2f0cd506b4a79e1d92184a5f80d827954f.zip
2001-04-01 Neal H Walfield <neal@cs.uml.edu>
* dir-lookup.c (diskfs_S_dir_lookup): Use iohelp_create_empty_iouser. * fsys-getfile.c (diskfs_S_fsys_getfile): Use iohelp_create_complex_iouser. * io-reauthenticate.c (diskfs_S_io_reauthenticate): Use new iohelp_reauth semantics. * io-restrict-auth.c (diskfs_S_io_restrict_auth): Use new iohelp_create_iouser semantics. * protid-make.c (diskfs_finish_protid): Use iohelp_create_simple_iouser and new iohelp_dup_iouse semantics. * trans-callback.c (_diskfs_translator_callback2_fn): Use iohelp_create_simple_iouser.
Diffstat (limited to 'libdiskfs/io-reauthenticate.c')
-rw-r--r--libdiskfs/io-reauthenticate.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/libdiskfs/io-reauthenticate.c b/libdiskfs/io-reauthenticate.c
index eb564a26..fd427e20 100644
--- a/libdiskfs/io-reauthenticate.c
+++ b/libdiskfs/io-reauthenticate.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1994,95,96,2000 Free Software Foundation, Inc.
+ Copyright (C) 1994,95,96,2000,01 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
@@ -47,10 +47,14 @@ diskfs_S_io_reauthenticate (struct protid *cred,
newright = ports_get_send_right (newcred);
assert (newright != MACH_PORT_NULL);
- user = iohelp_reauth (diskfs_auth_server_port, rend_port, newright, 1);
- diskfs_finish_protid (newcred, user);
+ err = iohelp_reauth (&user, diskfs_auth_server_port, rend_port,
+ newright, 1);
+ if (! err)
+ {
+ diskfs_finish_protid (newcred, user);
+ iohelp_free_iouser (user);
+ }
- iohelp_free_iouser (user);
mach_port_deallocate (mach_task_self (), rend_port);
mach_port_deallocate (mach_task_self (), newright);
@@ -58,5 +62,5 @@ diskfs_S_io_reauthenticate (struct protid *cred,
ports_port_deref (newcred);
- return 0;
+ return err;
}