>From 8f903815d28aebdfdad5637c059a49fd17b8cdcc Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Sun, 14 Feb 2016 18:06:52 +0100 Subject: [PATCH] pinentry: Use stderr to print failures in password-cache.c Otherwise this interferes with the assuan protocol expected on stdout. https://bugs.gnupg.org/gnupg/issue2243 --- pinentry/password-cache.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pinentry/password-cache.c b/pinentry/password-cache.c index 70b33f4..c98c4c5 100644 --- a/pinentry/password-cache.c +++ b/pinentry/password-cache.c @@ -83,7 +83,7 @@ password_cache_save (const char *keygrip, const char *password) "stored-by", "GnuPG Pinentry", "keygrip", keygrip, NULL)) { - printf("Failed to cache password for key %s with secret service: %s\n", + fprintf (stderr, "Failed to cache password for key %s with secret service: %s\n", keygrip, error->message); g_error_free (error); @@ -112,7 +112,7 @@ password_cache_lookup (const char *keygrip) if (error != NULL) { - printf("Failed to lookup password for key %s with secret service: %s\n", + fprintf (stderr, "Failed to lookup password for key %s with secret service: %s\n", keygrip, error->message); g_error_free (error); return NULL; @@ -126,7 +126,7 @@ password_cache_lookup (const char *keygrip) if (password2) strcpy(password2, password); else - printf("secmem_malloc failed: can't copy password!\n"); + fprintf (stderr, "secmem_malloc failed: can't copy password!\n"); secret_password_free (password); @@ -148,7 +148,7 @@ password_cache_clear (const char *keygrip) "keygrip", keygrip, NULL); if (error != NULL) { - printf("Failed to clear password for key %s with secret service: %s\n", + fprintf (stderr, "Failed to clear password for key %s with secret service: %s\n", keygrip, error->message); g_debug("%s", error->message); g_error_free (error); -- 2.5.0