sbsign: name the input file when hashing it fails

verb_sign() logs argv[0], which is the verb, as the name of the file it
could not hash. Log argv[1], the input file.

(cherry picked from commit 9030bbfc90c646b7c07bbe8d70cfe7ba40b5a25a)
This commit is contained in:
Daan De Meyer
2026-10-16 17:24:51 +01:00
committed by Luca Boccassi
parent cec20dc153
commit d5999b66a2
+1 -1
View File
@@ -481,7 +481,7 @@ static int verb_sign(int argc, char *argv[], uintptr_t _data, void *userdata) {
size_t pehashsz;
r = pe_hash(srcfd, sym_EVP_sha256(), &pehash, &pehashsz);
if (r < 0)
return log_error_errno(r, "Failed to hash PE binary %s: %m", argv[0]);
return log_error_errno(r, "Failed to hash PE binary %s: %m", argv[1]);
_cleanup_free_ uint8_t *idcraw = NULL;
size_t idcrawsz = 0; /* avoid false maybe-uninitialized warning */