Unverified Commit 18adfa20 by Christian Brauner Committed by Stéphane Graber

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: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 1bb08049
...@@ -4523,7 +4523,7 @@ int userns_exec_mapped_root(const char *path, int path_fd, ...@@ -4523,7 +4523,7 @@ int userns_exec_mapped_root(const char *path, int path_fd,
return log_error(-1, "No gid mapping for container root"); return log_error(-1, "No gid mapping for container root");
if (path_fd < 0) { 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) if (fd < 0)
return log_error_errno(-errno, errno, "Failed to open \"%s\"", path); return log_error_errno(-errno, errno, "Failed to open \"%s\"", path);
target_fd = fd; target_fd = fd;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment