This is the mail archive of the
mailing list for the Cygwin project.
Re: (call-process ...) hangs in emacs
- From: Ken Brown <kbrown at cornell dot edu>
- To: cygwin at cygwin dot com
- Date: Wed, 27 Aug 2014 08:52:56 -0400
- Subject: Re: (call-process ...) hangs in emacs
- Authentication-results: sourceware.org; auth=none
- References: <20140805184047 dot GC13601 at calimero dot vinschen dot de> <53E3685B dot 8050508 at cornell dot edu> <53E39BAD dot 3010004 at redhat dot com> <53E3CB46 dot 1020909 at cornell dot edu> <53E3F2AE dot 7030608 at redhat dot com> <53E4D01B dot 9010005 at cornell dot edu> <53F1F154 dot 1020702 at cornell dot edu> <53FB87DC dot 2050908 at cornell dot edu> <87wq9v9j2y dot fsf at Rainer dot invalid> <53FD0662 dot 5050208 at cornell dot edu> <20140827084245 dot GD20700 at calimero dot vinschen dot de>
On 8/27/2014 4:42 AM, Corinna Vinschen wrote:
On Aug 26 18:12, Ken Brown wrote:
On 8/26/2014 2:55 PM, Achim Gratz wrote:
2) Files that have no POSIX permissions (filemode 0000) and where access
is granted via ACL only get always opened as "read-only" and you have to
C-x C-q them before saving. It appears that this is Cygwin specific
since on Linux the same version copes with that situation correctly
(however, the mask bits in the ACL get displayed in the group portion of
the file mode, which I've never seen happen on Cygwin, so this may be
something that Cygwin needs to do -- maybe that'd even solve the
problems that Perl has in the same situation).
AFAICT, emacs decides whether the file is writable via the system call
faccessat. (See the function 'check_writable' in src/fileio.c.) This is
not Cygwin specific. So faccessat must be returning failure in the scenario
you described. I don't know if that's a Cygwin bug or not.
faccessat/access/eaccess don't try to be intelligent by themselves.
Rather they just call a Windows function if the filesystem is mounted
with "acl" mount flags:
- Fetch file's security descriptor
- Create process impersonation token.
- Call NtAccessCheck
- If NtAccessCheck returns "not allowed", check for backup/restore
privileges via NtPrivilegeCheck.
In "noacl" mode or on filesystems not supporting ACLs, access uses the
st_mode flags from stat() to figure out the permissions.
The relevant parts of the implementation are the check_file_access and
subsequently called check_access functions in security.cc.
If you see a bug there, please let me know.
Achim, could you send me a recipe for reproducing the problem so that I
can test further? Please be very detailed; I have no experience with ACLs.
BTW, emacs on Cygwin doesn't directly check ACLs, because the relevant
configure test fails.
Works for vim. Does the Emacs configure test only check for POSIX
ACL functions and not for Solaris ACL functions, by any chance?
I spoke too soon. It does detect that Cygwin has certain ACL functions.
But the feature that Achim was asking about seems to get used only on
systems that have acl_get_file. I guess that's a POSIX ACL function.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple