s3:vfs_acl_common: also parse xattr.NTACL version 1
authorStefan Metzmacher <metze@samba.org>
Tue, 11 Oct 2011 10:37:56 +0000 (12:37 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 11 Oct 2011 12:16:25 +0000 (14:16 +0200)
This is what the source4/ntvfs/posix code uses.
It's also used at provision time to setup the sysvol permissions.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Oct 11 14:16:25 CEST 2011 on sn-devel-104

source3/modules/vfs_acl_common.c

index 2ed3cac2169b59a2ea4fc87ee6348bf649f4d47a..1947a77f07af56dd0bc9683468691d7675d11ef8 100644 (file)
@@ -93,6 +93,18 @@ static NTSTATUS parse_acl_blob(const DATA_BLOB *pblob,
        }
 
        switch (xacl.version) {
+               case 1:
+                       *ppdesc = make_sec_desc(ctx, SD_REVISION,
+                                       xacl.info.sd->type | SEC_DESC_SELF_RELATIVE,
+                                       xacl.info.sd->owner_sid,
+                                       xacl.info.sd->group_sid,
+                                       xacl.info.sd->sacl,
+                                       xacl.info.sd->dacl,
+                                       &sd_size);
+                       /* No hash - null out. */
+                       *p_hash_type = XATTR_SD_HASH_TYPE_NONE;
+                       memset(hash, '\0', XATTR_SD_HASH_SIZE);
+                       break;
                case 2:
                        *ppdesc = make_sec_desc(ctx, SD_REVISION,
                                        xacl.info.sd_hs2->sd->type | SEC_DESC_SELF_RELATIVE,