From: Christian Brauner Date: Thu, 11 Jun 2020 15:30:00 +0000 (+0200) Subject: conf: remove faulty flags X-Git-Tag: lxc-5.0.0~419^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a72c68f789165c7cc01681f8a3f76334b9704790;p=thirdparty%2Flxc.git 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 --- 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;