From: Daniel P. Berrange Date: Wed, 13 Jul 2016 10:16:45 +0000 (+0100) Subject: Don't error when attaching security label of model "none" X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=24555136bf42e14f81c4fe1106e36052cb7b32cc;p=libvirt.git 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 --- diff --git a/src/libvirt-lxc.c b/src/libvirt-lxc.c index 16e08e9db8..c487ecebab 100644 --- a/src/libvirt-lxc.c +++ b/src/libvirt-lxc.c @@ -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"),