mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-26 14:03:49 +03:00
Don't error when attaching security label of model "none"
If you invoke virDomainLxcEnterSecurityLabel() on security model of "none" it will report an error. Logically a "none" security model should be treated as a no-op, so we should just return success immediately, instead of an error. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
9cf3c44ff5
commit
24555136bf
@ -257,6 +257,8 @@ virDomainLxcEnterSecurityLabel(virSecurityModelPtr model,
|
||||
_("Support for AppArmor is not enabled"));
|
||||
goto error;
|
||||
#endif
|
||||
} else if (STREQ(model->model, "none")) {
|
||||
/* nothing todo */
|
||||
} else {
|
||||
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED,
|
||||
_("Security model %s cannot be entered"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user