bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#10257: 23.3.1 Cygwin: network drives - file is write protected (fals


From: Eli Zaretskii
Subject: bug#10257: 23.3.1 Cygwin: network drives - file is write protected (false positive)
Date: Wed, 14 Dec 2011 19:30:45 +0200

> Date: Wed, 14 Dec 2011 09:19:16 -0500
> From: Ken Brown <kbrown@cornell.edu>
> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]