summaryrefslogtreecommitdiff
path: root/libtrivfs
diff options
context:
space:
mode:
Diffstat (limited to 'libtrivfs')
-rw-r--r--libtrivfs/io-reauthenticate.c4
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));