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: Thu, 24 Oct 2013 14:42:08 -0400 Message-ID: <21097.27136.910137.181740@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> 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 1382640199 2634 80.91.229.3 (24 Oct 2013 18:43:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Oct 2013 18:43:19 +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 Thu Oct 24 20:43:21 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 1VZPsO-000520-W1 for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Oct 2013 20:43:21 +0200 Original-Received: from localhost ([::1]:55748 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZPsO-0001bk-9x for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Oct 2013 14:43:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZPsE-0001bX-5J for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2013 14:43:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VZPs6-0000Za-SQ for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2013 14:43:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZPs6-0000ZU-Ot for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2013 14:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VZPs6-0006bG-B0 for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2013 14:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Oct 2013 18:43: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.138264018025362 (code B ref 15648); Thu, 24 Oct 2013 18:43:02 +0000 Original-Received: (at 15648) by debbugs.gnu.org; 24 Oct 2013 18:43:00 +0000 Original-Received: from localhost ([127.0.0.1]:41627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZPs3-0006b0-An for submit@debbugs.gnu.org; Thu, 24 Oct 2013 14:42:59 -0400 Original-Received: from vms173011pub.verizon.net ([206.46.173.11]:11619) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZPs1-0006am-8L for 15648@debbugs.gnu.org; Thu, 24 Oct 2013 14:42:57 -0400 Original-Received: from consult.pretender ([unknown] [72.93.211.25]) by vms173011.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0MV600HPPRY95YE1@vms173011.mailsrvcs.net> for 15648@debbugs.gnu.org; Thu, 24 Oct 2013 13:42:26 -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 r9OIg8Jr016557; Thu, 24 Oct 2013 14:42:09 -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:79604 Archived-At: Stefan Monnier wrote at about 13:57:13 -0400 on Thursday, October 24, 2013: > > Specifically, gnutls-negotiate uses the Magic File associated > > primitive file-exists-p to test for the existence of a file but > > then passes off the unmodified (and non-existent) Magic File path > > Good point. The problem is the use of file-exists-p (which tests if > Elisp code can reach this file) instead of another function along the > lines of file-accessible-directory-p, which checks whether the file name > is reachable to C-level system primitives. Note that the predicate "file-accessible-directory-p" is also one of the primitives that Magic File handlers are "required" to address... so using "file-accessible-directory-p" would create the same 'true' response for any valid Magic file path unless one were to prevent Magic file handling by say wrapping the predicate in a 'let' where file-name-handler-alist is set to nil). > "Unmodified" is not a real problem, although we might want to use some > function to "canonicalize" the file name so as to increase the chances > that the file is reachable to C-level system primitives. > > > either (1) by using the Magic File aware primitive expand-file-name > > expand-file-name is not the right function, even if in some cases it may > happen to help. Why isn't it the right one? The function name describes it as "Convert filename NAME to absolute, and *canonicalize* it." (emphasis added) It seems that any proper Magic File handler should (by definition) hook into expand-file-name to provide an absolute canonicalized path, so I would think if the handler is properly written, then it should work (by definition). Alternatively, how else would you recommend generally and portably canonicalizing a Magic file path? > > 2. At the C-code level, there is a bug in that passing a > > non-existent/invalid file path may cause the entire Emacs code to > > crash. > > Right, this is the most serious of the two problems. > Agreed.