chiark / gitweb /
util: loop_write - accept 0-length message
[elogind.git] / src / shared / selinux-util.c
index 82c6924e36a85345f48a156f2b21fe3d83b12818..7c58985cd26ae29975e4e7fc5458a5e5dd6b12d6 100644 (file)
@@ -116,6 +116,7 @@ void mac_selinux_finish(void) {
                 return;
 
         selabel_close(label_hnd);
+        label_hnd = NULL;
 #endif
 }
 
@@ -145,7 +146,7 @@ int mac_selinux_fix(const char *path, bool ignore_enoent, bool ignore_erofs) {
                         r = lsetfilecon(path, fcon);
 
                         /* If the FS doesn't support labels, then exit without warning */
-                        if (r < 0 && errno == ENOTSUP)
+                        if (r < 0 && errno == EOPNOTSUPP)
                                 return 0;
                 }
         }