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
13 #define ACL_MAXNAME 100
17 * Character to use between name and rights in printed representation for
20 #define DFS_SEPARATOR ' '
22 typedef char sec_rgy_name_t[1025]; /* A DCE definition */
25 int dfs; /* Originally true if a dfs acl; now also the type
26 * of the acl (1, 2, or 3, corresponding to object,
27 * initial dir, or initial object). */
28 sec_rgy_name_t cell; /* DFS cell name */
31 struct AclEntry *pluslist;
32 struct AclEntry *minuslist;
36 struct AclEntry *next;
37 char name[ACL_MAXNAME];
42 * Mods for the AFS/DFS protocol translator.
44 * DFS rights. It's ugly to put these definitions here, but they
45 * *cannot* change, because they're part of the wire protocol.
46 * In any event, the protocol translator will guarantee these
47 * assignments for AFS cache managers.
50 #define DFS_WRITE 0x02
51 #define DFS_EXECUTE 0x04
52 #define DFS_CONTROL 0x08
53 #define DFS_INSERT 0x10
54 #define DFS_DELETE 0x20
56 /* the application definable ones (backwards from AFS) */
57 #define DFS_USR0 0x80000000 /* "A" bit */
58 #define DFS_USR1 0x40000000 /* "B" bit */
59 #define DFS_USR2 0x20000000 /* "C" bit */
60 #define DFS_USR3 0x10000000 /* "D" bit */
61 #define DFS_USR4 0x08000000 /* "E" bit */
62 #define DFS_USR5 0x04000000 /* "F" bit */
63 #define DFS_USR6 0x02000000 /* "G" bit */
64 #define DFS_USR7 0x01000000 /* "H" bit */
65 #define DFS_USRALL (DFS_USR0 | DFS_USR1 | DFS_USR2 | DFS_USR3 |\
66 DFS_USR4 | DFS_USR5 | DFS_USR6 | DFS_USR7)
68 /* added relative add resp. delete */
69 /* (so old add really means to set) */
70 enum rtype { add, destroy, deny, reladd, reldel };
72 extern void ZapList(struct AclEntry *alist);
74 extern void ZapAcl(struct Acl *acl);
76 extern int PruneList(struct AclEntry **ae, int dfs);
78 extern int CleanAcl(struct Acl *aa, char *cellname);
80 extern struct Acl *EmptyAcl(char *astr);
82 extern struct Acl *ParseAcl (char *astr, int astr_size);
84 extern char *AclToString(struct Acl *acl);
86 extern void ChangeList (struct Acl *al, afs_int32 plus, char *aname,
87 afs_int32 arights, enum rtype *artypep);
89 extern struct AclEntry *FindList (struct AclEntry *alist, char *aname);