X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fselinux-util.h;h=a694441000b8bb9ce21cd16ae6b0d7ba85a0c72d;hb=ff6a74609b7c925834da1373d3adb9642ca51422;hp=4b8120274166bdfb5f826d1be08eeffd431c7c4d;hpb=cad45ba11ec3572296361f53f5852ffb97a97fa3;p=elogind.git diff --git a/src/shared/selinux-util.h b/src/shared/selinux-util.h index 4b8120274..a69444100 100644 --- a/src/shared/selinux-util.h +++ b/src/shared/selinux-util.h @@ -21,7 +21,28 @@ along with systemd; If not, see . ***/ +#include +#include #include -bool use_selinux(void); -void retest_selinux(void); +bool mac_selinux_use(void); +void mac_selinux_retest(void); + +int mac_selinux_init(const char *prefix); +void mac_selinux_finish(void); + +int mac_selinux_fix(const char *path, bool ignore_enoent, bool ignore_erofs); +int mac_selinux_apply(const char *path, const char *label); + +int mac_selinux_get_create_label_from_exe(const char *exe, char **label); +int mac_selinux_get_our_label(char **label); +int mac_selinux_get_child_mls_label(int socket_fd, const char *exe, const char *exec_label, char **label); +void mac_selinux_free(char *label); + +int mac_selinux_create_file_prepare(const char *path, mode_t mode); +void mac_selinux_create_file_clear(void); + +int mac_selinux_create_socket_prepare(const char *label); +void mac_selinux_create_socket_clear(void); + +int mac_selinux_bind(int fd, const struct sockaddr *addr, socklen_t addrlen);