diff options
author | Miles Bader <miles@gnu.org> | 1996-07-18 23:40:35 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-07-18 23:40:35 +0000 |
commit | 69d6686c411c7cb2dafeafd909559842ff3cd74d (patch) | |
tree | 610a241016d03a4808fe4ff19c02ed290ec0185c /libtrivfs | |
parent | f38b81d87dc776895f38f28be68de521ea2b2c5d (diff) |
(trivfs_S_io_reauthenticate):
Hold GLOBAL_LOCK while we're setting up the new port.
Diffstat (limited to 'libtrivfs')
-rw-r--r-- | libtrivfs/io-reauthenticate.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libtrivfs/io-reauthenticate.c b/libtrivfs/io-reauthenticate.c index 13584796..10e32481 100644 --- a/libtrivfs/io-reauthenticate.c +++ b/libtrivfs/io-reauthenticate.c @@ -48,6 +48,8 @@ trivfs_S_io_reauthenticate (struct trivfs_protid *cred, aux_uids = aubuf; aux_gids = agbuf; + mutex_lock (&global_lock); + do err = ports_create_port (cred->po->cntl->protid_class, cred->po->cntl->protid_bucket, @@ -124,6 +126,8 @@ trivfs_S_io_reauthenticate (struct trivfs_protid *cred, /* Signal that the user destroy hook shouldn't be called on NEWCRED. */ newcred->realnode = MACH_PORT_NULL; + mutex_unlock (&global_lock); + if (gubuf != gen_uids) vm_deallocate (mach_task_self (), (u_int) gen_uids, genuidlen * sizeof (uid_t)); |