1 /* SPDX-License-Identifier: LGPL-2.1+ */
5 #include <sys/socket.h>
11 bool mac_selinux_use(void);
12 void mac_selinux_retest(void);
14 int mac_selinux_init(void);
15 void mac_selinux_finish(void);
17 int mac_selinux_fix(const char *path, LabelFixFlags flags);
18 #if 0 /// UNNEEDED by elogind
19 int mac_selinux_apply(const char *path, const char *label);
21 int mac_selinux_get_create_label_from_exe(const char *exe, char **label);
22 int mac_selinux_get_our_label(char **label);
23 int mac_selinux_get_child_mls_label(int socket_fd, const char *exe, const char *exec_label, char **label);
25 char* mac_selinux_free(char *label);
27 int mac_selinux_create_file_prepare(const char *path, mode_t mode);
28 void mac_selinux_create_file_clear(void);
29 #if 0 /// UNNEEDED by elogind
31 int mac_selinux_create_socket_prepare(const char *label);
32 void mac_selinux_create_socket_clear(void);
34 int mac_selinux_bind(int fd, const struct sockaddr *addr, socklen_t addrlen);
37 DEFINE_TRIVIAL_CLEANUP_FUNC(char*, mac_selinux_free);