Your message dated Tue, 27 Jan 2009 20:51:02 +0000
with message-id <[email protected]>
and subject line Prompts for passphrase when using gnome-gpg
has caused the Debian Bug report #349777,
regarding Prompts for passphrase when using gnome-gpg
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
349777: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=349777
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: mutt
Version: 1.5.11-5
Tags: patch

When I use Mutt with gnome-gpg, it still prompts me for the
passphrase.  It shouldn't do so, since gnome-gpg takes care of reading
and caching the passphrase.

The attached patch adds a pgp_use_gnome_gpg configuration flag that,
when set, prevents Mutt from prompting for the passphrase.

-- 
Matt
diff -ru mutt-1.5.11/init.h mutt-1.5.11/init.h
--- mutt-1.5.11/init.h  2006-01-24 23:01:39.000000000 -0800
+++ mutt-1.5.11/init.h  2006-01-24 22:56:21.000000000 -0800
@@ -1464,6 +1464,12 @@
   ** you may unset this setting.
   ** (Crypto only)
   */
+  { "pgp_use_gnome_gpg", DT_BOOL, R_NONE, OPTUSEGNOMEGPG, 0},
+  /*
+  ** .pp
+  ** If set, mutt will use gnome-gpg process.
+  ** (PGP only)
+  */
   { "pgp_use_gpg_agent", DT_BOOL, R_NONE, OPTUSEGPGAGENT, 0},
   /*
   ** .pp
diff -ru mutt-1.5.11/mutt.h mutt-1.5.11/mutt.h
--- mutt-1.5.11/mutt.h  2006-01-24 23:01:38.000000000 -0800
+++ mutt-1.5.11/mutt.h  2006-01-24 22:55:15.000000000 -0800
@@ -441,6 +441,7 @@
   OPTUSE8BITMIME,
   OPTUSEDOMAIN,
   OPTUSEFROM,
+  OPTUSEGNOMEGPG,
   OPTUSEGPGAGENT,
 #ifdef HAVE_LIBIDN
   OPTUSEIDN,
diff -ru mutt-1.5.11/pgp.c mutt-1.5.11/pgp.c
--- mutt-1.5.11/pgp.c   2006-01-24 23:01:38.000000000 -0800
+++ mutt-1.5.11/pgp.c   2006-01-24 22:59:34.000000000 -0800
@@ -75,7 +75,7 @@
 {
   time_t now = time (NULL);
 
-  if (pgp_use_gpg_agent())
+  if (pgp_use_gpg_agent() || pgp_use_gnome_gpg())
     {
       *PgpPass = 0;
       return 1; /* handled by gpg-agent */
@@ -117,6 +117,11 @@
   return 1;
 }
 
+int pgp_use_gnome_gpg (void)
+{
+  return option (OPTUSEGNOMEGPG);
+}
+
 char *pgp_keyid(pgp_key_t k)
 {
   if((k->flags & KEYFLAG_SUBKEY) && k->parent && option(OPTPGPIGNORESUB))
@@ -358,7 +363,7 @@
          if (needpass)
          {
            if (!pgp_valid_passphrase ()) pgp_void_passphrase();
-            if (pgp_use_gpg_agent())
+            if (pgp_use_gnome_gpg() || pgp_use_gpg_agent())
               *PgpPass = 0;
            fprintf (pgpin, "%s\n", PgpPass);
          }
@@ -810,7 +815,7 @@
   /* send the PGP passphrase to the subprocess.  Never do this if the
      agent is active, because this might lead to a passphrase send as
      the message. */
-  if (!pgp_use_gpg_agent())
+  if (!pgp_use_gnome_gpg && !pgp_use_gpg_agent())
     fputs (PgpPass, pgpin);
   fputc ('\n', pgpin);
   fclose(pgpin);
@@ -1029,7 +1034,7 @@
     return NULL;
   }
   
-  if (!pgp_use_gpg_agent())
+  if (!pgp_use_gnome_gpg() && !pgp_use_gpg_agent())
      fputs(PgpPass, pgpin);
   fputc('\n', pgpin);
   fclose(pgpin);
@@ -1295,7 +1300,7 @@
 
   if (sign)
   {
-    if (!pgp_use_gpg_agent())
+    if (!pgp_use_gnome_gpg() && !pgp_use_gpg_agent())
        fputs (PgpPass, pgpin);
     fputc ('\n', pgpin);
   }
@@ -1468,7 +1473,7 @@
     return NULL;
   }
 
-  if (pgp_use_gpg_agent())
+  if (pgp_use_gnome_gpg() || pgp_use_gpg_agent())
     *PgpPass = 0;
   if (flags & SIGN)
     fprintf (pgpin, "%s\n", PgpPass);

Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
tag 349777 +wontfix
thanks

Hi,
the only agent supported by mutt is gpg-agent and your GUI app
should use that. What happens now (2009) is that the gnome application
is use gpg-agent through dbus, so mutt asks for the passphrase with
a nice GUI and then store it.

If we hack mutt to support a GUI app, we have to hack it to support
any other GUI app that implement its own passphrase caching; the right
way is that the GUI app uses gpg-agent.

Cheers
Antonio


--- End Message ---

Reply via email to