chiark / gitweb /
tests: add tests for environment serialization
[elogind.git] / src / basic / selinux-util.c
index 021041cbdccd195558bebe2111b9b1b6cb5850a6..41c8297f9b53e6aa9a54b60b6a9ebd65988bad2a 100644 (file)
@@ -50,7 +50,7 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(context_t, context_free);
 static int cached_use = -1;
 static struct selabel_handle *label_hnd = NULL;
 
-#define log_enforcing(...) log_full(security_getenforce() == 1 ? LOG_ERR : LOG_DEBUG, __VA_ARGS__)
+#define log_enforcing(...) log_full_errno(security_getenforce() == 1 ? LOG_ERR : LOG_DEBUG, errno, __VA_ARGS__)
 #endif
 
 bool mac_selinux_have(void) {
@@ -74,13 +74,11 @@ bool mac_selinux_use(void) {
         return getuid() == 0;
 }
 
-#if 0 /// UNNEEDED by elogind
 void mac_selinux_retest(void) {
 #ifdef HAVE_SELINUX
         cached_use = -1;
 #endif
 }
-#endif // 0
 
 int mac_selinux_init(void) {
         int r = 0;
@@ -120,7 +118,6 @@ int mac_selinux_init(void) {
         return r;
 }
 
-#if 0 /// UNNEEDED by elogind
 void mac_selinux_finish(void) {
 
 #ifdef HAVE_SELINUX
@@ -131,7 +128,6 @@ void mac_selinux_finish(void) {
         label_hnd = NULL;
 #endif
 }
-#endif // 0
 
 int mac_selinux_fix(const char *path, bool ignore_enoent, bool ignore_erofs) {