[git] Pinentry - branch, master, updated. pinentry-1.0.0-25-ge57bcb7
by Marcus Brinkmann
cvs at cvs.gnupg.org
Wed Jul 12 18:50:19 CEST 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The standard pinentry collection".
The branch, master has been updated
via e57bcb7a2acff3a61a342d24e6a55407bf736631 (commit)
from 6053cb4f3873897acf5d899bc6f02046d0748a0f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e57bcb7a2acff3a61a342d24e6a55407bf736631
Author: Marcus Brinkmann <marcus.brinkmann at ruhr-uni-bochum.de>
Date: Wed Jul 12 18:46:36 2017 +0200
core: Disable "save passphrase" checkbox without secret service.
* pinentry/password-cache.c (password_cache_lookup): New argument
FATAL_ERROR. Set it on fatal error.
* pinentry/password-cache.h (password_cache_lookup): New argument
FATAL_ERROR in declaration.
* pinentry/pinentry.c (cmd_getpin): On fatal error, disallow
external password store.
* NEWS: Update.
Signed-off-by: Marcus Brinkmann <mb at g10code.com>
GnuPG-bug-id: 2023
diff --git a/NEWS b/NEWS
index 107a65d..5534d4d 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,12 @@ Noteworthy changes in version 1.0.1 (unreleased)
* A FLTK1.3-based pinentry has been contributed.
+ * New option --ttyalert for pinentry-curses to alert the user.
+
+ * Don't show "save passphrase" checkbox if secret service is
+ unavailable.
+
+
Noteworthy changes in version 1.0.0 (2016-11-22)
------------------------------------------------
diff --git a/pinentry/password-cache.c b/pinentry/password-cache.c
index 903c013..6778386 100644
--- a/pinentry/password-cache.c
+++ b/pinentry/password-cache.c
@@ -96,7 +96,7 @@ password_cache_save (const char *keygrip, const char *password)
}
char *
-password_cache_lookup (const char *keygrip)
+password_cache_lookup (const char *keygrip, int *fatal_error)
{
#ifdef HAVE_LIBSECRET
GError *error = NULL;
@@ -112,6 +112,9 @@ password_cache_lookup (const char *keygrip)
if (error != NULL)
{
+ if (fatal_error)
+ *fatal_error = 1;
+
fprintf (stderr, "Failed to lookup password for key %s with secret service: %s\n",
keygrip, error->message);
g_error_free (error);
diff --git a/pinentry/password-cache.h b/pinentry/password-cache.h
index 77e82e1..34fd00b 100644
--- a/pinentry/password-cache.h
+++ b/pinentry/password-cache.h
@@ -22,7 +22,7 @@
void password_cache_save (const char *key_grip, const char *password);
-char *password_cache_lookup (const char *key_grip);
+char *password_cache_lookup (const char *key_grip, int *fatal_error);
int password_cache_clear (const char *keygrip);
diff --git a/pinentry/pinentry.c b/pinentry/pinentry.c
index ed8fa6d..5f7912a 100644
--- a/pinentry/pinentry.c
+++ b/pinentry/pinentry.c
@@ -1438,10 +1438,14 @@ cmd_getpin (assuan_context_t ctx, char *line)
&& ! pinentry.error)
{
char *password;
+ int give_up_on_password_store = 0;
pinentry.tried_password_cache = 1;
- password = password_cache_lookup (pinentry.keyinfo);
+ password = password_cache_lookup (pinentry.keyinfo, &give_up_on_password_store);
+ if (give_up_on_password_store)
+ pinentry.allow_external_password_cache = 0;
+
if (password)
/* There is a cached password. Try it. */
{
-----------------------------------------------------------------------
Summary of changes:
NEWS | 6 ++++++
pinentry/password-cache.c | 5 ++++-
pinentry/password-cache.h | 2 +-
pinentry/pinentry.c | 6 +++++-
4 files changed, 16 insertions(+), 3 deletions(-)
hooks/post-receive
--
The standard pinentry collection
http://git.gnupg.org
More information about the Gnupg-commits
mailing list