提交 cf36c23b 编写于 作者: D Daniel Walsh 提交者: Daniel P. Berrange

Don't enable the AppArmour security driver with LXC

The AppArmour driver does not currently have support for LXC
so ensure that when probing, it claims to be disabled
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 73580c60
......@@ -328,7 +328,7 @@ AppArmorSetSecurityPCILabel(pciDevice *dev ATTRIBUTE_UNUSED,
/* Called on libvirtd startup to see if AppArmor is available */
static int
AppArmorSecurityManagerProbe(const char *virtDriver ATTRIBUTE_UNUSED)
AppArmorSecurityManagerProbe(const char *virtDriver)
{
char *template = NULL;
int rc = SECURITY_DRIVER_DISABLE;
......@@ -336,6 +336,9 @@ AppArmorSecurityManagerProbe(const char *virtDriver ATTRIBUTE_UNUSED)
if (use_apparmor() < 0)
return rc;
if (virtDriver && STREQ(virtDriver, "LXC"))
return rc;
/* see if template file exists */
if (virAsprintf(&template, "%s/TEMPLATE",
APPARMOR_DIR "/libvirt") == -1) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册