www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/04/12/04:22:33

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=yftQ5X3pkaiZFXxrXCfKyoxWNqcGOeOo/DTvJvT0TXABeXhda7h3w
Rh9tsMPwUmf0+Tg1aI9DQX/3FOWC1nkC3MshF2hTLXai5mrj8KZW2YZeHF+QIMZt
+t0IIm0xRMwtZBa57NmLeXoMpDCxe8ieVpdrx2QI1ImlCtfLavzQFA=
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=A0F0AzQANYz8MB6klst619EaaWY=; b=Yuhg9YiGaHgtYQcw1b0SeC6MaXy4
o+jEDsPaZhIc9w2AtdgUc1/lW7T4IbUG1+kLhwow5nEIyhHa+cWA68u84HRl/yoi
sZKtoCCNfElUNFQ/Z1CwXZtgy1tOQQDQXyCP09jgTkJDI1suItKeSYxxjJIa2YWc
bJYe8fiSDFyylpg=
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.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2
X-HELO: calimero.vinschen.de
Date: Sun, 12 Apr 2015 10:22:12 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: [TESTERS needed] New POSIX permission handling
Message-ID: <20150412082212.GL7343@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20150410100703 DOT GA4401 AT calimero DOT vinschen DOT de> <CAAXzdLUFeBX6EREpMA2WeMYT+oS8c=JXhqkwrvNYUGjsWFrW8w AT mail DOT gmail DOT com> <20150411094020 DOT GB19111 AT calimero DOT vinschen DOT de> <20150411100752 DOT GE19111 AT calimero DOT vinschen DOT de> <55294B35 DOT 8050708 AT raelity DOT com>
MIME-Version: 1.0
In-Reply-To: <55294B35.8050708@raelity.com>
User-Agent: Mutt/1.5.23 (2014-03-12)

--5uO961YFyoDlzFnP
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Apr 11 09:26, Ernie Rael wrote:
> I'm primarily a lurker, reading this list hoping things soak in a bit. So=
 I
> may be off base on this.
>=20
> In the table below, describing "NULL DENY access mask", looks like there'=
s a
> typo concerning read/execute. (of course it might just be a windows mappi=
ng
> peculiarity that I really didn't want to know about ;-)

Hey, cool, somebody noticed :)
And since you asked, you'll get to know, whether you want or not ;)

> >The following bits in the NULL DENY access mask are used:
> >
> >   Windows access    <->   POSIX access
> >   --------------          ------------
> >   FILE_READ_DATA          S_ISVTX
> >   FILE_WRITE_DATA         S_ISGID
> >   FILE_APPEND_DATA        S_ISUID
> >
> >   FILE_READ_EA            MASK S_IXOTH  (POSIX execute perms)
> >   FILE_WRITE_EA           MASK S_IWOTH  (POSIX write perms)
> >   FILE_EXECUTE            MASK S_IROTH  (POSIX read perms)
>=20
> Are read and execute swapped intentionally in the above?

Yes, indeed.  since the NULL access mask is not needed for actual
permission checking by Windows, we can use the bit as they fit our
needs.  The reason for using them in this order are their bit values.

  FILE_READ_EA  =3D=3D 0x08       S_IXOTH =3D=3D 0x01
  FILE_WRITE_EA =3D=3D 0x10       S_IWOTH =3D=3D 0x02
  FILE_EXECUTE  =3D=3D 0x20       S_IROTH =3D=3D 0x04

To convert from Windows to POSIX and vice versa, a simple shift
operation is sufficient.  Reordering just to fit the symbolic name
would complicate the conversion unnecessarily.


Corinna

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

--5uO961YFyoDlzFnP
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJVKis0AAoJEPU2Bp2uRE+g8LsP/RHOsc5ETF+pVuRdOI9X7f+1
NKYdzpmaDA+mG+0/M8Nlgap6QtH6GRL83Jx9KlLiHtNHO5zjPEaQXlH10Il4IDmJ
HlmgMxZdMaayfW6R2Db/KDvwTfgNupsQkK1zlX8uNIqZRhFJ1Ky6m82QcxsK6rXu
qKk97VCwxnT/wu9u2BZ7dxg61cWWo+qjKtCQfSoZHbH8Gi7v3gSel5h/Ye8Q9oZ2
ssxbw47Zdve9jalE9vKJCwAg7InOkU1N2ssAl33IsT4iVZQuC02ZJ1Siciq/DyA5
UMq17SEYl+YExBU4n7U0Lz0MHDSPOPZx0+D389BDYVWq/jkEg98eRINaCfdfH7E8
18RRbf2qscZ0qDgQQgXS5gRBKgtBBG/r81Ql3oPFtJkISg6LqR/Ok3GnBAdkn6nE
7tz2Tlhud4Dorh0kzduhDHShwXgYbe9ulFi/iPbbO0iAvFY5Q3YebUyAacpIwpr8
v7f9Bgf9sqy0HhctYHszVKsNiH0uXhWyvj+iWfpWWFhdbtPYvmUAf/DQvbbl7Qx0
VPK8OA0MhH8fkJ+gB+xX9SSdkHgYom65d+HMLjyz5yeIEl1sZZp3EtbwAJOFMseW
3HmsxMQQkTV7eCqX3ycXKrPSWJwE8rBv17rU9uY4h/H/pKNFivanNoYaTmifDHzQ
fldQxH7AtPx8XGe7f4f4
=ydrU
-----END PGP SIGNATURE-----

--5uO961YFyoDlzFnP--

- Raw text -


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