OpenAFS
OpenAFS distributed network file system
|
00001 /* 00002 * Copyright 2000, International Business Machines Corporation and others. 00003 * All Rights Reserved. 00004 * 00005 * This software has been released under the terms of the IBM Public 00006 * License. For details, see the LICENSE file in the top-level source 00007 * directory or online at http://www.openafs.org/dl/license10.html 00008 */ 00009 00010 #ifndef _CM_ACLENT_H_ 00011 #define _CM_ACLENT_H_ 1 00012 00013 #include <osi.h> 00014 00015 #define CM_ACLENT_MAGIC ('A' | 'C' <<8 | 'L'<<16 | 'E'<<24) 00016 00017 /* 00018 * Structure to hold an acl entry for a cached file 00019 */ 00020 typedef struct cm_aclent { 00021 osi_queue_t q; /* for quick removal from LRUQ */ 00022 afs_uint32 magic; 00023 struct cm_aclent *nextp; /* next guy same vnode */ 00024 struct cm_scache *backp; /* back ptr to vnode */ 00025 struct cm_user *userp; /* user whose access is cached */ 00026 afs_uint32 randomAccess; /* watch for more rights in acl.h */ 00027 afs_uint32 tgtLifetime; /* time this expires */ 00028 } cm_aclent_t; 00029 00030 extern osi_rwlock_t cm_aclLock; 00031 00032 extern long cm_InitACLCache(int newFile, long size); 00033 00034 extern long cm_FindACLCache(struct cm_scache *scp, struct cm_user *userp, afs_uint32 *rightsp); 00035 00036 static cm_aclent_t *GetFreeACLEnt(cm_scache_t * scp); 00037 00038 extern long cm_AddACLCache(struct cm_scache *scp, struct cm_user *userp, afs_uint32 rights); 00039 00040 extern void cm_FreeAllACLEnts(struct cm_scache *scp); 00041 00042 extern void cm_InvalidateACLUser(struct cm_scache *scp, struct cm_user *userp); 00043 00044 extern long cm_ValidateACLCache(void); 00045 00046 extern long cm_ShutdownACLCache(void); 00047 00048 extern void cm_ResetACLCache(cm_cell_t *cellp, cm_user_t *userp); 00049 00050 extern time_t cm_TGTLifeTime(cm_user_t *userp, afs_uint32 cellID); 00051 00052 #endif /* _CM_ACLENT_H_ */