From 5b0f97db93a76e2b6d99acb959071f60ca456d0c Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Wed, 13 Nov 1996 00:25:08 +0000 Subject: Thu Nov 7 01:01:05 1996 Thomas Bushnell, n/BSG * io-restrict-auth.c (trivfs_S_io_restrict_auth): Rewrite to use idvecs. Wed Nov 6 23:40:50 1996 Thomas Bushnell, n/BSG * trivfs.h (struct trivfs_protid): Delete members `uids', `gids', `nuids', and `ngids'. Replace with `user'. (trivfs_check_open_hook): Delete args `uids', `nuids', `gids', `ngids'. Replace with new arg `user'. All callers changed. (trivfs_open): Likewise. * open.c (trivfs_open): Change to match new declaration. * trivfs.h (struct trivfs_protid): Delete members `uids', `gids', * io-reauthenticate.c (trivfs_S_io_reauthenticate): Use new iohelp_reauth call. --- libtrivfs/open.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'libtrivfs/open.c') diff --git a/libtrivfs/open.c b/libtrivfs/open.c index 4303ca74..40665407 100644 --- a/libtrivfs/open.c +++ b/libtrivfs/open.c @@ -27,7 +27,7 @@ FLAGS. CNTL is the trivfs control object. */ error_t trivfs_open (struct trivfs_control *cntl, - uid_t *uids, unsigned num_uids, gid_t *gids, unsigned num_gids, + struct iouser *user, unsigned flags, mach_port_t realnode, struct trivfs_protid **cred) @@ -57,18 +57,9 @@ trivfs_open (struct trivfs_control *cntl, { int i; - new->isroot = 0; - for (i = 0; i < num_uids; i++) - if (uids[i] == 0) - new->isroot = 1; - - new->uids = malloc (num_uids * sizeof (uid_t)); - bcopy (uids, new->uids, num_uids * sizeof (uid_t)); - new->nuids = num_uids; - - new->gids = malloc (num_gids * sizeof (uid_t)); - bcopy (gids, new->gids, num_gids * sizeof (uid_t)); - new->ngids = num_gids; + new->user = user; + if (idvec_contains (user, 0)) + new->isroot = 1; new->po = po; new->hook = 0; -- cgit v1.2.3