From 93054f14cb52bfd576e4ecfdcf0bc1c468e4cbbf Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 16 Jun 2001 20:21:47 +0000 Subject: 2001-04-01 Neal H Walfield * dir-lookup.c (trivfs_S_dir_lookup): Use iohelp_dup_iouser as per the new semantics. * fsys-getroot.c (trivfs_S_fsys_getroot): Use iohelp_create_complex_iouser. * io-reauthenticate.c (trivfs_S_io_reauthenticate): Use iohelp_reauth as per the new semantics. * io-restrict-auth.c (trivfs_S_io_restrict_auth): Use iohelp_create_complex_iouser. Check return values. * trivfs_protid_dup (trivfs_protid_dup): Use iohelp_dup_iouser as per the new semantics. --- libtrivfs/io-reauthenticate.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'libtrivfs/io-reauthenticate.c') diff --git a/libtrivfs/io-reauthenticate.c b/libtrivfs/io-reauthenticate.c index 7a1865f5..3c675e84 100644 --- a/libtrivfs/io-reauthenticate.c +++ b/libtrivfs/io-reauthenticate.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1993,94,95,96,2000 Free Software Foundation, Inc. + Copyright (C) 1993,94,95,96,2000,01 Free Software Foundation, Inc. This file is part of the GNU Hurd. @@ -51,13 +51,15 @@ trivfs_S_io_reauthenticate (struct trivfs_protid *cred, newright = ports_get_send_right (newcred); assert (newright != MACH_PORT_NULL); - newcred->user = iohelp_reauth (auth, rendport, newright, 1); - if (idvec_contains (newcred->user->uids, 0)) - newcred->isroot = 1; - + err = iohelp_reauth (&newcred->user, auth, rendport, newright, 1); mach_port_deallocate (mach_task_self (), rendport); - mach_port_deallocate (mach_task_self (), newright); mach_port_deallocate (mach_task_self (), auth); + if (err) + return err; + + mach_port_deallocate (mach_task_self (), newright); + if (idvec_contains (newcred->user->uids, 0)) + newcred->isroot = 1; newcred->hook = cred->hook; -- cgit v1.2.3