From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.bugs Subject: bug#15648: 24.2.50; gnutls SSL connection to IMAP server causes emacs to crash completely Date: Tue, 29 Oct 2013 01:13:56 -0400 Message-ID: <21103.17428.671859.954668@consult.pretender> References: <21089.32240.198931.971000@consult.pretender> <87y55kjayp.fsf_-_@flea.lifelogs.com> <21096.1667.116936.254737@consult.pretender> <83eh7bj1yq.fsf@gnu.org> <87ppqvke5u.fsf@flea.lifelogs.com> <87fvrun1pw.fsf@flea.lifelogs.com> <21093.32992.278229.646703@consult.pretender> <877gd5mo5x.fsf@flea.lifelogs.com> <21094.39055.449629.706850@consult.pretender> <21094.40085.664080.69561@consult.pretender> <21094.52645.645440.977584@consult.pretender> <21094.64459.131668.849138@consult.pretender> <21095.19949.639350.970770@consult.pretender> <21096.24492.292723.589004@consult.pretender> <87eh7bj5no.fsf_-_@flea.lifelogs.com> <21097.10816.221279.461499@consult.pretender> <21097.27136.910137.181740@consult.pretender> <21098.31018.184128.497305@consult.pretender> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1383023722 27621 80.91.229.3 (29 Oct 2013 05:15:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Oct 2013 05:15:22 +0000 (UTC) Cc: Ted Zlatanov , emacs@kosowsky.org, 15648@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 29 06:15:22 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vb1eE-0007lF-AC for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Oct 2013 06:15:22 +0100 Original-Received: from localhost ([::1]:44349 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vb1eD-00022c-IL for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Oct 2013 01:15:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58592) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vb1e3-00022H-H9 for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2013 01:15:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vb1dw-0007vd-6z for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2013 01:15:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36476) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vb1dw-0007vC-3O for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2013 01:15:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Vb1du-0003Dh-Ra for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2013 01:15:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Oct 2013 05:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15648 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15648-submit@debbugs.gnu.org id=B15648.138302367712331 (code B ref 15648); Tue, 29 Oct 2013 05:15:02 +0000 Original-Received: (at 15648) by debbugs.gnu.org; 29 Oct 2013 05:14:37 +0000 Original-Received: from localhost ([127.0.0.1]:50494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vb1dU-0003Cp-PN for submit@debbugs.gnu.org; Tue, 29 Oct 2013 01:14:37 -0400 Original-Received: from vms173003pub.verizon.net ([206.46.173.3]:61862) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vb1dS-0003Cc-Q9 for 15648@debbugs.gnu.org; Tue, 29 Oct 2013 01:14:35 -0400 Original-Received: from consult.pretender ([unknown] [72.93.211.25]) by vms173003.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0MVE00AVEZV9UP00@vms173003.mailsrvcs.net> for 15648@debbugs.gnu.org; Tue, 29 Oct 2013 00:14:13 -0500 (CDT) Original-Received: from consult.pretender (consult.pretender [127.0.0.1]) by consult.pretender (8.14.4/8.14.4) with ESMTP id r9T5Dubf005793; Tue, 29 Oct 2013 01:13:57 -0400 In-reply-to: X-Mailer: VM 8.2.0b under 23.1.1 (i386-redhat-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:79745 Archived-At: Stefan Monnier wrote at about 21:52:24 -0400 on Friday, October 25, 2013: > > Basically, this version does 2 things: > > 1. Pre-expands the file name *if* there is a Magic File handler for that > > file path (this will do nothing if there is no handler for that path) > > 2. Tests file-exists-p with all Magic File handlers shut off which > > tests to make sure that the OS primitives will work on the actual > > file path that will be passed > > It's a cleaner workaround, but I'd rather we come up with an actual fix. > Do you think you can try to make a patch that adds (in files.el) a new > function meant to turn an Elisp file name into an OS file name or return > nil if the file can't be accessed by OS primitives? This function would > just delegate its work to the file-name-handler if any, and otherwise > just return its argument unchanged. > > > Stefan There was a small logic error in my original proposed patch... Here is a corrected version: --- gnutls.el 2013-03-17 13:52:40.000000000 -0400 +++ gnutls.el.new 2013-10-29 01:10:49.784647900 -0400 @@ -174,7 +174,13 @@ (let* ((type (or type 'gnutls-x509pki)) (trustfiles (or trustfiles (delq nil - (mapcar (lambda (f) (and f (file-exists-p f) f)) + (mapcar (lambda (f) + (when f + (if (find-file-name-handler + f 'expand-file-name) + (setq f (expand-file-name f))) + (let (file-name-handler-alist) + (if (file-exists-p f) f)))) (if (functionp gnutls-trustfiles) (funcall gnutls-trustfiles) gnutls-trustfiles)))))