mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virSecuritySELinuxSetSecurityAllLabel: drop useless virFileIsSharedFSType
The check is done in virSecuritySELinuxSetFilecon itself. There's no need to check it again. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
d3f6173086
commit
370461d1db
@ -2306,7 +2306,7 @@ virSecuritySELinuxSetSecurityAllLabel(virSecurityManagerPtr mgr,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (virSecuritySELinuxSetSecurityDiskLabel(mgr,
|
if (virSecuritySELinuxSetSecurityDiskLabel(mgr,
|
||||||
def, def->disks[i]) < 0)
|
def, def->disks[i]) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
/* XXX fixme process def->fss if relabel == true */
|
/* XXX fixme process def->fss if relabel == true */
|
||||||
@ -2355,11 +2355,9 @@ virSecuritySELinuxSetSecurityAllLabel(virSecurityManagerPtr mgr,
|
|||||||
virSecuritySELinuxSetFilecon(def->os.dtb, data->content_context) < 0)
|
virSecuritySELinuxSetFilecon(def->os.dtb, data->content_context) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (stdin_path) {
|
if (stdin_path &&
|
||||||
if (virSecuritySELinuxSetFilecon(stdin_path, data->content_context) < 0 &&
|
virSecuritySELinuxSetFilecon(stdin_path, data->content_context) < 0)
|
||||||
virFileIsSharedFSType(stdin_path, VIR_FILE_SHFS_NFS) != 1)
|
return -1;
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user