提交 370461d1 编写于 作者: M Michal Privoznik

virSecuritySELinuxSetSecurityAllLabel: drop useless virFileIsSharedFSType

The check is done in virSecuritySELinuxSetFilecon itself. There's
no need to check it again.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 d3f61730
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册