From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#10257: 23.3.1 Cygwin: network drives - file is write protected (false positive) Date: Wed, 14 Dec 2011 19:30:45 +0200 Message-ID: <83fwgn2h8a.fsf@gnu.org> References: <87aa71mwng.fsf@picasso.cante.net> <4EE270AA.2080702@cornell.edu> <20111210095858.GA19881@cante.cante.net> <4EE742B0.1080703@cornell.edu> <20111213140042.GA22678@picasso.cante.net> <4EE76B6E.7070904@cornell.edu> <4EE7B2A9.6060308@cornell.edu> <4EE8178F.5040004@cornell.edu> <87liqf1t04.fsf@picasso.cante.net> <4EE89590.2040503@cornell.edu> <4EE89CAB.8080301@cornell.edu> <4EE8B064.8080803@cornell.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1323883921 15252 80.91.229.12 (14 Dec 2011 17:32:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 14 Dec 2011 17:32:01 +0000 (UTC) Cc: 10257@debbugs.gnu.org, jari.aalto@cante.net To: Ken Brown Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 14 18:31:57 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RasgO-0008LW-2e for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 Dec 2011 18:31:56 +0100 Original-Received: from localhost ([::1]:46873 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RasgN-0006TY-CJ for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 Dec 2011 12:31:55 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:59165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RasgE-0006RW-Ad for bug-gnu-emacs@gnu.org; Wed, 14 Dec 2011 12:31:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rasg5-0006Q9-3m for bug-gnu-emacs@gnu.org; Wed, 14 Dec 2011 12:31:45 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rasg5-0006Pp-0w for bug-gnu-emacs@gnu.org; Wed, 14 Dec 2011 12:31:37 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RashR-0003pS-FG for bug-gnu-emacs@gnu.org; Wed, 14 Dec 2011 12:33:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Dec 2011 17:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10257 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10257-submit@debbugs.gnu.org id=B10257.132388393314665 (code B ref 10257); Wed, 14 Dec 2011 17:33:01 +0000 Original-Received: (at 10257) by debbugs.gnu.org; 14 Dec 2011 17:32:13 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rasgf-0003oT-2H for submit@debbugs.gnu.org; Wed, 14 Dec 2011 12:32:13 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rasgc-0003oJ-CI for 10257@debbugs.gnu.org; Wed, 14 Dec 2011 12:32:11 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0LW700A00FADLU00@a-mtaout21.012.net.il> for 10257@debbugs.gnu.org; Wed, 14 Dec 2011 19:30:44 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.229.18.12]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LW700AT6FB7KX10@a-mtaout21.012.net.il>; Wed, 14 Dec 2011 19:30:43 +0200 (IST) In-reply-to: <4EE8B064.8080803@cornell.edu> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 14 Dec 2011 12:33:01 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:54960 Archived-At: > Date: Wed, 14 Dec 2011 09:19:16 -0500 > From: Ken Brown > CC: 10257@debbugs.gnu.org, jari.aalto@cante.net > > > Either that, or make euidaccess/check_writable return success in such > > cases. > > I don't know how to determine what "such cases" are. "Such cases" are those where UID and GID are returned as -1 (I think), see the original report where Jari shows the result of file-attributes. I believe Corinna also wrote something about the special SID values returned in this case. You could use these special values to detect this situation and work around it. > In the case at hand, Jari has a network filesystem that is > configured in such a way that the uid/gid of a file can't be > determined by standard system calls. As explained on the Cygwin > list, he can set up his /etc/passwd and /etc/group to work around > this. [He has to map the fake SID returned by Samba to a real one.] > If he doesn't want to do that, I think it would clearly be wrong for > euidaccess to return success. My POV is that "such cases" are better solved inside euidaccess: it doesn't make much sense to force the users to jump through the hoops when it is known that the library is unable to determine something reliably, in this case the uid/gid values. In such cases, the library should do whatever will punish users the least. But that's me; if the Cygwin maintainers disagree and will not modify euidaccess, then you could try doing the equivalent of this in Emacs. > Maybe check_writable could be a little more lenient, but I'm not sure > what the implications of that would be. The file is already writable in this case, so how bad can this become? The trick is not to be more lenient in all the cases, only in these problematic ones. Then you can never do worse than we do now.