From 1bab4fdaafd5930a02ae5a0d603176720ef15220 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 24 Jul 2009 14:09:42 -0700 Subject: Fix hash function in acl_xattr to be SHA256, make the hash function selectable. Upgrade version. Compiles but not fully tested yet (coming). Make vfs_acl_tdb.c compile - this needs updating to match acl_xattr (also coming soon). Jeremy. --- librpc/gen_ndr/xattr.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'librpc/gen_ndr/xattr.h') diff --git a/librpc/gen_ndr/xattr.h b/librpc/gen_ndr/xattr.h index 1ce58f7ec6..39f1cb0884 100644 --- a/librpc/gen_ndr/xattr.h +++ b/librpc/gen_ndr/xattr.h @@ -17,6 +17,9 @@ #define XATTR_MAX_STREAM_SIZE ( 0x4000 ) #define XATTR_MAX_STREAM_SIZE_TDB ( 0x100000 ) #define XATTR_NTACL_NAME ( "security.NTACL" ) +#define XATTR_SD_HASH_SIZE ( 64 ) +#define XATTR_SD_HASH_TYPE_NONE ( 0x0 ) +#define XATTR_SD_HASH_TYPE_SHA256 ( 0x1 ) struct xattr_DosInfo1 { uint32_t attrib; uint32_t ea_size; @@ -75,14 +78,21 @@ struct xattr_DosStreams { struct xattr_DosStream *streams;/* [unique,size_is(num_streams)] */ }/* [public] */; -struct security_descriptor_hash { +struct security_descriptor_hash_v2 { struct security_descriptor *sd;/* [unique] */ uint8_t hash[16]; }/* [public] */; +struct security_descriptor_hash_v3 { + struct security_descriptor *sd;/* [unique] */ + uint16_t hash_type; + uint8_t *hash; +}/* [public] */; + union xattr_NTACL_Info { struct security_descriptor *sd;/* [unique,case] */ - struct security_descriptor_hash *sd_hs;/* [unique,case(2)] */ + struct security_descriptor_hash_v2 *sd_hs2;/* [unique,case(2)] */ + struct security_descriptor_hash_v3 *sd_hs3;/* [unique,case(3)] */ }/* [switch_type(uint16)] */; struct xattr_NTACL { -- cgit