From d16da79ec0b43ccf037b058a5a5d5c4757d55c9c Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 17 Mar 2022 18:53:39 +0100 Subject: [PATCH] bootctl: use faccessat() more --- src/boot/bootctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c index 86b4d7fd14..72bdb7e6b1 100644 --- a/src/boot/bootctl.c +++ b/src/boot/bootctl.c @@ -899,10 +899,10 @@ static int install_binaries(const char *esp_path, bool force) { /* skip the .efi file, if there's a .signed version of it */ if (endswith_no_case(de->d_name, ".efi")) { - _cleanup_free_ const char *s = strjoin(BOOTLIBDIR, "/", de->d_name, ".signed"); + _cleanup_free_ const char *s = strjoin(de->d_name, ".signed"); if (!s) return log_oom(); - if (access(s, F_OK) >= 0) + if (faccessat(dirfd(d), s, F_OK, 0) >= 0) continue; }