2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
11 #define _CM_ACLENT_H_ 1
15 #define CM_ACLENT_MAGIC ('A' | 'C' <<8 | 'L'<<16 | 'E'<<24)
18 * Structure to hold an acl entry for a cached file
20 typedef struct cm_aclent {
21 osi_queue_t q; /* for quick removal from LRUQ */
23 struct cm_aclent *nextp; /* next guy same vnode */
24 struct cm_scache *backp; /* back ptr to vnode */
25 struct cm_user *userp; /* user whose access is cached */
26 afs_uint32 randomAccess; /* watch for more rights in acl.h */
27 afs_uint32 tgtLifetime; /* time this expires */
30 extern osi_rwlock_t cm_aclLock;
32 extern long cm_InitACLCache(int newFile, long size);
34 extern long cm_FindACLCache(struct cm_scache *scp, struct cm_user *userp, afs_uint32 *rightsp);
36 static cm_aclent_t *GetFreeACLEnt(cm_scache_t * scp);
38 extern long cm_AddACLCache(struct cm_scache *scp, struct cm_user *userp, afs_uint32 rights);
40 extern void cm_FreeAllACLEnts(struct cm_scache *scp);
42 extern void cm_InvalidateACLUser(struct cm_scache *scp, struct cm_user *userp);
44 extern long cm_ValidateACLCache(void);
46 extern long cm_ShutdownACLCache(void);
48 extern void cm_ResetACLCache(cm_cell_t *cellp, cm_user_t *userp);
50 extern time_t cm_TGTLifeTime(cm_user_t *userp, afs_uint32 cellID);
52 #endif /* _CM_ACLENT_H_ */