From e5355a620c885eac81404a39ae051d912ca54f77 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Thu, 30 Mar 1995 17:32:05 +0000 Subject: (trivfs_S_io_reauthenticate): Lock CRED->po->cntl->lock around relevant code. --- libtrivfs/io-reauthenticate.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libtrivfs') 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) -- cgit v1.2.3