From 89606dfb31662ac8f418297cdefbde8c7635f53f Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Wed, 12 May 2021 09:18:53 +0200 Subject: [PATCH] conf: allow xdev when setting up /dev Fixes: #3838 Signed-off-by: Christian Brauner --- src/lxc/conf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 123591cf8..dbcd57835 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -1206,7 +1206,9 @@ static int mount_autodev(const char *name, const struct lxc_rootfs *rootfs, if (ret < 0) return log_error_errno(-errno, errno, "Failed to mount tmpfs onto %d(dev)", fd_fs); - ret = fs_attach(fd_fs, rootfs->dfd_mnt, "dev", PROTECT_OPATH_DIRECTORY, PROTECT_LOOKUP_BENEATH, 0); + ret = fs_attach(fd_fs, rootfs->dfd_mnt, "dev", + PROTECT_OPATH_DIRECTORY, + PROTECT_LOOKUP_BENEATH_XDEV, 0); } else { __do_free char *fallback_path = NULL; -- 2.47.2