From d166b71e90f48d7b555b7768335d3f774219487e Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Tue, 19 Dec 1995 18:56:08 +0000 Subject: entered into RCS --- libnetfs/io-restrict-auth.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libnetfs/io-restrict-auth.c') diff --git a/libnetfs/io-restrict-auth.c b/libnetfs/io-restrict-auth.c index 2190f8de..1a175a35 100644 --- a/libnetfs/io-restrict-auth.c +++ b/libnetfs/io-restrict-auth.c @@ -18,7 +18,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ -#include "priv.h" +#include "netfs.h" #include "io_S.h" static inline int @@ -47,7 +47,8 @@ netfs_S_io_restrict_auth (struct protid *user, if (!user) return EOPNOTSUPP; - netfs_interpret_credential (user->credenital, &olduids, &oldnuids, + mutex_lock (&user->po->np->lock); + netfs_interpret_credential (user->credential, &olduids, &oldnuids, &oldgids, &oldngids); newuids = alloca (sizeof (uid_t) * oldnuids); newgids = alloca (sizeof (gid_t) * oldngids); @@ -58,12 +59,11 @@ netfs_S_io_restrict_auth (struct protid *user, if (listmember (gids, oldgids[i], ngids)) newgids[newngids++] = oldgids[i]; - mutex_lock (&cred->po->np->lock); newpi = netfs_make_protid (user->po, netfs_make_credential (newuids, newnuids, newgids, newngids)); *newport = ports_get_right (newpi); - mutex_unlock (&cred->po->np->lock); + mutex_unlock (&user->po->np->lock); *newporttype = MACH_MSG_TYPE_MAKE_SEND; ports_port_deref (newpi); -- cgit v1.2.3