mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
Don't overwrite errors from virConfReadFile
The SELinux security driver would overwrite errors from the virConfReadFile function. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
78839da0bb
commit
d75d8b46f8
@ -414,13 +414,8 @@ virSecuritySELinuxLXCInitialize(virSecurityManagerPtr mgr)
|
|||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
selinux_conf = virConfReadFile(selinux_lxc_contexts_path(), 0);
|
if (!(selinux_conf = virConfReadFile(selinux_lxc_contexts_path(), 0)))
|
||||||
if (!selinux_conf) {
|
|
||||||
virReportSystemError(errno,
|
|
||||||
_("cannot open SELinux lxc contexts file '%s'"),
|
|
||||||
selinux_lxc_contexts_path());
|
|
||||||
goto error;
|
goto error;
|
||||||
}
|
|
||||||
|
|
||||||
scon = virConfGetValue(selinux_conf, "process");
|
scon = virConfGetValue(selinux_conf, "process");
|
||||||
if (! scon || scon->type != VIR_CONF_STRING || (! scon->str)) {
|
if (! scon || scon->type != VIR_CONF_STRING || (! scon->str)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user