This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: (call-process ...) hangs in emacs


Greetings, Corinna Vinschen!

> 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.

I'm not very much into Cygwin internals, so beg pardon if I got something
wrong here... But reading this makes my internal sanity checker go into red
alarm state.

Here's why:

When Cygwin mount a filesystem with 'acl' flag set, it mangles current ACL's
set on the files to produce something that can be understood as basic POSIX
'ugly'...erm, 'ugo' permissions. Behavior least desirable in many cases.
You say, it will then use native functions to determine access rights... No
wonder they will work, since you already mangled them to suit your needs.

When Cygwin mount a filesystem with 'noacl' flag, thus let OS use true ACL's
(a feature Windows implemented surprisingly fast, while *NIX was only
proposing it... for far too long without any result in sight), it is then
followed by some magic and guesswork on Cygwin's end to find out access
rights.

If you ask me, something isn't quite right here. Or something is missing.

> 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.

>> 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?


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 28.08.2014, <00:48>

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]