]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
virSecuritySELinuxSetSecurityAllLabel: drop useless virFileIsSharedFSType
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 10 Sep 2015 11:29:36 +0000 (13:29 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 15 Sep 2015 09:30:13 +0000 (11:30 +0200)
The check is done in virSecuritySELinuxSetFilecon itself. There's
no need to check it again.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/security/security_selinux.c

index d2e5aa20616503ec42dbe2f96c66b8a04aaf1221..46080bfb3dd14804f15bc5f3c65563ac1ebf5970 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;
 }