From 69d6686c411c7cb2dafeafd909559842ff3cd74d Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 18 Jul 1996 23:40:35 +0000 Subject: (trivfs_S_io_reauthenticate): Hold GLOBAL_LOCK while we're setting up the new port. --- libtrivfs/io-reauthenticate.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libtrivfs/io-reauthenticate.c') 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)); -- cgit v1.2.3