aboutsummaryrefslogtreecommitdiff
path: root/libtrivfs/open.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtrivfs/open.c')
-rw-r--r--libtrivfs/open.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/libtrivfs/open.c b/libtrivfs/open.c
index 4303ca74..f64d2ffd 100644
--- a/libtrivfs/open.c
+++ b/libtrivfs/open.c
@@ -1,6 +1,6 @@
/* Make a new trivfs peropen/protid
- Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994, 1995, 1996, 1999 Free Software Foundation, Inc.
This file is part of the GNU Hurd.
@@ -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)
@@ -55,20 +55,8 @@ trivfs_open (struct trivfs_control *cntl,
sizeof (struct trivfs_protid), &new);
if (! err)
{
- 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;
+ new->isroot = idvec_contains (user->uids, 0);
new->po = po;
new->hook = 0;