Re: OSX vs. Win32 ACL permission bit mappings
Re: OSX vs. Win32 ACL permission bit mappings
- Subject: Re: OSX vs. Win32 ACL permission bit mappings
- From: James Peach <email@hidden>
- Date: Tue, 17 Feb 2009 08:46:32 -0800
2009/2/16 John Michael Zorko <email@hidden>:
>
> Hello, all ...
>
> This may seem a bit off-topic, but it has some relevance I think. I'm
> writing code to save ACL data in an SQLite database, and this code needs to
> run on OSX and WIndows. I'd like to give the database field names some
> relevance, instead of naming them "field 1", "field 2", "field 3" ...
> Regarding ACLs, I need to know which OSX permissions bits correspond to
> which Win32 permission bits in their respective ACEs. I understand that
> some of them may not map at all, but I need to know which ones do and don't.
> Some of them seem obvious, but some do not:
>
> • Win32 FILE_GENERIC_READ probably corresponds to ACL_READ_DATA
> • Win32 FILE_GENERIC_WRITE probably corresponds to ACL_WRITE_DATA
> • Win32 FILE_GENERIC_EXECUTE probably corresponds to ACL_EXECUTE
> • Win32 GENERIC_READ ?
> • Win32 GENERIC_WRITE ?
> • Win32 GENERIC_EXECUTE ?
> • Win32 GENERIC_ALL ?
> • Win32 DELETE probably corresponds to ACL_DELETE
> • Win32 READ_CONTROL probably corresponds to ACL_READ_SECURITY ?
> • Win32 WRITE_DAC probably corresponds to ACL_WRITE_SECURITY ?
> • Win32 WRITE_OWNER probably corresponds to ACL_CHANGE_OWNER
> • Win32 SYNCHRONIZE ?
>
> ... do the following POSIX / OSX permissions map to Win32 permissions?
>
> ACL_APPEND_DATA
> ACL_DELETE_CHILD
> ACL_READ_ATTRIBUTES
> ACL_WRITE_ATTRIBUTES
> ACL_READ_EXTATTRIBUTES
> ACL_WRITE_EXTATTRIBUTES
Yep, that all sounds broadly on track.
You can see how the Samba mapping works here:
<http://www.opensource.apple.com/darwinsource/10.5.6/samba-187.8/samba/source/modules/vfs_darwin_acls.c>
--
James Peach | email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden