k_f         15/06/07 14:39:23

  Added:                pinentry-0.9.4-actually_respect_users_pm.patch
  Log:
  Add a patch from upstream master to actually respect the user's choice of 
using an external password manager for the gnome3 pinentry
  
  (Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 
0x250B7AFED6379D85!)

Revision  Changes    Path
1.1                  
app-crypt/pinentry/files/pinentry-0.9.4-actually_respect_users_pm.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/pinentry/files/pinentry-0.9.4-actually_respect_users_pm.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/pinentry/files/pinentry-0.9.4-actually_respect_users_pm.patch?rev=1.1&content-type=text/plain

Index: pinentry-0.9.4-actually_respect_users_pm.patch
===================================================================
>From 444598586d0abf70d5a27d2aafcd6c14989621db Mon Sep 17 00:00:00 2001
From: "Neal H. Walfield" <[email protected]>
Date: Sun, 7 Jun 2015 14:36:39 +0200
Subject: [PATCH] gnome3: Actually respect the user's choice of using a
 password manager.

* gnome3/pinentry-gnome3.c (create_prompt) [HAVE_LIBSECRET]: Only show
the libsecret prompt in this case.
(gnome3_cmd_handler) [HAVE_LIBSECRET]: Set PE->MAY_CACHE_PASSWORD
according to the user's choice.
---
 gnome3/pinentry-gnome3.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gnome3/pinentry-gnome3.c b/gnome3/pinentry-gnome3.c
index 74ec89c..0fea8f0 100644
--- a/gnome3/pinentry-gnome3.c
+++ b/gnome3/pinentry-gnome3.c
@@ -145,6 +145,7 @@ create_prompt (pinentry_t pe, int confirm)
   /* XXX: gcr expects a string; we have a int.  */
   // gcr_prompt_set_caller_window (prompt, pe->parent_wid);
 
+#ifdef HAVE_LIBSECRET
   if (! confirm && pe->allow_external_password_cache && pe->keyinfo)
     {
       if (pe->default_pwmngr)
@@ -157,6 +158,7 @@ create_prompt (pinentry_t pe, int confirm)
        gcr_prompt_set_choice_label
          (prompt, "Automatically unlock this key, whenever I'm logged in");
     }
+#endif
 
   return prompt;
 }
@@ -203,6 +205,11 @@ gnome3_cmd_handler (pinentry_t pe)
          if (pe->repeat_passphrase)
            pe->repeat_okay = 1;
 
+#ifdef HAVE_LIBSECRET
+         if (pe->allow_external_password_cache && pe->keyinfo)
+           pe->may_cache_password = gcr_prompt_get_choice_chosen (prompt);
+#endif
+
          ret = 1;
        }
     }
-- 
2.1.4





Reply via email to