Don't overwrite errors from virConfReadFile

The SELinux security driver would overwrite errors from the
virConfReadFile function.
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 78839da0
无相关合并请求
......@@ -414,13 +414,8 @@ virSecuritySELinuxLXCInitialize(virSecurityManagerPtr mgr)
}
# endif
selinux_conf = virConfReadFile(selinux_lxc_contexts_path(), 0);
if (!selinux_conf) {
virReportSystemError(errno,
_("cannot open SELinux lxc contexts file '%s'"),
selinux_lxc_contexts_path());
if (!(selinux_conf = virConfReadFile(selinux_lxc_contexts_path(), 0)))
goto error;
}
scon = virConfGetValue(selinux_conf, "process");
if (! scon || scon->type != VIR_CONF_STRING || (! scon->str)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部