mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
qemu: fix qemu.conf security_driver
Since a9331394
(first release v2.1.0), specifying a manual
security_driver setting in qemu.conf causes the daemon to fail to
start, erroring with 'Duplicate security driver X'.
The duplicate checking was incorrectly comparing every entry
against itself, guaranteeing a false positive.
https://bugzilla.redhat.com/show_bug.cgi?id=1365607
This commit is contained in:
parent
a220f43a65
commit
856965b362
@ -436,7 +436,7 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg,
|
||||
goto cleanup;
|
||||
|
||||
for (i = 0; cfg->securityDriverNames && cfg->securityDriverNames[i] != NULL; i++) {
|
||||
for (j = i; cfg->securityDriverNames[j] != NULL; j++) {
|
||||
for (j = i + 1; cfg->securityDriverNames[j] != NULL; j++) {
|
||||
if (STREQ(cfg->securityDriverNames[i],
|
||||
cfg->securityDriverNames[j])) {
|
||||
virReportError(VIR_ERR_CONF_SYNTAX,
|
||||
|
Loading…
Reference in New Issue
Block a user