From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24970 invoked by alias); 28 Aug 2014 10:01:17 -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 24957 invoked by uid 89); 28 Aug 2014 10:01:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: calimero.vinschen.de Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 28 Aug 2014 10:01:14 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 78FBD8E0789; Thu, 28 Aug 2014 12:01:12 +0200 (CEST) Date: Thu, 28 Aug 2014 10:01:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: (call-process ...) hangs in emacs Message-ID: <20140828100112.GQ20700@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com 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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8WA4ILJSyYAmUzbY" Content-Disposition: inline In-Reply-To: <17910052714.20140828010203@yandex.ru> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2014-08/txt/msg00546.txt.bz2 --8WA4ILJSyYAmUzbY Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2102 On Aug 28 01:02, Andrey Repin wrote: > Greetings, Corinna Vinschen! >=20 > > 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: >=20 > > - Fetch file's security descriptor > > - Create process impersonation token. > > - Call NtAccessCheck > > - If NtAccessCheck returns "not allowed", check for backup/restore > > privileges via NtPrivilegeCheck. >=20 > > In "noacl" mode or on filesystems not supporting ACLs, access uses the > > st_mode flags from stat() to figure out the permissions. >=20 > 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 r= ed > alarm state. >=20 > Here's why: >=20 > When Cygwin mount a filesystem with 'acl' flag set, it mangles current AC= L's > set on the files to produce something that can be understood as basic POS= IX > '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. >=20 > When Cygwin mount a filesystem with 'noacl' flag, thus let OS use true AC= L'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. >=20 > 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. Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --8WA4ILJSyYAmUzbY Content-Type: application/pgp-signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJT/v3oAAoJEPU2Bp2uRE+gOJwP/i8KGU2RCsHE69ETRE4C9ir3 c3LwVBHW6DUVQ+1TqQp0De0qBM+U8dZ9j2kMcfmtNHXvam0Y5sdK5pZoXn1Kvxbn Xo7mLelfc8Ik1NpmL2y5KERozlFOZRllcfgMRr6ZiYzneABSqfr6pOPh9qRm6X+L hui/So3v3eRVECKiZRUEMCbPty0AlZljRLix25IRgv3reQ4Tw9ZAEjnvWZmUe7L9 AKqf2kau1quH5INZrc5hXgwBRC86j17SJ5TVKwXeuio+EjMEWg+X6lNAh3M/+eC0 RIxtMvJ9HXLUmq7Q6BAH0mYHajeGo4L5Fb61dj0jvfoLjLtqHwlAV1dsR9Fsk6vn ws5GBRtUj9PulejKqlOd2SOmsguqiXA9HdEfx/+o9mDIV5R6xXnDkjLp6dibIcyK ZI9DXWQEvX6qnFmtxU0HqUcE1IxnA8D/bXiXBZU/z0fmOdoc1dGjJJlVlMwgDJer j8DOcUEn+hl7zXfoac3n4hCxY49N8m7sUY5Jnr6XJ4ZpfnYJkc2bh4RhLAOOtWfK +Hw6FDFeZ1jdegQJiIVJJLsOhZbKjdOM/jj4HuCfL+pAMa2fYHrl+CINg9n0UqGB vYg+Z5rz10t7dHgp9oNAMoACSVwiZTchbgNDtL+ugwoywIp9/weMfRM9z6RevTqk 0CNn+3p9hjsPl4Qltp7M =81Xu -----END PGP SIGNATURE----- --8WA4ILJSyYAmUzbY--