diff options
author | Roland McGrath <roland@gnu.org> | 2001-06-16 20:21:47 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2001-06-16 20:21:47 +0000 |
commit | 93054f14cb52bfd576e4ecfdcf0bc1c468e4cbbf (patch) | |
tree | ee9c2bd4a038dab7f42a7107bcd7b0740f14fc2a /libtrivfs/io-reauthenticate.c | |
parent | 17d01fc816b86f11aa4c82b47ba9aba98463e7e8 (diff) |
2001-04-01 Neal H Walfield <neal@cs.uml.edu>
* 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.
Diffstat (limited to 'libtrivfs/io-reauthenticate.c')
-rw-r--r-- | libtrivfs/io-reauthenticate.c | 14 |
1 files changed, 8 insertions, 6 deletions
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; |