From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8427 invoked by alias); 28 Aug 2014 13:35:18 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 8404 invoked by uid 89); 28 Aug 2014 13:35:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.6 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: smtpback.ht-systems.ru Received: from smtpback.ht-systems.ru (HELO smtpback.ht-systems.ru) (78.110.50.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 28 Aug 2014 13:35:14 +0000 Received: from [91.79.67.207] (helo=darkdragon.lan) by smtp.ht-systems.ru with esmtpa (Exim 4.80.1) (envelope-from ) (Authenticated sender: postmaster@rootdir.org) id 1XMzr2-0004vL-Lc for cygwin@cygwin.com; Thu, 28 Aug 2014 17:35:08 +0400 Received: from [192.168.1.10] (HELO daemon2) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Thu, 28 Aug 2014 13:23:37 -0000 Date: Thu, 28 Aug 2014 13:35:00 -0000 From: Andrey Repin Reply-To: cygwin@cygwin.com Message-ID: <187704841.20140828172337@yandex.ru> To: Corinna Vinschen Subject: Re: (call-process ...) hangs in emacs In-Reply-To: <20140828100112.GQ20700@calimero.vinschen.de> References: <53E39BAD.3010004@redhat.com> <53E3CB46.1020909@cornell.edu> <53E3F2AE.7030608@redhat.com> <53E4D01B.9010005@cornell.edu> <53F1F154.1020702@cornell.edu> <53FB87DC.2050908@cornell.edu> <87wq9v9j2y.fsf@Rainer.invalid> <53FD0662.5050208@cornell.edu> <20140827084245.GD20700@calimero.vinschen.de> <17910052714.20140828010203@yandex.ru> <20140828100112.GQ20700@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00551.txt.bz2 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. > It's what "acl" means on Cygwin. "acl" means that Windowsd ACLs are used > and permissions are handled and converted to and from POSIX permissions. > "noacl" means, Cygwin ignores all ACLs and fakes ownership and POSIX > permissions only based only on filetype and DOS R/O attribute, as it has > to on filesystems not supporting ACLs, like FAT/FAT32. Got it. It seems, Cygwin need a middle groung between these two for cases, where FS support access control, but don't want to be mangled. -- WBR, Andrey Repin (anrdaemon@yandex.ru) 28.08.2014, <17:22> 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