X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fselinux-util.h;h=7ff8c607b4380766c078e0a08a234336c8f037bc;hb=592fd144ae313855f48d0ca52a103013b41e5d59;hp=4b8120274166bdfb5f826d1be08eeffd431c7c4d;hpb=f274ece0f76b5709408821e317e87aef76123db6;p=elogind.git diff --git a/src/shared/selinux-util.h b/src/shared/selinux-util.h index 4b8120274..7ff8c607b 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 *exec, 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);