]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
conf: use openat() instead of open_tree() 3506/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 5 Aug 2020 18:50:27 +0000 (20:50 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 5 Aug 2020 18:50:27 +0000 (20:50 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/conf.c

index ad3e0e575da5daa676976e50c21e337e8697d47b..36a2309a43529a9c88ab73b893fa2e9d10b70557 100644 (file)
@@ -1524,7 +1524,7 @@ static int lxc_setup_devpts(struct lxc_handler *handler)
                return log_error_errno(-1, errno, "Failed to mount new devpts instance");
        DEBUG("Mount new devpts instance with options \"%s\"", *opts);
 
-       devpts_fd = open_tree(-EBADF, "/dev/pts", OPEN_TREE_CLONE | OPEN_TREE_CLOEXEC | AT_EMPTY_PATH);
+       devpts_fd = openat(-EBADF, "/dev/pts", O_CLOEXEC | O_DIRECTORY | O_PATH | O_NOFOLLOW);
        if (devpts_fd < 0) {
                TRACE("Failed to create detached devpts mount");
                ret = lxc_abstract_unix_send_fds(sock, NULL, 0, NULL, 0);