mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
Use VIR_ERR_CONFIG_UNSUPPORTED if requested security driver is disabled
There is currently no way to distinguish the case that a requested security driver was disabled, from the case where no security driver was available. Use VIR_ERR_CONFIG_UNSUPPORTED as the error when an explicitly requested security driver was disabled Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
fd016806df
commit
51b23ed31a
@ -72,6 +72,12 @@ virSecurityDriverPtr virSecurityDriverLookup(const char *name,
|
|||||||
|
|
||||||
case SECURITY_DRIVER_DISABLE:
|
case SECURITY_DRIVER_DISABLE:
|
||||||
VIR_DEBUG("Not enabled name=%s", tmp->name);
|
VIR_DEBUG("Not enabled name=%s", tmp->name);
|
||||||
|
if (name && STREQ(tmp->name, name)) {
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
|
_("Security driver %s not enabled"),
|
||||||
|
name);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user