]> git.sesse.net Git - bcachefs-tools-debian/blob - include/linux/posix_acl.h
rust: bump rpassword to v7.x
[bcachefs-tools-debian] / include / linux / posix_acl.h
1 /*
2   File: linux/posix_acl.h
3
4   (C) 2002 Andreas Gruenbacher, <a.gruenbacher@computer.org>
5 */
6
7
8 #ifndef __LINUX_POSIX_ACL_H
9 #define __LINUX_POSIX_ACL_H
10
11 #include <linux/bug.h>
12 #include <linux/slab.h>
13 #include <linux/rcupdate.h>
14
15 #define ACL_UNDEFINED_ID        (-1)
16
17 /* a_type field in acl_user_posix_entry_t */
18 #define ACL_TYPE_ACCESS         (0x8000)
19 #define ACL_TYPE_DEFAULT        (0x4000)
20
21 /* e_tag entry in struct posix_acl_entry */
22 #define ACL_USER_OBJ            (0x01)
23 #define ACL_USER                (0x02)
24 #define ACL_GROUP_OBJ           (0x04)
25 #define ACL_GROUP               (0x08)
26 #define ACL_MASK                (0x10)
27 #define ACL_OTHER               (0x20)
28
29 /* permissions in the e_perm field */
30 #define ACL_READ                (0x04)
31 #define ACL_WRITE               (0x02)
32 #define ACL_EXECUTE             (0x01)
33
34 struct posix_acl_entry {
35         short                   e_tag;
36         unsigned short          e_perm;
37         union {
38                 uid_t           e_uid;
39                 gid_t           e_gid;
40         };
41 };
42
43 struct posix_acl {
44         struct rcu_head         a_rcu;
45         unsigned int            a_count;
46         struct posix_acl_entry  a_entries[0];
47 };
48
49 #endif  /* __LINUX_POSIX_ACL_H */