From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Philip Hodges Newsgroups: gmane.emacs.bugs Subject: bug#17330: files.el cd-absolute overcome false negative from file-executable-p Date: Sun, 4 May 2014 15:24:35 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1399209935 4517 80.91.229.3 (4 May 2014 13:25:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 4 May 2014 13:25:35 +0000 (UTC) To: 17330@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 04 15:25:25 2014 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 1WgwPw-00028L-CU for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 May 2014 15:25:20 +0200 Original-Received: from localhost ([::1]:53396 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgwPv-00071s-Vp for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 May 2014 09:25:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgwPm-00070x-7w for bug-gnu-emacs@gnu.org; Sun, 04 May 2014 09:25:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WgwPf-0003Re-5s for bug-gnu-emacs@gnu.org; Sun, 04 May 2014 09:25:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33047) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgwPf-0003Ql-2W for bug-gnu-emacs@gnu.org; Sun, 04 May 2014 09:25:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WgwPe-0002mS-3Q for bug-gnu-emacs@gnu.org; Sun, 04 May 2014 09:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Hodges Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 May 2014 13:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17330 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17330-submit@debbugs.gnu.org id=B17330.139920988410654 (code B ref 17330); Sun, 04 May 2014 13:25:02 +0000 Original-Received: (at 17330) by debbugs.gnu.org; 4 May 2014 13:24:44 +0000 Original-Received: from localhost ([127.0.0.1]:50398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WgwPL-0002ll-TM for submit@debbugs.gnu.org; Sun, 04 May 2014 09:24:44 -0400 Original-Received: from zhbdzmsp-smta17.bluewin.ch ([195.186.99.133]:58472) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WgwPJ-0002lT-JB for 17330@debbugs.gnu.org; Sun, 04 May 2014 09:24:42 -0400 Original-Received: from [195.186.227.130] ([195.186.227.130:60590] helo=zhhdzmsp-smta12.bluewin.ch) by zhbdzmsp-smta17.bluewin.ch (envelope-from ) (ecelerity 3.5.7.40067 r(Platform:3.5.7.0)) with ESMTP id 61/B7-15928-49F36635; Sun, 04 May 2014 13:24:36 +0000 Original-Received: from [192.168.0.10] (46.127.159.181) by zhhdzmsp-smta12.bluewin.ch (8.5.142) (authenticated as philip.hodges@bluewin.ch) id 52A87E3C09617A9D for 17330@debbugs.gnu.org; Sun, 4 May 2014 13:24:36 +0000 In-Reply-To: X-Mailer: Apple Mail (2.1874) 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:88628 Archived-At: I came across a post that confirms my suspicions that: - the _stat st_mode bits really cannot be trusted to give a meaningful = answer, no matter whether it comes from Windows or cygwin. - it is not worth calling GetFileSecurity (which is what I meant by = "something like GetFileAttributes" *) and trying to reproduce the = interpretation of the ACL information - the best way is to find out if searching a directory will succeed = really is to actually try it = http://stackoverflow.com/questions/3449465/find-the-permissions-of-a-file-= in-windows > ... somewhere between hard and impossible to reproduce ... To reproduce on any platform, simply change check_executable to *always* = return false. The easiest way to test what happens with false negatives = is to have negatives all the time. The more I read about it and think about it, the more I stand by my = original change suggestion: tell the user that the directory might not = be searchable, ask them if they want to go ahead and try it anyway. And = also ask if they always want to do that, in case the question appears so = often that it becomes annoying. I think we have to accept and work with = what we have got instead of punishing users until such time as every = possible combination of filesystem and library methods can be upgraded = in a way that might not even be practical for many of them. Surely the worst that can happen is that it becomes easier to end up = with a buffer whose current directory really is not searchable, or file = changes that cannot be saved in the original location. Good to avoid, = but not vital. Rather that than being completely denied the use of a = feature such as ediff-directories that would actually work. Much of what was written for #10257 (writeable) applies to this #17330 = (searchable directory) and vice versa. So if we are only comfortable = with just treating a -1 uid or gid specially here too, well it is not a = general solution, but better than no change at all. Having just the = default entries in the passwd file hasn't been causing me any other = noticeable trouble. [*) If I have mixed up any other detail such as which conditional = compiling macros are defined to choose between euidaccess and stat or = _stat in which builds, or misreported something observed on a system = that is not in front of me at that moment, please forgive me.]=