]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
lock-client-around-acl-checkrights-20050618
authorDerrick Brashear <shadow@dementia.org>
Sun, 19 Jun 2005 00:22:31 +0000 (00:22 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sun, 19 Jun 2005 00:22:31 +0000 (00:22 +0000)
FIXES 1345

one of the like 3 crashes there. thanks love

src/viced/afsfileprocs.c

index 4dab214e3f69151fec2a78e103846dcc55acd8f0..6dfb139aa192f8f4e64594cf770689356f984bd8 100644 (file)
@@ -594,7 +594,10 @@ GetRights(struct client *client, struct acl_accessList *ACL,
        *anyrights = 0;
     }
     *rights = 0;
+
+    ObtainWriteLock(&client->lock);
     acl_CheckRights(ACL, &client->CPS, rights);
+    ReleaseWriteLock(&client->lock);
 
     /* wait if somebody else is already doing the getCPS call */
     H_LOCK;