1 /* SPDX-License-Identifier: LGPL-2.1+ */
5 This file is part of systemd.
7 Copyright 2011 Lennart Poettering
12 #include <acl/libacl.h>
18 int acl_find_uid(acl_t acl, uid_t uid, acl_entry_t *entry);
19 #if 0 /// UNNEEDED by elogind
20 int calc_acl_mask_if_needed(acl_t *acl_p);
21 int add_base_acls_if_needed(acl_t *acl_p, const char *path);
22 int acl_search_groups(const char* path, char ***ret_groups);
23 int parse_acl(const char *text, acl_t *acl_access, acl_t *acl_default, bool want_mask);
24 int acls_for_file(const char *path, acl_type_t type, acl_t new, acl_t *acl);
25 int add_acls_for_user(int fd, uid_t uid);
28 /* acl_free takes multiple argument types.
29 * Multiple cleanup functions are necessary. */
30 DEFINE_TRIVIAL_CLEANUP_FUNC(acl_t, acl_free);
31 #define acl_free_charp acl_free
32 DEFINE_TRIVIAL_CLEANUP_FUNC(char*, acl_free_charp);
33 #define acl_free_uid_tp acl_free
34 DEFINE_TRIVIAL_CLEANUP_FUNC(uid_t*, acl_free_uid_tp);
35 #define acl_free_gid_tp acl_free
36 DEFINE_TRIVIAL_CLEANUP_FUNC(gid_t*, acl_free_gid_tp);