For some strange reason using :
authorJeremy Allison <jra@samba.org>
Fri, 24 Jul 2009 21:13:42 +0000 (14:13 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 24 Jul 2009 21:13:42 +0000 (14:13 -0700)
uint8 hash[XATTR_SD_HASH_SIZE];
doesn't have the same effect as :
uint8 hash[64];
Jeremy.

librpc/gen_ndr/ndr_xattr.c
librpc/gen_ndr/xattr.h
librpc/idl/xattr.idl

index 3d09f008644b1bd5b93dff97c511b5ee1735ff93..adf0dffb652f1c6e88bb4383fe7695420531a235 100644 (file)
@@ -606,7 +606,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_security_descriptor_hash_v3(struct ndr_push
                NDR_CHECK(ndr_push_align(ndr, 4));
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->sd));
                NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->hash_type));
-               NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->hash, XATTR_SD_HASH_SIZE));
+               NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->hash, 64));
        }
        if (ndr_flags & NDR_BUFFERS) {
                if (r->sd) {
@@ -629,8 +629,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_security_descriptor_hash_v3(struct ndr_pull
                        r->sd = NULL;
                }
                NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->hash_type));
-               NDR_PULL_ALLOC_N(ndr, r->hash, XATTR_SD_HASH_SIZE);
-               NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, XATTR_SD_HASH_SIZE));
+               NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, 64));
        }
        if (ndr_flags & NDR_BUFFERS) {
                if (r->sd) {
@@ -654,7 +653,7 @@ _PUBLIC_ void ndr_print_security_descriptor_hash_v3(struct ndr_print *ndr, const
        }
        ndr->depth--;
        ndr_print_uint16(ndr, "hash_type", r->hash_type);
-       ndr_print_array_uint8(ndr, "hash", r->hash, XATTR_SD_HASH_SIZE);
+       ndr_print_array_uint8(ndr, "hash", r->hash, 64);
        ndr->depth--;
 }
 
index 39f1cb088432de38367444c31d270e445b3e246f..3138e6fa247282c7de7654da5a42141ec702ef87 100644 (file)
@@ -86,7 +86,7 @@ struct security_descriptor_hash_v2 {
 struct security_descriptor_hash_v3 {
        struct security_descriptor *sd;/* [unique] */
        uint16_t hash_type;
-       uint8_t *hash;
+       uint8_t hash[64];
 }/* [public] */;
 
 union xattr_NTACL_Info {
index c2b8bb0cc208d0285dbd857ec9bd2469cc65e9c3..4485caa48f4dbcdaf0a9bdac25cf2c2d05a1f60a 100644 (file)
@@ -135,7 +135,7 @@ interface xattr
        typedef [public] struct {
                security_descriptor *sd;
                uint16 hash_type;
-               uint8 hash[XATTR_SD_HASH_SIZE]; /* 64 bytes hash. */
+               uint8 hash[64]; /* 64 bytes hash. */
        } security_descriptor_hash_v3;
 
        typedef [switch_type(uint16)] union {