mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-15 13:47:41 +00:00
conf: use openat() instead of open_tree()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
07002a08c1
commit
cfca9ccddc
@ -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");
|
return log_error_errno(-1, errno, "Failed to mount new devpts instance");
|
||||||
DEBUG("Mount new devpts instance with options \"%s\"", *opts);
|
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) {
|
if (devpts_fd < 0) {
|
||||||
TRACE("Failed to create detached devpts mount");
|
TRACE("Failed to create detached devpts mount");
|
||||||
ret = lxc_abstract_unix_send_fds(sock, NULL, 0, NULL, 0);
|
ret = lxc_abstract_unix_send_fds(sock, NULL, 0, NULL, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user