diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-09-20 13:39:29 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-09-20 17:55:23 +0200 |
commit | 739d9cae407eb5e33f27e290235b6d096feda410 (patch) | |
tree | 2f86ee3d38205342530172cdbfbacad8ee683c70 /src/basic/recurse-dir.c | |
parent | Delete CNAME (diff) | |
download | systemd-739d9cae407eb5e33f27e290235b6d096feda410.tar.xz systemd-739d9cae407eb5e33f27e290235b6d096feda410.zip |
recurse-dir: use fd_reopen() at one more place
Inspired by 83b94cf10e4f76b2b415bc70bf65f1c28698b97c
Diffstat (limited to 'src/basic/recurse-dir.c')
-rw-r--r-- | src/basic/recurse-dir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/recurse-dir.c b/src/basic/recurse-dir.c index efa1797b7b..d16ca98f67 100644 --- a/src/basic/recurse-dir.c +++ b/src/basic/recurse-dir.c @@ -255,9 +255,9 @@ int recurse_dir( * directory fd — which should be riskless now that we pinned the * inode. */ - subdir_fd = openat(AT_FDCWD, FORMAT_PROC_FD_PATH(inode_fd), O_DIRECTORY|O_CLOEXEC); + subdir_fd = fd_reopen(inode_fd, O_DIRECTORY|O_CLOEXEC); if (subdir_fd < 0) - return -errno; + return subdir_fd; inode_fd = safe_close(inode_fd); } |