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. > > 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 mapping > 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) > > 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 == 0x08 S_IXOTH == 0x01 FILE_WRITE_EA == 0x10 S_IWOTH == 0x02 FILE_EXECUTE == 0x20 S_IROTH == 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 -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat
pgp6uoQoWl4o4.pgp
Description: PGP signature