summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1995-03-30 17:32:05 +0000
committerMichael I. Bushnell <mib@gnu.org>1995-03-30 17:32:05 +0000
commite5355a620c885eac81404a39ae051d912ca54f77 (patch)
treef4b429017391bfce3f1e8745eb757c4110d0182b
parentf71f6b6bee22cd0a53d3a536ed1409d5910a0af2 (diff)
(trivfs_S_io_reauthenticate): Lock CRED->po->cntl->lock around
relevant code.
-rw-r--r--libtrivfs/io-reauthenticate.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libtrivfs/io-reauthenticate.c b/libtrivfs/io-reauthenticate.c
index 4adffab0..2f934810 100644
--- a/libtrivfs/io-reauthenticate.c
+++ b/libtrivfs/io-reauthenticate.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1993, 1994 Free Software Foundation
+ Copyright (C) 1993, 1994, 1995 Free Software Foundation
This file is part of the GNU Hurd.
@@ -76,9 +76,13 @@ trivfs_S_io_reauthenticate (struct trivfs_protid *cred,
newcred->ngids = gengidlen;
newcred->hook = cred->hook;
+ mutex_lock (&cred->po->cntl->lock);
+
newcred->po = cred->po;
newcred->po->refcnt++;
+ mutex_unlock (&cred->po->cntl->lock);
+
err = io_restrict_auth (newcred->po->cntl->underlying, &newcred->realnode,
gen_uids, genuidlen, gen_gids, gengidlen);
if (err)