]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bootctl: use faccessat() more
authorLennart Poettering <lennart@poettering.net>
Thu, 17 Mar 2022 17:53:39 +0000 (18:53 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 18 Mar 2022 08:30:25 +0000 (09:30 +0100)
src/boot/bootctl.c

index 86b4d7fd149d05cacc214067f524deaf29be1b05..72bdb7e6b103a2875c67b8067b9dae05626714ef 100644 (file)
@@ -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;
                 }