import-fs-formatting-to-windows-20031207
[openafs.git] / src / WINNT / afsd / cm_aclent.h
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
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
8  */
9
10 #ifndef _CM_ACLENT_H_
11 #define _CM_ACLENT_H_   1
12
13 #include <osi.h>
14
15 #define cm_TGTLifeTime(x)       (0x7fffffff)
16
17 /*
18  * Structure to hold an acl entry for a cached file
19  */
20 typedef struct cm_aclent {
21     osi_queue_t q;              /* for quick removal from LRUQ */
22     struct cm_aclent *nextp;    /* next guy same vnode */
23     struct cm_scache *backp;    /* back ptr to vnode */
24     struct cm_user *userp;      /* user whose access is cached */
25     long randomAccess;          /* watch for more rights in acl.h */
26     long tgtLifetime;           /* time this expires */
27 } cm_aclent_t;
28
29 extern osi_rwlock_t cm_aclLock;
30
31 extern long cm_InitACLCache(long size);
32
33 extern long cm_FindACLCache(struct cm_scache *scp, struct cm_user *userp, long *rightsp);
34
35 static cm_aclent_t *GetFreeACLEnt(void);
36
37 extern long cm_AddACLCache(struct cm_scache *scp, struct cm_user *userp, long rights);
38
39 extern void cm_FreeAllACLEnts(struct cm_scache *scp);
40
41 extern void cm_InvalidateACLUser(struct cm_scache *scp, struct cm_user *userp);
42
43 #endif  /* _CM_ACLENT_H_ */