From e666102220558dbb43210176129b3ea8245c578c Mon Sep 17 00:00:00 2001 From: Gary Tierney Date: Tue, 2 May 2017 17:42:19 +0100 Subject: Revert "selinux: split up mac_selinux_have() from mac_selinux_use()" This reverts commit 6355e75610a8d47fc3ba5ab8bd442172a2cfe574. The previously mentioned commit inadvertently broke a lot of SELinux related functionality for both unprivileged users and elogind instances running as MANAGER_USER. In particular, setting the correct SELinux context after a User= directive is used would fail to work since we attempt to set the security context after changing UID. Additionally, it causes activated socket units to be mislabeled for elogind --user processes since setsockcreatecon() would never be called. Reverting this fixes the issues with labeling outlined above, and reinstates SELinux access checks on unprivileged user services. --- src/basic/selinux-util.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/basic/selinux-util.h') diff --git a/src/basic/selinux-util.h b/src/basic/selinux-util.h index fa41a65f8..2a71afefa 100644 --- a/src/basic/selinux-util.h +++ b/src/basic/selinux-util.h @@ -26,7 +26,6 @@ #include "macro.h" bool mac_selinux_use(void); -bool mac_selinux_have(void); void mac_selinux_retest(void); int mac_selinux_init(void); -- cgit v1.2.3