From 1e156105080b6168f7fd22574dda6140dc5454de Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Mon, 18 Nov 1996 23:51:17 +0000 Subject: Mon Nov 18 17:06:39 1996 Thomas Bushnell, n/BSG * netfs.h (netfs_report_access): Return error_t. * file-check-access.c (netfs_S_file_check_access): Deal with errors from netfs_report_access. Sat Nov 16 17:17:50 1996 Thomas Bushnell, n/BSG * io-restrict-auth.c (netfs_S_io_restrict_auth): Fix several typos. * fsys-getroot.c (netfs_S_fsys_getroot): iohelp_make_iouser -> iohelp_create_iouser. New arg syntax for fshelp_fetch_root. Fri Nov 15 13:39:03 1996 Thomas Bushnell, n/BSG * netfs.h (struct protid): Replace member `credential' with `user' of new type. All uses of old `credential' member changed to use `user' member. Change all functions that used to take `struct netcred' args to take `struct iouser' args. All callers changed. (netfs_copy_credential, netfs_dropy_credential, netfs_make_credential): Delete functions. * dir-lookup.c (netfs_S_dir_lookup): netfs_copy_credential -> iohelp_dup_iouser. * dir-mkfile.c (netfs_S_dir_mkfile): Likewise. * file-exec.c (netfs_S_file_exec): Likewise. * io-duplicate.c (netfs_S_io_duplicate): Likewise. * release-protid.c (netfs_release_protid): netfs_drop_credential -> iohelp_free_iouser. * dir-lookup.c (netfs_S_dir_lookup): Omit uses of netfs_interpret_credential; do it with new structures. * file-exec.c (netfs_S_file_exec): Likewise. * file-getcontrol.c (netfs_S_file_getcontrol): Likewise. * file-set-translator.c (netfs_S_file_set_translator): Likewise; using fshelp_isowner for permission check. * io-restrict-auth.c (netfs_S_io_restrict_auth): Likewise; guts rewritten. * dir-lookup.c (netfs_S_dir_lookup): netfs_make_credential -> iohelp_make_iouser. * fsys-getroot.c (netfs_S_fsys_getroot): Likewise. * fsys-syncfs.c (netfs_S_fsys_syncfs): Likewise. * io-reauthenticate.c (netfs_S_io_reauthenticate): Use iohelp_reauth instead of doing it by hand. --- libnetfs/file-exec.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'libnetfs/file-exec.c') diff --git a/libnetfs/file-exec.c b/libnetfs/file-exec.c index 7268e7c7..1409fd63 100644 --- a/libnetfs/file-exec.c +++ b/libnetfs/file-exec.c @@ -73,7 +73,7 @@ netfs_S_file_exec (struct protid *cred, mode = np->nn_stat.st_mode; uid = np->nn_stat.st_uid; gid = np->nn_stat.st_gid; - err = netfs_validate_stat (np, cred->credential); + err = netfs_validate_stat (np, cred->user); mutex_unlock (&np->lock); if (err) @@ -94,17 +94,11 @@ netfs_S_file_exec (struct protid *cred, error_t get_file_ids (struct idvec *uidsvec, struct idvec *gidsvec) { error_t err; - uid_t *uids, *gids; - int nuids, ngids; - netfs_interpret_credential (cred->credential, &uids, &nuids, - &gids, &ngids); - - err = idvec_merge_ids (uidsvec, uids, nuids); + err = idvec_merge (uidsvec, cred->user->uids); if (! err) - err = idvec_merge_ids (gidsvec, gids, ngids); - free (uids); - free (gids); + err = idvec_merge (gidsvec, cred->user->gids); + return err; } err = @@ -130,7 +124,7 @@ netfs_S_file_exec (struct protid *cred, struct protid *newpi = netfs_make_protid (netfs_make_peropen (np, O_READ, cred->po->dotdotport), - netfs_copy_credential (cred->credential)); + iohelp_dup_iouser (cred->user)); err = exec_exec (_netfs_exec, ports_get_right (newpi), MACH_MSG_TYPE_MAKE_SEND, -- cgit v1.2.3