mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-27 18:03:50 +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"));
|
_("Support for AppArmor is not enabled"));
|
||||||
goto error;
|
goto error;
|
||||||
#endif
|
#endif
|
||||||
|
} else if (STREQ(model->model, "none")) {
|
||||||
|
/* nothing todo */
|
||||||
} else {
|
} else {
|
||||||
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED,
|
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED,
|
||||||
_("Security model %s cannot be entered"),
|
_("Security model %s cannot be entered"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user