windows-reset-acl-list-20081017
authorJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 18 Oct 2008 05:44:51 +0000 (05:44 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 18 Oct 2008 05:44:51 +0000 (05:44 +0000)
LICENSE MIT

Move definition of cm_ResetACLCache from cm_ioctl.c to cm_aclent.c

src/WINNT/afsd/cm_aclent.c
src/WINNT/afsd/cm_aclent.h
src/WINNT/afsd/cm_ioctl.c
src/WINNT/afsd/cm_ioctl.h

index c2138ed..9182b9a 100644 (file)
@@ -337,3 +337,29 @@ void cm_InvalidateACLUser(cm_scache_t *scp, cm_user_t *userp)
     }
     lock_ReleaseWrite(&cm_aclLock);
 }
+
+/*
+ * Invalidate ACL info for a user that has just        obtained or lost tokens.
+ */
+void 
+cm_ResetACLCache(cm_user_t *userp)
+{
+    cm_scache_t *scp;
+    int hash;
+
+    lock_ObtainWrite(&cm_scacheLock);
+    for (hash=0; hash < cm_data.scacheHashTableSize; hash++) {
+        for (scp=cm_data.scacheHashTablep[hash]; scp; scp=scp->nextp) {
+            cm_HoldSCacheNoLock(scp);
+            lock_ReleaseWrite(&cm_scacheLock);
+            lock_ObtainWrite(&scp->rw);
+            cm_InvalidateACLUser(scp, userp);
+            lock_ReleaseWrite(&scp->rw);
+            lock_ObtainWrite(&cm_scacheLock);
+            cm_ReleaseSCacheNoLock(scp);
+        }
+    }
+    lock_ReleaseWrite(&cm_scacheLock);
+}       
+
+
index 1116930..27e0ec3 100644 (file)
@@ -47,4 +47,6 @@ extern long cm_ValidateACLCache(void);
 
 extern long cm_ShutdownACLCache(void);
 
+extern void cm_ResetACLCache(cm_user_t *userp);
+
 #endif  /* _CM_ACLENT_H_ */
index f9d9266..1d78f0c 100644 (file)
@@ -169,31 +169,6 @@ cm_FlushVolume(cm_user_t *userp, cm_req_t *reqp, afs_uint32 cell, afs_uint32 vol
 }
 
 /*
- * Utility function.  Used within this file.
- * Invalidate ACL info for a user that has just        obtained or lost tokens.
- */
-void 
-cm_ResetACLCache(cm_user_t *userp)
-{
-    cm_scache_t *scp;
-    int hash;
-
-    lock_ObtainWrite(&cm_scacheLock);
-    for (hash=0; hash < cm_data.scacheHashTableSize; hash++) {
-        for (scp=cm_data.scacheHashTablep[hash]; scp; scp=scp->nextp) {
-            cm_HoldSCacheNoLock(scp);
-            lock_ReleaseWrite(&cm_scacheLock);
-            lock_ObtainWrite(&scp->rw);
-            cm_InvalidateACLUser(scp, userp);
-            lock_ReleaseWrite(&scp->rw);
-            lock_ObtainWrite(&cm_scacheLock);
-            cm_ReleaseSCacheNoLock(scp);
-        }
-    }
-    lock_ReleaseWrite(&cm_scacheLock);
-}       
-
-/*
  *  TranslateExtendedChars - This is a fix for TR 54482.
  *
  *  If an extended character (80 - FF) is entered into a file
index 1a327eb..66c7cc2 100644 (file)
@@ -141,8 +141,6 @@ extern const int  utf8_prefix_size;
 
 extern void cm_InitIoctl(void);
 
-extern void cm_ResetACLCache(cm_user_t *userp);
-
 extern cm_ioctlQueryOptions_t *
 cm_IoctlGetQueryOptions(struct cm_ioctl *ioctlp, struct cm_user *userp);