Re: [PATCH v4 01/16] add util/search-path.{c, h} to test for executables in $PATH
[notmuch-archives.git] / 09 / a115b82be02c7bfeac8547d6d13e051a1e6d1b
1 Return-Path: <jrollins@finestructure.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 9EAEB431FB6\r
6         for <notmuch@notmuchmail.org>; Wed, 27 Feb 2013 08:14:50 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -2.3\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id wtTZZlBLy71f for <notmuch@notmuchmail.org>;\r
16         Wed, 27 Feb 2013 08:14:48 -0800 (PST)\r
17 Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
18         [131.215.239.19])\r
19         by olra.theworths.org (Postfix) with ESMTP id 6F3AD431FAF\r
20         for <notmuch@notmuchmail.org>; Wed, 27 Feb 2013 08:14:48 -0800 (PST)\r
21 Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
22         by earth-doxen-postvirus (Postfix) with ESMTP id D0B7C66E00F8;\r
23         Wed, 27 Feb 2013 08:14:47 -0800 (PST)\r
24 X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new\r
25 Received: from finestructure.net (DHCP-123-224.caltech.edu [131.215.123.224])\r
26         (Authenticated sender: jrollins)\r
27         by earth-doxen-submit (Postfix) with ESMTP id D658466E011C;\r
28         Wed, 27 Feb 2013 08:14:43 -0800 (PST)\r
29 Received: by finestructure.net (Postfix, from userid 1000)\r
30         id B154E61745; Wed, 27 Feb 2013 08:14:43 -0800 (PST)\r
31 From: Jameson Graef Rollins <jrollins@finestructure.net>\r
32 To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
33 Subject: Re: [PATCH] cli: crypto: tell gmime to use gpg-agent\r
34 In-Reply-To: <1361950838-22919-1-git-send-email-jani@nikula.org>\r
35 References: <1361950838-22919-1-git-send-email-jani@nikula.org>\r
36 User-Agent: Notmuch/0.15+8~gd4a7374 (http://notmuchmail.org) Emacs/24.2.1\r
37         (x86_64-pc-linux-gnu)\r
38 Date: Wed, 27 Feb 2013 08:14:41 -0800\r
39 Message-ID: <87hakxpwcu.fsf@servo.finestructure.net>\r
40 MIME-Version: 1.0\r
41 Content-Type: multipart/signed; boundary="=-=-=";\r
42         micalg=pgp-sha256; protocol="application/pgp-signature"\r
43 X-BeenThere: notmuch@notmuchmail.org\r
44 X-Mailman-Version: 2.1.13\r
45 Precedence: list\r
46 List-Id: "Use and development of the notmuch mail system."\r
47         <notmuch.notmuchmail.org>\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
51 List-Post: <mailto:notmuch@notmuchmail.org>\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
55 X-List-Received-Date: Wed, 27 Feb 2013 16:14:50 -0000\r
56 \r
57 --=-=-=\r
58 Content-Type: text/plain\r
59 \r
60 On Tue, Feb 26 2013, Jani Nikula <jani@nikula.org> wrote:\r
61 > For decryption, we expect there to be a functioning gpg-agent, and we\r
62 > want gpg to talk to it for any needed credentials. There's a gmime\r
63 > function to declare that: g_mime_gpg_context_set_use_agent() [1], [2].\r
64 > Start using it.\r
65 >\r
66 > I had gpg-agent running, but gpg "use-agent" configuration option\r
67 > disabled. This resulted in an error message from 'notmuch show':\r
68 >\r
69 >   Failed to decrypt part: Canceled.\r
70 >\r
71 > and json had this:\r
72 >\r
73 >   "encstatus" : [ { "status" : "bad" } ]\r
74 >\r
75 > One could argue the "use-agent" option should be enabled, but I'd like\r
76 > to use the agent only as a last resort. I think that's irrelevant\r
77 > though. There's a gmime function to declare what we expect, so we\r
78 > should use it. Conveniently it also fixes the problem in a user\r
79 > friendly way.\r
80 \r
81 I will argue that the "use-agent" option should be enabled.  If we force\r
82 use of gpg-agent, then we don't allow people to opt out of using it.\r
83 That's not very user friendly, particularly if someone has not enabled\r
84 it for a specific reason.\r
85 \r
86 But I think more to the point we need a little bit of due diligence of\r
87 the effects of this before we enable it.  What happens if gpg-agent is\r
88 not available?  What happens if there is no X session?  Tests that probe\r
89 the various circumstances would be useful.\r
90 \r
91 I do note, though, that the error messages are not very useful.  It\r
92 would be nice if could figure out that the decryption failed because of\r
93 lack of agent and inform the user of that.\r
94 \r
95 We should probably also update the show man page to make explicit that\r
96 an agent may be required.\r
97 \r
98 jamie.\r
99 \r
100 --=-=-=\r
101 Content-Type: application/pgp-signature\r
102 \r
103 -----BEGIN PGP SIGNATURE-----\r
104 Version: GnuPG v1.4.12 (GNU/Linux)\r
105 \r
106 iQIcBAEBCAAGBQJRLjDxAAoJEO00zqvie6q80YwP+wYQwBco4kcfFiwI6eHjxA3R\r
107 jx6vGOBal6z3ET7WcS06YdY4iX/CuBJZu72NbR8TwMxU9JoW7Fq95ovWJdsPirJx\r
108 gXzvPQtHt9RjDYVeateVDHKylqtz0PRdXzlndGEexRTG6jkaY1AqMzUkRnd5YBvJ\r
109 pH+WYDTg10COnxEi5QdR5Bb9fBQQvykAvX4is6D76aGNpr4kexlbqiFPWILQzLwS\r
110 vjikP2ZB8PF7pOrEFQKUrd/XJk+SWrE2QBZYIJq7kKuYivM+NXcuijIaWTFhVHoM\r
111 V+pCae5fir82VgE0HWlyb0fM/Lq22y3NE9c33cLzdArv8Y+YZLi4SCnKVE++4kK3\r
112 2Mvp7ZCvHGJ1Ygbe3irteknpKX1O4MlJlAr6r+zyjLZTSdT8BTxw/+FEY9DbfI4W\r
113 ++9wcSTgkfv2mIW4qHo15NA0FkhAzPyreKPe7gX66K/gf1X/B41tTRYS4JTCNbaT\r
114 i/CO+d2CH+8oCzeWt1Y+XIAWWuotQaVym+zyeB3nAzWk54RUUok7dWnL06h7dx0x\r
115 st2KRtkDVCwL8dAPUDD0G+5DWyXIrQ8HfaBrfFrKHiWgRQkI2TR60DWtw3/2D1NM\r
116 CSP1X05QsimIGn+RqsY750wgJ7I26qFXFwOmuqTTveFLY2tn9DrxgY4xm6F4Wsqa\r
117 ZWjGa6no6YdAiA6SmP3Q\r
118 =ICqV\r
119 -----END PGP SIGNATURE-----\r
120 --=-=-=--\r