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) {
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;
return r;
}
-#if 0 /// UNNEEDED by elogind
void mac_selinux_finish(void) {
#ifdef HAVE_SELINUX
label_hnd = NULL;
#endif
}
-#endif // 0
int mac_selinux_fix(const char *path, bool ignore_enoent, bool ignore_erofs) {