mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +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
|
||||
|
||||
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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user