chiark / gitweb /
virt: when detecting containers and /run/systemd/container cannot be read, check...
[elogind.git] / src / shared / acl-util.h
index 9f11636aa105b38e5780d1a77ce034b798624a10..a753ad14fdc24ad939c6f2b47493d1025abbaad5 100644 (file)
@@ -1,7 +1,6 @@
 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
 
-#ifndef fooaclutilhfoo
-#define fooaclutilhfoo
+#pragma once
 
 /***
   This file is part of systemd.
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <stdbool.h>
+
 int acl_find_uid(acl_t acl, uid_t uid, acl_entry_t *entry);
+int calc_acl_mask_if_needed(acl_t *acl_p);
+int search_acl_groups(char*** dst, const char* path, bool* belong);
+
+static inline void acl_freep(acl_t *acl) {
+
+        if (!*acl)
+                return;
 
-#endif
+        acl_free(*acl);
+}