From a72c68f789165c7cc01681f8a3f76334b9704790 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Thu, 11 Jun 2020 17:30:00 +0200 Subject: [PATCH] conf: remove faulty flags If we set O_RDWR we won't be able to open directories and if we set O_PATH we won't be able to chown. Signed-off-by: Christian Brauner --- src/lxc/conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 5cbca6000..115555cd1 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4526,7 +4526,7 @@ int userns_exec_mapped_root(const char *path, int path_fd, return log_error(-1, "No gid mapping for container root"); if (path_fd < 0) { - fd = open(path, O_RDWR | O_CLOEXEC | O_NOCTTY | O_PATH); + fd = open(path, O_CLOEXEC | O_NOCTTY); if (fd < 0) return log_error_errno(-errno, errno, "Failed to open \"%s\"", path); target_fd = fd; -- 2.47.2