aboutsummaryrefslogtreecommitdiff
path: root/libtrivfs/open.c
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1996-11-13 00:25:08 +0000
committerThomas Bushnell <thomas@gnu.org>1996-11-13 00:25:08 +0000
commit5b0f97db93a76e2b6d99acb959071f60ca456d0c (patch)
treee3afaa02ddd81ed4e2ec8a5717f19b034453f83a /libtrivfs/open.c
parentae63ea3f8d3d677a5d47ca8d7cc46137e947030e (diff)
downloadhurd-5b0f97db93a76e2b6d99acb959071f60ca456d0c.tar.gz
hurd-5b0f97db93a76e2b6d99acb959071f60ca456d0c.tar.bz2
hurd-5b0f97db93a76e2b6d99acb959071f60ca456d0c.zip
Thu Nov 7 01:01:05 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* io-restrict-auth.c (trivfs_S_io_restrict_auth): Rewrite to use idvecs. Wed Nov 6 23:40:50 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * 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.
Diffstat (limited to 'libtrivfs/open.c')
-rw-r--r--libtrivfs/open.c17
1 files changed, 4 insertions, 13 deletions
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;