]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virSecuritySELinuxSetSecurityAllLabel: drop useless virFileIsSharedFSType
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 10 Sep 2015 11:29:36 +0000 (13:29 +0200)
committerCole Robinson <crobinso@redhat.com>
Tue, 22 Sep 2015 00:18:05 +0000 (20:18 -0400)
The check is done in virSecuritySELinuxSetFilecon itself. There's
no need to check it again.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 370461d1dbcdcf63fbe6c34d188c28cf11488845)

src/security/security_selinux.c

index 6e67a86cc27c323468097aff6437808ca3395c40..cd6e4ea795b19a483a4ee07a4b9633c285c804ad 100644 (file)
@@ -2306,7 +2306,7 @@ virSecuritySELinuxSetSecurityAllLabel(virSecurityManagerPtr mgr,
             continue;
         }
         if (virSecuritySELinuxSetSecurityDiskLabel(mgr,
-                                         def, def->disks[i]) < 0)
+                                                   def, def->disks[i]) < 0)
             return -1;
     }
     /* XXX fixme process  def->fss if relabel == true */
@@ -2355,11 +2355,9 @@ virSecuritySELinuxSetSecurityAllLabel(virSecurityManagerPtr mgr,
         virSecuritySELinuxSetFilecon(def->os.dtb, data->content_context) < 0)
         return -1;
 
-    if (stdin_path) {
-        if (virSecuritySELinuxSetFilecon(stdin_path, data->content_context) < 0 &&
-            virFileIsSharedFSType(stdin_path, VIR_FILE_SHFS_NFS) != 1)
-            return -1;
-    }
+    if (stdin_path &&
+        virSecuritySELinuxSetFilecon(stdin_path, data->content_context) < 0)
+        return -1;
 
     return 0;
 }