提交 293f7170 编写于 作者: D Daniel P. Berrange

Ignore failure to mount SELinux filesystem in container

User namespaces will deny the ability to mount the SELinux
filesystem. This is harmless for libvirt's LXC needs, so the
error can be ignored.
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 1528e8b2
......@@ -741,6 +741,12 @@ static int lxcContainerMountBasicFS(void)
VIR_DEBUG("Mount %s on %s type=%s flags=%x, opts=%s",
srcpath, mnts[i].dst, mnts[i].type, mnts[i].mflags, mnts[i].opts);
if (mount(srcpath, mnts[i].dst, mnts[i].type, mnts[i].mflags, mnts[i].opts) < 0) {
#if WITH_SELINUX
if (STREQ(mnts[i].src, SELINUX_MOUNT) &&
(errno == EINVAL || errno == EPERM))
continue;
#endif
virReportSystemError(errno,
_("Failed to mount %s on %s type %s flags=%x opts=%s"),
srcpath, mnts[i].dst, NULLSTR(mnts[i].type),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册