Initial IBM OpenAFS 1.0 tree
[openafs.git] / src / WINNT / afsd / cm_aclent.h
1 /* 
2  * Copyright (C) 1998, 1989 Transarc Corporation - All rights reserved
3  *
4  * (C) COPYRIGHT IBM CORPORATION 1987, 1988
5  * LICENSED MATERIALS - PROPERTY OF IBM
6  *
7  *
8  */
9 /* Copyright (C) 1989, 1990, 1994 Transarc Corporation - All rights reserved */
10
11 #ifndef _CM_ACLENT_H_
12 #define _CM_ACLENT_H_   1
13
14 #include <osi.h>
15
16 #define cm_TGTLifeTime(x)       (0x7fffffff)
17
18 /*
19  * Structure to hold an acl entry for a cached file
20  */
21 typedef struct cm_aclent {
22     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     long randomAccess;          /* watch for more rights in acl.h */
27     long tgtLifetime;           /* time this expires */
28 } cm_aclent_t;
29
30 extern osi_rwlock_t cm_aclLock;
31
32 extern long cm_InitACLCache(long size);
33
34 extern long cm_FindACLCache(struct cm_scache *scp, struct cm_user *userp, long *rightsp);
35
36 static cm_aclent_t *GetFreeACLEnt(void);
37
38 extern long cm_AddACLCache(struct cm_scache *scp, struct cm_user *userp, long rights);
39
40 extern void cm_FreeAllACLEnts(struct cm_scache *scp);
41
42 extern void cm_InvalidateACLUser(struct cm_scache *scp, struct cm_user *userp);
43
44 #endif  /* _CM_ACLENT_H_ */