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: Mon, 11 Nov 2013 15:00:39 -0500 Message-ID: <21121.14183.459189.358588@consult.pretender> References: <21089.32240.198931.971000@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> <87y555socz.fsf@flea.lifelogs.com> <21110.26587.721061.28128@consult.pretender> <83fvrd9ysr.fsf@gnu.org> <877gcorv0r.fsf@flea.lifelogs.com> <83sivc85pe.fsf@gnu.org> <21121.11298.564313.363452@consult.pretender> <877gceiv2h.fsf@flea.lifelogs.com> 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 1384200075 3205 80.91.229.3 (11 Nov 2013 20:01:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Nov 2013 20:01:15 +0000 (UTC) Cc: emacs@kosowsky.org, 15648@debbugs.gnu.org To: Ted Zlatanov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 11 21:01:20 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 1Vfxfj-00038n-M0 for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Nov 2013 21:01:19 +0100 Original-Received: from localhost ([::1]:39366 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vfxfj-0004XV-BS for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Nov 2013 15:01:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35239) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VfxfZ-0004Wv-CO for bug-gnu-emacs@gnu.org; Mon, 11 Nov 2013 15:01:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VfxfT-0003g3-3Z for bug-gnu-emacs@gnu.org; Mon, 11 Nov 2013 15:01:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33353) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VfxfS-0003fr-Qi for bug-gnu-emacs@gnu.org; Mon, 11 Nov 2013 15:01:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VfxfS-0000M6-5o for bug-gnu-emacs@gnu.org; Mon, 11 Nov 2013 15:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Nov 2013 20:01: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.13842000531352 (code B ref 15648); Mon, 11 Nov 2013 20:01:02 +0000 Original-Received: (at 15648) by debbugs.gnu.org; 11 Nov 2013 20:00:53 +0000 Original-Received: from localhost ([127.0.0.1]:47372 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VfxfI-0000Lj-Cl for submit@debbugs.gnu.org; Mon, 11 Nov 2013 15:00:52 -0500 Original-Received: from vms173015pub.verizon.net ([206.46.173.15]:65187) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VfxfG-0000LV-02 for 15648@debbugs.gnu.org; Mon, 11 Nov 2013 15:00:50 -0500 Original-Received: from consult.pretender ([unknown] [72.93.211.153]) by vms173015.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0MW400MAE7L4RO30@vms173015.mailsrvcs.net> for 15648@debbugs.gnu.org; Mon, 11 Nov 2013 14:00:42 -0600 (CST) Original-Received: from consult.pretender (consult.pretender [127.0.0.1]) by consult.pretender (8.14.4/8.14.4) with ESMTP id rABK0dtV022035; Mon, 11 Nov 2013 15:00:40 -0500 In-reply-to: <877gceiv2h.fsf@flea.lifelogs.com> 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:80276 Archived-At: Ted Zlatanov wrote at about 14:42:46 -0500 on Monday, November 11, 2013: > On Mon, 11 Nov 2013 14:12:34 -0500 wrote: > > > The absence of cygwin-mount magic file handling when a file name is > > passed directly to the gnutls c-code without going through any of the > > standard magic-file-handling file access routines is the crux of the > > problem. > > > So, again I see only 2 solutions: > > 1. Change (or omit) the "/usr" path and make it relative to cygwin > > root (though this would not work generally since cygwin root is > > changeable) > > > 2. Implement magic handling so that paths are automagically translated > > to be correct at the file system level. In this case, by inserting > > the cygwin root. > > Could we just call http://cygwin-lite.sourceforge.net/html/cygpath.html > on the path (or the equivalent C function)? It seems to be guaranteed > to work but may be very slow with the execution overhead. > > Ted It would work for cygwin... but I see two limitations: 1. The same problem that affects cygwin-mount, would affect any other magic file handler that translates file names, since once again file-exists-p would return true, while the path passed to the c-code would in general not point to an OS-recognizable file. I could even right my own file handler called 'my-2nd-home' whereby any path beginning with ~~ would be translated to /home/my-2nd-home. Then, if I put such a file name in gnutls-trustfiles, it would cause gnutls to throw an error when the path is passed to the c-code. Again, my patch would solve the problem 2. The suggestion seems to be far kluggier than my suggested patch since it relies on a user elisp routine passing executing a system call to return a path every time a gnutls connection is requested. At least cygwin-mount does this only once at startup and abstracts the translation away from higher level routines -- which is the entire purpose of a magic file handler. If cygpath belongs anywhere, it would be in the magic file handling code. Though cygwin-mount does this in a "smarter" way by calling 'mount' once to determine the cygwin prefix once-and-for-all, and then whenever a path is passed, the magic handler automatically prefixes on the cygwin mount prefix. Once again, the problem is not cygwin-mount, per-se. The problem is the inconsistency between using the magic file enabled predicate file-exists-p to test for a file and then passing that same file name to c-code that knows nothing about magic file handlers.