delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/08/28/09:19:14

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=aANF6ugjy1PyOmJ2Dobp3rvPjitwUneVygFyBTO1suzr6GGhl+PqU
v5Hho/iFqg0weqw8B6q3EvjBCnHIOMOKyFh8SFeuPGi1SgOr7I15SNRFIQBRm4uB
rmsWznyFNGP3oBiPHfBCtqY/9FfMJ1olaQpB3quwIDHwi0o7VrqZ5I=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=VtTFl6GtXy4Ao8gzJTuOHkCxV9A=; b=OSB79v2rqsLjg2obrlqSyC1NGfkV
MJGuzS4qxIWCneLZZ3FeduGkv/JA4vfc8YjNhHURq3gnQcXyA6ZyCM5myeucG5pN
YckGJlYdB7JIWAVxP5LgclwKOpFwFF//pjZDNVdTNQE0KD3VML3jMWSYmS2lcJ1m
uhOa7HJi879DVk4=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
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
Date: Thu, 28 Aug 2014 15:18:32 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: (call-process ...) hangs in emacs
Message-ID: <20140828131832.GT20700@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <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> <53FDD4A8 DOT 5050401 AT cornell DOT edu> <loom DOT 20140827T170804-533 AT post DOT gmane DOT org> <loom DOT 20140828T085927-71 AT post DOT gmane DOT org> <20140828095524 DOT GO20700 AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
In-Reply-To: <20140828095524.GO20700@calimero.vinschen.de>
User-Agent: Mutt/1.5.23 (2014-03-12)

--0ZpWocbG2H/Vq+uQ
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Aug 28 11:55, Corinna Vinschen wrote:
> On Aug 28 07:25, Achim Gratz wrote:
> > As a concrete example, in the following the directory x86 shows up on C=
ygwin
> > as follows:
> >=20
> > > getfacl x86
> > # file: x86
> > # owner: otheruser
> > # group: Domain Users
> > user::---
> > group::---
> > group:FilerAdmins:rwx
> > group:ShareOwners:rwx
> > mask:rwx
> > other:---
> > default:user::---
> > default:group::---
> > default:group:FilerAdmins:rwx
> > default:group:ShareOwners:rwx
> > default:mask:rwx
> > default:other:---
> > > ls -ld x86
> > d---------+ 1 otheruser Domain Users 0 Jun 23 14:09 x86/
> >=20
> > Under Linux in the same situation you'd get
> >=20
> > > ls -ld x86
> > d---rwx---+ 1 otheruser Domain Users 0 Jun 23 14:09 x86/
> >=20
> > instead (i.e. the mask bits shown in the group portion of the standard =
mode
> > flags).  If the file was owned by your uid, then you'd get indeed
> >=20
> > > ls -ld x86
> > d---------+ 1 myself Domain Users 0 Jun 23 14:09 x86/
> >=20
> > but you'd also really have no permissions.  On Windows you do have
> > permission to the file in that situation since the POSIX part of the ACL
> > (particularly the user::--- part that revokes all access for the file o=
wner)
> > are faked by Cygwin and not taken into account when the file gets final=
ly
> > accessed:
> >=20
> > > icacls x86
> > x86 DOM\FilerAdmins:(I)(OI)(IO)(F)
> >     DOM\FilerAdmins:(I)(CI)(F)
> >     DOM\ShareOwners:(I)(OI)(IO)(M)
> >     DOM\ShareOwners:(I)(CI)(M)
> >=20
> > If getting at the correct mask is too expensive, simply always faking an
> > "rwx" mask might actually be better than what we have now, since once t=
he
> > ACL are fully processed you'll get the correct permissions anyway.
>=20
> Handling of the CLASS object (aka "mask") has never been fully
> implemented, especially because there's no such thing as a CLASS object
> in a Windows ACL.
>=20
> I guess it will always be some fake, but, yes, we can try to change
> stat() so that the st_mode group permissions reflect the or'ed bits of
> all permissions given to non-primary users and groups.  Same in acl(2).
> That might be useful.

I implemented this preliminary and uploaded a snapshot to
https://cygwin.com/snapshots/

"Preliminary", because this change introduces an API change:

Since the CLASS_OBJ and DEF_CLASS_OBJ entries only exist if secondary
user and group (default) entries exist, that means the default
permission entry only consists of 3 ACEs.  This in turn means, the
constant MIN_ACL_ENTRIES changed from 4 to 3.

This might negatively affect coreutils, at least `ls', even though in my
local testing it looked all normal.

Please test.


Thanks,
Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--0ZpWocbG2H/Vq+uQ
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJT/ywnAAoJEPU2Bp2uRE+gc18P/2ZnaRutJ+ZXBwurfx5FdzN3
0IUElHcqCk9OfdhXaziSztV9NyqZWMs+vjDpXTgRQIFgFxbsljDR2cquI7Lhy0p+
xU43zXxSuaQ9SoaIkDzMRSJk5T548ZbnWaca624ONYzBuGpROfDHBGeaXpQmEEGN
DbXy0cCxOOJt5erlFSa2enzEwOZeNOIbZVg7fugEg7DI0lguNL/cex1i2S/6ro1y
TbvlkQDY2DrC0WWIYI3vujpcNEz9TjRKd3tvQIFk407SZ+ootHI0O2l6blB37Ghu
qG38n2xZwHQncJlPQrHGylxW/3+fxB4X7dspLZ7D3mobQkpcBcELY3H6SNvnzwTK
Sko3viYGxeRKtz5HpWec4KDRa+2SDdDbZ4wD4TZay0Cmqh/JfbPP3IDfaHcNb+Ak
+NG6iUm37Cyq0869pwvcwDMsvOw8+MhRpi5SGglE6UbBXg6JmG1rnXaZ47BgXCRV
kGFvaz8x6Kie3zm4PO4FNzS8WnvlL5zov5m+Nwh4JqiG2duAJZfVCQVxb0rgWhY9
1qII276a1qcr65Y31UdKMZ45P5nTY6NWttukmvImVIlgWJ8uRyzzl9MhNUJx034D
6TPI5mLO8yw1qwM556/EzoAyxhvobVOFUrNFH/TGjwJCVndIh/fxrDuymrQYYVF6
1wqtGkKnPvIa3YWV9nh0
=wMz4
-----END PGP SIGNATURE-----

--0ZpWocbG2H/Vq+uQ--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019