summaryrefslogtreecommitdiff
path: root/libtrivfs/protid-dup.c
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1996-11-18 23:55:58 +0000
committerThomas Bushnell <thomas@gnu.org>1996-11-18 23:55:58 +0000
commite7c792104650598a20172427df71c76fff36659d (patch)
treefd06516e96e8da9bbe1a40844a8beff95f7576e1 /libtrivfs/protid-dup.c
parent1a10b3582fd24d7ac8b70e3ad610d8a7fccaf3c6 (diff)
Mon Nov 18 18:13:42 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* io-stat.c (trivfs_S_io_stat): Make the mode specify IFCHR by default. Sat Nov 16 17:20:15 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * Makefile (HURDLIBS): Add `iohelp'. Thu Nov 14 13:13:10 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * io-restrict-auth.c (trivfs_S_io_restrict_auth): idvec_set -> idvec_set_ids. Fix unrelated typos. * protid-dup.c (trivfs_protid_dup): Use iouser_dup_iouser instead of copying old arrays by hand. * protid-clean.c (trivfs_clean_protid): Free CRED->user instead of CRED->uids and CRED->gids. * io-reauthenticate.c (trivfs_S_io_reauthenticate): Args for io_restrict_auth now come from the new structure definitions. * open.c (trivfs_open): Pass correct first arg to idvec_contains. * open.c (trivfs_open): Delete variable I. * trivfs.h: Include <hurd/iohelp.h>
Diffstat (limited to 'libtrivfs/protid-dup.c')
-rw-r--r--libtrivfs/protid-dup.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/libtrivfs/protid-dup.c b/libtrivfs/protid-dup.c
index 0aa62dbf..097ab55b 100644
--- a/libtrivfs/protid-dup.c
+++ b/libtrivfs/protid-dup.c
@@ -1,6 +1,6 @@
/* Duplicate a protid
- Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU Hurd.
@@ -42,13 +42,7 @@ trivfs_protid_dup (struct trivfs_protid *cred, struct trivfs_protid **dup)
new->isroot = cred->isroot;
- new->uids = malloc (cred->nuids * sizeof (uid_t));
- bcopy (cred->uids, new->uids, cred->nuids * sizeof (uid_t));
- new->nuids = cred->nuids;
-
- new->gids = malloc (cred->ngids * sizeof (gid_t));
- bcopy (cred->gids, new->gids, cred->ngids * sizeof (uid_t));
- new->ngids = cred->ngids;
+ new->user = iohelp_dup_iouser (cred->user);
new->realnode = cred->realnode;
mach_port_mod_refs (mach_task_self (), new->realnode,