1 /* SPDX-License-Identifier: LGPL-2.1-or-later */ 2 #pragma once 3 4 #include "sd-bus.h" 5 6 #include "manager.h" 7 8 int mac_selinux_access_check_internal(sd_bus_message *message, 9 const char *path, 10 const char *permission, 11 const char *function, 12 sd_bus_error *error); 13 14 #define mac_selinux_access_check(message, permission, error) \ 15 mac_selinux_access_check_internal((message), NULL, (permission), __func__, (error)) 16 17 #define mac_selinux_unit_access_check(unit, message, permission, error) \ 18 mac_selinux_access_check_internal((message), unit_label_path(unit), (permission), __func__, (error)) 19