From: Werner Koch Date: Tue, 9 Jul 2019 09:13:51 +0000 (+0200) Subject: gpg: Do not try the import fallback if the options are already used. X-Git-Tag: archive/raspbian/2.2.12-1+rpi1+deb10u2^2~11 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0b3fc03798228119daea4a1808ffab09ee64bf08;p=gnupg2.git gpg: Do not try the import fallback if the options are already used. * g10/import.c (import_one): Check options. Signed-off-by: Werner Koch (cherry picked from commit 3c2cf5ea952015a441ee5701c41dadc63be60d87) Gbp-Pq: Topic from-2.2.17 Gbp-Pq: Name gpg-Do-not-try-the-import-fallback-if-the-options-are-alr.patch --- diff --git a/g10/import.c b/g10/import.c index d509c8c..12f8f28 100644 --- a/g10/import.c +++ b/g10/import.c @@ -2310,7 +2310,9 @@ import_one (ctrl_t ctrl, from_sk, silent, screener, screener_arg, origin, url, r_valid); if (gpg_err_code (err) == GPG_ERR_TOO_LARGE - && gpg_err_source (err) == GPG_ERR_SOURCE_KEYBOX) + && gpg_err_source (err) == GPG_ERR_SOURCE_KEYBOX + && ((options & (IMPORT_SELF_SIGS_ONLY | IMPORT_CLEAN)) + != (IMPORT_SELF_SIGS_ONLY | IMPORT_CLEAN))) { /* We hit the maximum image length. Ask the wrapper to do * everything again but this time with some extra options. */