diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-09-07 15:49:47 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-09-12 05:26:16 +0200 |
commit | ac804f0d7f5a93ff2710e213d9213ad9960a15d6 (patch) | |
tree | 938a8c734adc57e168459001135e3cfdf1302af5 /librpc/idl | |
parent | bd2f1604d73f05f3b2f151a81f09824c7bb99ab5 (diff) | |
download | samba-ac804f0d7f5a93ff2710e213d9213ad9960a15d6.tar.gz samba-ac804f0d7f5a93ff2710e213d9213ad9960a15d6.tar.bz2 samba-ac804f0d7f5a93ff2710e213d9213ad9960a15d6.zip |
smbd-posix_acls: Use a IDL union to store the ACL entry
This is a clearer, long-term-stable structure we can hash without
risking it changing.
Andrew Bartlett
Diffstat (limited to 'librpc/idl')
-rw-r--r-- | librpc/idl/smb_acl.idl | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/librpc/idl/smb_acl.idl b/librpc/idl/smb_acl.idl index 7f672996b0..2904c3afa4 100644 --- a/librpc/idl/smb_acl.idl +++ b/librpc/idl/smb_acl.idl @@ -40,18 +40,34 @@ interface smb_acl SMB_ACL_OTHER = 5, SMB_ACL_MASK = 6 } smb_acl_tag_t; - + typedef struct { - smb_acl_tag_t a_type; - mode_t a_perm; uid_t uid; + } smb_acl_user; + + typedef struct { gid_t gid; + } smb_acl_group; + + typedef [switch_type(uint16)] union { + [case (SMB_ACL_USER)] smb_acl_user user; + [case (SMB_ACL_USER_OBJ)]; + [case (SMB_ACL_GROUP)] smb_acl_group group; + [case (SMB_ACL_GROUP_OBJ)]; + [case (SMB_ACL_OTHER)]; + [case (SMB_ACL_MASK)]; + } smb_acl_entry_info; + + typedef struct { + smb_acl_tag_t a_type; + [switch_is(a_type)] smb_acl_entry_info info; + mode_t a_perm; } smb_acl_entry; [public] typedef struct { - int size; + [value(0)] int size; int count; - int next; + [value(0)] int next; [size_is(count)] smb_acl_entry acl[*]; } smb_acl_t; |