5755933 [rkeene@sledge /home/rkeene/devel/cygwin-stuff/cyg-root/usr/include/cygwin]$ cat -n acl.h
 1 /* cygwin/acl.h header file for Cygwin.
 2 
 3    Copyright 1999, 2000 Cygnus Solutions.
 4    Written by C. Vinschen.
 5 
 6 This file is part of Cygwin.
 7 
 8 This software is a copyrighted work licensed under the terms of the
 9 Cygwin license.  Please consult the file "CYGWIN_LICENSE" for
10 details. */
11 
12 #ifndef _CYGWIN_ACL_H
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 #define _CYGWIN_ACL_H
17 
18 #include <_ansi.h>
19 
20 #include <sys/types.h>
21 #include <sys/stat.h>
22 
23 /* Values for `cmd' in calls to acl(2) and facl(2) */
24 #define SETACL          (0x0)
25 #define GETACL          (0x1)
26 #define GETACLCNT       (0x2)
27 
28 #define MIN_ACL_ENTRIES (4)    // minimal acl entries from GETACLCNT
29 #define MAX_ACL_ENTRIES (256)  // max entries of each type
30 
31 // Return values of aclcheck(3) in case of error */
32 #define GRP_ERROR       (0x1)
33 #define USER_ERROR      (0x2)
34 #define CLASS_ERROR     (0x3)
35 #define OTHER_ERROR     (0x4)
36 #define DUPLICATE_ERROR (0x5)
37 #define ENTRY_ERROR     (0x6)
38 #define MISS_ERROR      (0x7) // which = -1
39 #define MEM_ERROR       (0x8) // which = -1
40 
41 // Values for entry type of struct acl
42 #define USER_OBJ        (0x0001)                // owner
43 #define USER            (0x0002)                // additional user
44 #define GROUP_OBJ       (0x0004)                // owning group
45 #define GROUP           (0x0008)                // additional group
46 #define CLASS_OBJ       (0x0010)                // mask entry
47 #define OTHER_OBJ       (0x0020)                // others
48 #define ACL_DEFAULT     (0x1000)                // default flag
49 #define DEF_USER_OBJ    (ACL_DEFAULT|USER_OBJ)  // default owner
50 #define DEF_USER        (ACL_DEFAULT|USER)      // default additional user
51 #define DEF_GROUP_OBJ   (ACL_DEFAULT|GROUP_OBJ) // default owning group
52 #define DEF_GROUP       (ACL_DEFAULT|GROUP)     // default additional group
53 #define DEF_CLASS_OBJ   (ACL_DEFAULT|CLASS_OBJ) // default mask entry
54 #define DEF_OTHER_OBJ   (ACL_DEFAULT|OTHER_OBJ) // default others
55 // Values with equivalent meanings
56 #define USER_OWNER      USER_OBJ
57 #define GROUP_OWNER     GROUP_OBJ
58 #define MASK            CLASS_OBJ
59 #define OTHER           OTHER_OBJ
60 
61 typedef struct acl {
62     int      a_type;    /* entry type */
63     uid_t    a_id;      /* UID | GID  */
64     mode_t   a_perm;    /* permissions */
65 } aclent_t;
66 
67 int _EXFUN(acl,(const char *path, int cmd, int nentries, aclent_t *aclbufp));
68 int _EXFUN(lacl,(const char *path, int cmd, int nentries, aclent_t *aclbufp));
69 int _EXFUN(facl,(int fd, int cmd, int nentries, aclent_t *aclbufp));
70 int _EXFUN(aclcheck,(aclent_t *aclbufp, int nentries, int *which));
71 int _EXFUN(aclsort,(int nentries, int calclass, aclent_t *aclbufp));
72 int _EXFUN(acltomode,(aclent_t *aclbufp, int nentries, mode_t *modep));
73 int _EXFUN(aclfrommode,(aclent_t *aclbufp, int nentries, mode_t *modep));
74 int _EXFUN(acltopbits,(aclent_t *aclbufp, int nentries, mode_t *pbitsp));
75 int _EXFUN(aclfrompbits,(aclent_t *aclbufp, int nentries, mode_t *pbitsp));
76 char *_EXFUN(acltotext,(aclent_t *aclbufp, int aclcnt));
77 aclent_t *_EXFUN(aclfromtext,(char *acltextp, int *aclcnt));
78 
79 #ifdef __cplusplus
80 }
81 #endif
82 #endif /* _CYGWIN_ACL_H */
5755934 [rkeene@sledge /home/rkeene/devel/cygwin-stuff/cyg-root/usr/include/cygwin]$

Click here to go back to the directory listing.
Click here to download this file.
last modified: 2001-01-31 15:09:09