Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id E4E92431FD0 for ; Fri, 3 Jun 2011 16:37:56 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id S0Zc2LVGm5k4 for ; Fri, 3 Jun 2011 16:37:56 -0700 (PDT) Received: from che.mayfirst.org (che.mayfirst.org [209.234.253.108]) by olra.theworths.org (Postfix) with ESMTP id 3692B431FB6 for ; Fri, 3 Jun 2011 16:37:56 -0700 (PDT) Received: from [192.168.23.207] (dsl254-070-154.nyc1.dsl.speakeasy.net [216.254.70.154]) by che.mayfirst.org (Postfix) with ESMTPSA id A901FF970 for ; Fri, 3 Jun 2011 19:37:53 -0400 (EDT) Message-ID: <4DE9704D.40601@fifthhorseman.net> Date: Fri, 03 Jun 2011 19:37:49 -0400 From: Daniel Kahn Gillmor User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110516 Icedove/3.1.10 MIME-Version: 1.0 To: notmuch Subject: Re: [PATCH] Always return the empty string if decryption tries to demand a password References: <87lixr1w87.fsf@yoom.home.cworth.org> <1307142188-6551-1-git-send-email-dkg@fifthhorseman.net> <8762omld6l.fsf@yoom.home.cworth.org> In-Reply-To: <8762omld6l.fsf@yoom.home.cworth.org> X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig3B11D987AA48D5FBACC9ABAB" X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: notmuch List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jun 2011 23:37:57 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig3B11D987AA48D5FBACC9ABAB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06/03/2011 07:15 PM, Carl Worth wrote: > On Fri, 3 Jun 2011 19:03:08 -0400, Daniel Kahn Gillmor wrote: >> The notmuch binary is not in the business of doing interactive >> prompting with the user. If credentials are needed for decryption, >> they should be supplied to the decrypting processes some other way >> (e.g. gpg-agent). >> >> Previously, we returned a NULL function pointer for the >> request_passwd() function, which may have cause segmentation faults >> with some versions of gmime. >=20 > Cool. This fixes my segfaults, so thanks! >=20 >> + return g_strdup (""); >=20 > Is the above correct? Or is it a memory leak? (If it's not a leak, then= > GMime really has some bizarre ownership semantics.) yes, this corner of gmime has some really bizarre ownership semantics; twisty handoffs and callbacks abound :( Hm, actually, we should just be returning NULL to indicate a failure; i think that would be preferable, and apparently is documented to be acceptable: http://developer.gnome.org/gmime/stable/GMimeSession.html#g-mime-session= -request-passwd Would you mind amending that patch to just return NULL ? fwiw, i've just filed https://bugzilla.gnome.org/show_bug.cgi?id=3D651826= to ask gmime for a hook to let us always request the use of gpg-agent if it is available. --dkg --------------enig3B11D987AA48D5FBACC9ABAB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQJ8BAEBCgBmBQJN6XBNXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQwRUU1QkU5NzkyODJEODBCOUY3NTQwRjFD Q0QyRUQ5NEQyMTczOUU5AAoJEMzS7ZTSFznpqcUP/jYGkS/hTBEhLURMZv2Q7+2+ f1L4GhuV/yDp4Tt+XvRwARF5wFMsB3tNf5LMU+7XGXGDj12YbbVcZukFX1EDY/Sx QLYQcL720XndyDa5mnLmLov9dC1E/tzb9Y3nfhofSUDFs+/8PyNE3Mi0PxXMsR49 1VvE91Goc22ii20KB2NMf97R5O5eqETqOPby/EZsPmD0ZqNi2sq17Dn5dWNJGYPA WRyX6vJ4p3cG83gFkKAilvkQYNQO8DUxOiErQhYVfTXRuqc3PSjrAaEW3UwEPXgn gLKojwwZFUc8EMSIKxsrA3G+m5dU7Y+bOYlrchAUcG564YAI6g/3vH9pboooWJ/x B1n3qLohPzaz4por69vHnYYM9emiL6NDkkOkhyD7g2zfdribwSaB9Rogrj6ygPXw U1x7XqBWmHbBQkLt4IxZUfM8sZW/TWdgRnlCzRZAGWX1CdI/nSdT7iOyZAjIuvaz 8lUu0E9FNnT8j3CwF4dWFGMpQk3wH+2ATWZ19YbWZnkKlXJOw3fURA881Q9G06wT D2bdclv8vq08MvX3t9sNXNRVklGoEweF7Uu1YkOM8Rw3o/rJXZsKVNHOY7hJ0hwU 4v/u51l/S9ja1W8Ls3BG9asw4buapAda3HNCjVw4/SaqiGUhmMWOl2hOPI7gmDnF 7bzGlC9kEOWxYPrItrp6 =UaAI -----END PGP SIGNATURE----- --------------enig3B11D987AA48D5FBACC9ABAB--