summaryrefslogtreecommitdiff
path: root/libnetfs/trans-callback.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2001-06-16 20:23:29 +0000
committerRoland McGrath <roland@gnu.org>2001-06-16 20:23:29 +0000
commit0a746fb19a663f41794f4c6ed6e63d4c5ce714b4 (patch)
tree8a32333adeedb387dabadce6165358563ec61e7d /libnetfs/trans-callback.c
parent487bba2f0cd506b4a79e1d92184a5f80d827954f (diff)
2001-04-01 Neal H Walfield <neal@cs.uml.edu>
* dir-lookup.c (netfs_S_dir_lookup): Use iohelp_create_empty_iouser. Use iohelp_dup_iouser as per the new semantics. * dir-mkfile.c (netfs_S_dir_mkfile): Use iohelp_dup_iouser as per the new semantics. * file-exec.c (netfs_S_file_exec): Likewise. * file-reparent.c (netfs_S_file_reparent): Likewise. * fsys-getroot.c (netfs_S_fsys_getroot): Use iohelp_create_complex_iouser. * fsys-syncfs.c (netfs_S_fsys_syncfs): Use iohelp_create_simple_iouser. * io-duplicate.c (netfs_S_io_duplicate): Use iohelp_dup_iouser as per the new semantics. * io-reauthenticate.c (netfs_S_io_reauthenticate): Use iohelp_reauth as per the new semantics. * io-restric-auth.c (netfs_S_io_restric_auth): Use iohelp_create_complex_iouser. Check return values. * trans-callback.c (_netfs_transcallback2_fn): Use iohelp_create_simple_iouser.
Diffstat (limited to 'libnetfs/trans-callback.c')
-rw-r--r--libnetfs/trans-callback.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/libnetfs/trans-callback.c b/libnetfs/trans-callback.c
index 8452b005..fc844c30 100644
--- a/libnetfs/trans-callback.c
+++ b/libnetfs/trans-callback.c
@@ -1,6 +1,6 @@
/* Callback functions for starting translators
- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1995,96,97,2001 Free Software Foundation, Inc.
This file is part of the GNU Hurd.
@@ -51,17 +51,18 @@ _netfs_translator_callback2_fn (void *cookie1, void *cookie2, int flags,
mach_port_t *underlying,
mach_msg_type_name_t *underlying_type)
{
+ error_t err;
struct protid *cred;
- struct idvec *uids, *gids;
struct node *node = cookie1;
+ struct iouser *user;
- uids = make_idvec ();
- gids = make_idvec ();
- idvec_set_ids (uids, &node->nn_stat.st_uid, 1);
- idvec_set_ids (gids, &node->nn_stat.st_gid, 1);
+ err = iohelp_create_simple_iouser (&user, node->nn_stat.st_uid,
+ node->nn_stat.st_gid);
+ if (err)
+ return err;
cred = netfs_make_protid (netfs_make_peropen (node, flags, cookie2),
- iohelp_create_iouser (uids, gids));
+ user);
if (cred)
{
*underlying = ports_get_right (cred);