FreeBSD Bugzilla – Attachment 182737 Details for
Bug 219400
security/gnupg 2.1.21 broke gpg exit code behavior when not using a smart card
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to fix bug introduced in 2.1.21
gpg2.1.21_1.patch (text/plain), 2.48 KB, created by
FiLiS
on 2017-05-19 09:35:38 UTC
(
hide
)
Description:
patch to fix bug introduced in 2.1.21
Filename:
MIME Type:
Creator:
FiLiS
Created:
2017-05-19 09:35:38 UTC
Size:
2.48 KB
patch
obsolete
>diff --git a/security/gnupg/Makefile b/security/gnupg/Makefile >index 0247fd77b7e..e6e7418c63f 100644 >--- a/security/gnupg/Makefile >+++ b/security/gnupg/Makefile >@@ -2,6 +2,7 @@ > > PORTNAME= gnupg > PORTVERSION= 2.1.21 >+PORTREVISION= 1 > CATEGORIES= security > MASTER_SITES= GNUPG > >diff --git a/security/gnupg/files/patch-g10-call-agent.c b/security/gnupg/files/patch-g10-call-agent.c >new file mode 100644 >index 00000000000..f9f6b5ddc82 >--- /dev/null >+++ b/security/gnupg/files/patch-g10-call-agent.c >@@ -0,0 +1,62 @@ >+--- g10/call-agent.c.orig 2017-05-15 14:13:22.000000000 +0200 >++++ g10/call-agent.c 2017-05-19 08:45:45.000000000 +0200 >+@@ -184,7 +184,8 @@ >+ >+ >+ /* Print a warning if the server's version number is less than our >+- version number. Returns an error code on a connection problem. */ >++ version number. Returns an error code on a connection problem. >++ Ignore an error for scdaemon (MODE==2). */ >+ static gpg_error_t >+ warn_version_mismatch (assuan_context_t ctx, const char *servername, int mode) >+ { >+@@ -193,7 +194,7 @@ >+ const char *myversion = strusage (13); >+ >+ err = get_assuan_server_version (ctx, mode, &serverversion); >+- if (err) >++ if (err && mode != 2) >+ log_error (_("error getting version from '%s': %s\n"), >+ servername, gpg_strerror (err)); >+ else if (compare_version_strings (serverversion, myversion) < 0) >+@@ -217,10 +218,12 @@ >+ } >+ >+ >++#define FLAG_FOR_CARD_SUPPRESS_ERRORS 2 >++ >+ /* Try to connect to the agent via socket or fork it off and work by >+ pipes. Handle the server's initial greeting */ >+ static int >+-start_agent (ctrl_t ctrl, int for_card) >++start_agent (ctrl_t ctrl, int flag_for_card) >+ { >+ int rc; >+ >+@@ -280,7 +283,7 @@ >+ } >+ } >+ >+- if (!rc && for_card && !did_early_card_test) >++ if (!rc && flag_for_card && !did_early_card_test) >+ { >+ /* Request the serial number of the card for an early test. */ >+ struct agent_card_info_s info; >+@@ -292,7 +295,7 @@ >+ rc = assuan_transact (agent_ctx, "SCD SERIALNO openpgp", >+ NULL, NULL, NULL, NULL, >+ learn_status_cb, &info); >+- if (rc) >++ if (rc && !(flag_for_card & FLAG_FOR_CARD_SUPPRESS_ERRORS)) >+ { >+ switch (gpg_err_code (rc)) >+ { >+@@ -1023,7 +1026,7 @@ >+ char *serialno = NULL; >+ char line[ASSUAN_LINELENGTH]; >+ >+- err = start_agent (NULL, 1); >++ err = start_agent (NULL, 1 | FLAG_FOR_CARD_SUPPRESS_ERRORS); >+ if (err) >+ return err; >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 219400
: 182737