From 74e81f830dc26aa09f6ed3254f965d50c7f31d02 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 7 Nov 2024 15:06:17 +0100 Subject: gpgtar: Make sure to create upper directories for regular files. * tools/gpgtar-extract.c (extract_directory): Factor parent directory creation out to .. (try_mkdir_p): new. (extract_regular): Create directory on ENOENT. * g10/pubkey-enc.c (get_it): Use log_info instead of log_error if the public key was not found for preference checking. -- If tarball was created with tar cf tarball file1.txt foo/file2.txt the tarball has no entry for foo/ and thus the extraction fails. This patch fixes this. GnuPG-bug-id: 7380 The second patch avoid a wrong exist status status line due to the use of log_error. But the actual cause needs stuill needs tobe investigated. --- g10/pubkey-enc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'g10/pubkey-enc.c') diff --git a/g10/pubkey-enc.c b/g10/pubkey-enc.c index a83d97495..4d2d6d46b 100644 --- a/g10/pubkey-enc.c +++ b/g10/pubkey-enc.c @@ -449,8 +449,8 @@ get_it (ctrl_t ctrl, if (!pkb) { - err = -1; - log_error ("oops: public key not found for preference check\n"); + err = gpg_error (GPG_ERR_UNEXPECTED); + log_info ("oops: public key not found for preference check\n"); } else if (pkb->pkt->pkt.public_key->selfsigversion > 3 && dek->algo != CIPHER_ALGO_3DES -- cgit v1.2.3