From cfca9ccddc1a793de3b15c7a781b1220b054b465 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Wed, 5 Aug 2020 20:50:27 +0200 Subject: [PATCH] conf: use openat() instead of open_tree() 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 ad3e0e575..36a2309a4 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -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); -- 2.47.2