]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
acl-util: define minimal types and constants even when acl support is disabled
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 2 Dec 2025 05:12:23 +0000 (14:12 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 9 Dec 2025 15:48:37 +0000 (00:48 +0900)
src/shared/acl-util.h

index b3c1bfa4f92abc1a6e9a44763e3fa368be4ec67a..ee46c575d013dd1fe8972a3e7631e66cf20a2bc0 100644 (file)
@@ -68,10 +68,27 @@ static inline int acl_set_perm(acl_permset_t ps, acl_perm_t p, bool b) {
 
 #else
 
+typedef void *acl_t;
+typedef int acl_tag_t;
+typedef unsigned acl_type_t;
+
 #define ACL_READ    0x04
 #define ACL_WRITE   0x02
 #define ACL_EXECUTE 0x01
 
+/* acl_tag_t */
+#define ACL_UNDEFINED_TAG       (0x00)
+#define ACL_USER_OBJ            (0x01)
+#define ACL_USER                (0x02)
+#define ACL_GROUP_OBJ           (0x04)
+#define ACL_GROUP               (0x08)
+#define ACL_MASK                (0x10)
+#define ACL_OTHER               (0x20)
+
+/* acl_type_t */
+#define ACL_TYPE_ACCESS         (0x8000)
+#define ACL_TYPE_DEFAULT        (0x4000)
+
 static inline int dlopen_libacl(void) {
         return -EOPNOTSUPP;
 }