chiark / gitweb /
journal: introduce log target 'journal' for executed processes
[elogind.git] / src / label.c
index 3df7e55ba41316c2d44959dba238f2f1f2513354..2c887a0fe52194ac3775966d3af6840d67a1f85d 100644 (file)
@@ -109,7 +109,7 @@ int label_fix(const char *path, bool ignore_enoent) {
                         return 0;
 
                 if (r == 0) {
-                        r = setfilecon(path, fcon);
+                        r = lsetfilecon(path, fcon);
                         freecon(fcon);
 
                         /* If the FS doesn't support labels, then exit without warning */
@@ -291,7 +291,7 @@ int label_mkdir(const char *path, mode_t mode) {
         int r;
         security_context_t fcon = NULL;
 
-        if (!use_selinux() || label_hnd)
+        if (!use_selinux() || !label_hnd)
                 goto skipped;
 
         if (path_is_absolute(path))