提交 3746b070 编写于 作者: D Daniel P. Berrange

Ensure LXC security driver is set unconditonally

The driver->securityDriverName field may be NULL, if automatic
probing is used to determine security driver. This meant that
unless selinux was explicitly requested in lxc.conf, it was
not being sent to the libvirt_lxc process.

The driver->securityManager field is guaranteed non-NULL, since
there will always be the 'none' security driver present if
nothing else exists. So use that to set the driver name for
libvirt_lxc
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 eb06375a
......@@ -1616,8 +1616,8 @@ lxcBuildControllerCmd(lxc_driver_t *driver,
virCommandPreserveFD(cmd, ttyFDs[i]);
}
if (driver->securityDriverName)
virCommandAddArgPair(cmd, "--security", driver->securityDriverName);
virCommandAddArgPair(cmd, "--security",
virSecurityManagerGetModel(driver->securityManager));
virCommandAddArg(cmd, "--handshake");
virCommandAddArgFormat(cmd, "%d", handshakefd);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册