Commit | Line | Data |
---|---|---|
805e021f CE |
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 _PTPROTOTYPES_H_ | |
11 | #define _PTPROTOTYPES_H_ | |
12 | ||
13 | /* utils.c */ | |
14 | #if defined(SUPERGROUPS) | |
15 | extern afs_int32 IsAMemberOfSG(struct ubik_trans *at, afs_int32 aid, | |
16 | afs_int32 gid, afs_int32 depth) ; | |
17 | #endif /* SUPERGROUPS */ | |
18 | ||
19 | /* ptutils.c */ | |
20 | #ifdef SUPERGROUPS | |
21 | extern afs_int32 AddToSGEntry(struct ubik_trans *tt, struct prentry *entry, | |
22 | afs_int32 loc, afs_int32 aid); | |
23 | extern afs_int32 GetSGList(struct ubik_trans *at, struct prentry *tentry, | |
24 | prlist *alist); | |
25 | extern afs_int32 RemoveFromSGEntry(struct ubik_trans *at, afs_int32 aid, | |
26 | afs_int32 bid); | |
27 | extern void pt_hook_write(void); | |
28 | #endif | |
29 | ||
30 | extern afs_int32 NameHash(unsigned char *aname); | |
31 | extern afs_int32 pr_Write(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos, | |
32 | void *buff, afs_int32 len); | |
33 | extern afs_int32 pr_Read(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos, | |
34 | void *buff, afs_int32 len); | |
35 | extern int pr_WriteEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos, | |
36 | struct prentry *tentry); | |
37 | extern int pr_ReadEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos, | |
38 | struct prentry *tentry); | |
39 | extern int pr_WriteCoEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos, | |
40 | struct contentry *tentry); | |
41 | extern int pr_ReadCoEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos, | |
42 | struct contentry *tentry); | |
43 | extern afs_int32 AllocBlock(struct ubik_trans *at); | |
44 | extern afs_int32 FreeBlock(struct ubik_trans *at, afs_int32 pos); | |
45 | extern afs_int32 FindByID(struct ubik_trans *at, afs_int32 aid); | |
46 | extern afs_int32 FindByName(struct ubik_trans *at, | |
47 | char aname[PR_MAXNAMELEN], struct prentry *tentryp); | |
48 | extern afs_int32 AllocID(struct ubik_trans *at, afs_int32 flag, | |
49 | afs_int32 *aid); | |
50 | extern afs_int32 IDToName(struct ubik_trans *at, afs_int32 aid, | |
51 | char aname[PR_MAXNAMELEN]); | |
52 | extern afs_int32 NameToID(struct ubik_trans *at, | |
53 | char aname[PR_MAXNAMELEN], afs_int32 *aid); | |
54 | extern int IDCmp(const void *a, const void *b); | |
55 | extern afs_int32 RemoveFromIDHash(struct ubik_trans *tt, afs_int32 aid, | |
56 | afs_int32 *loc); | |
57 | extern afs_int32 AddToIDHash(struct ubik_trans *tt, afs_int32 aid, | |
58 | afs_int32 loc); | |
59 | extern afs_int32 RemoveFromNameHash(struct ubik_trans *tt, char *aname, | |
60 | afs_int32 *loc); | |
61 | extern afs_int32 AddToNameHash(struct ubik_trans *tt, char *aname, | |
62 | afs_int32 loc); | |
63 | extern afs_int32 AddToOwnerChain(struct ubik_trans *at, afs_int32 gid, | |
64 | afs_int32 oid); | |
65 | extern afs_int32 RemoveFromOwnerChain(struct ubik_trans *at, afs_int32 gid, | |
66 | afs_int32 oid); | |
67 | extern afs_int32 AddToOrphan(struct ubik_trans *at, afs_int32 gid); | |
68 | extern afs_int32 RemoveFromOrphan(struct ubik_trans *at, afs_int32 gid); | |
69 | extern afs_int32 IsOwnerOf(struct ubik_trans *at, afs_int32 aid, afs_int32 gid); | |
70 | extern afs_int32 OwnerOf(struct ubik_trans *at, afs_int32 gid); | |
71 | extern afs_int32 IsAMemberOf(struct ubik_trans *at, afs_int32 aid, | |
72 | afs_int32 gid); | |
73 | ||
74 | /* ptutils.c */ | |
75 | extern afs_int32 AddToEntry(struct ubik_trans *tt, struct prentry *entry, | |
76 | afs_int32 loc, afs_int32 aid); | |
77 | extern int AccessOK(struct ubik_trans *ut, afs_int32 cid, | |
78 | struct prentry *tentry, int mem, int any); | |
79 | extern afs_int32 CreateEntry(struct ubik_trans *at, char aname[], | |
80 | afs_int32 *aid, afs_int32 idflag, | |
81 | afs_int32 flag, afs_int32 oid, afs_int32 creator); | |
82 | extern afs_int32 RemoveFromEntry(struct ubik_trans *at, afs_int32 aid, | |
83 | afs_int32 bid); | |
84 | extern afs_int32 DeleteEntry(struct ubik_trans *at, struct prentry *tentry, | |
85 | afs_int32 loc); | |
86 | extern afs_int32 GetList(struct ubik_trans *at, struct prentry *tentry, | |
87 | prlist *alist, afs_int32 add); | |
88 | extern afs_int32 GetList2(struct ubik_trans *at, struct prentry *tentry, | |
89 | struct prentry *tentry2, prlist *alist, | |
90 | afs_int32 add); | |
91 | extern afs_int32 GetMax(struct ubik_trans *at, afs_int32 *uid, afs_int32 *gid); | |
92 | extern afs_int32 SetMax(struct ubik_trans *at, afs_int32 id, afs_int32 flag); | |
93 | extern afs_int32 ChangeEntry(struct ubik_trans *at, afs_int32 aid, | |
94 | afs_int32 cid, char *name, afs_int32 oid, | |
95 | afs_int32 newid); | |
96 | extern afs_int32 GetOwnedChain(struct ubik_trans *ut, afs_int32 *next, | |
97 | prlist *alist); | |
98 | extern afs_int32 AddToPRList(prlist *alist, int *sizeP, afs_int32 id); | |
99 | extern afs_int32 read_DbHeader(struct ubik_trans *tt); | |
100 | extern afs_int32 Initdb(void); | |
101 | ||
102 | /* ptuser.c */ | |
103 | ||
104 | /* All ptuser prototypes are in ptuser.h - for public consumption ... */ | |
105 | ||
106 | #endif |