summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-07-24 14:13:42 -0700
committerJeremy Allison <jra@samba.org>2009-07-24 14:13:42 -0700
commitd373f0b77ca53e3c5282a9a643897dfb477ada21 (patch)
tree5531a4111351dd878148063dba88db08f554b4aa
parent1bab4fdaafd5930a02ae5a0d603176720ef15220 (diff)
downloadsamba-d373f0b77ca53e3c5282a9a643897dfb477ada21.tar.gz
samba-d373f0b77ca53e3c5282a9a643897dfb477ada21.tar.bz2
samba-d373f0b77ca53e3c5282a9a643897dfb477ada21.zip
For some strange reason using :
uint8 hash[XATTR_SD_HASH_SIZE]; doesn't have the same effect as : uint8 hash[64]; Jeremy.
-rw-r--r--librpc/gen_ndr/ndr_xattr.c7
-rw-r--r--librpc/gen_ndr/xattr.h2
-rw-r--r--librpc/idl/xattr.idl2
3 files changed, 5 insertions, 6 deletions
diff --git a/librpc/gen_ndr/ndr_xattr.c b/librpc/gen_ndr/ndr_xattr.c
index 3d09f00864..adf0dffb65 100644
--- a/librpc/gen_ndr/ndr_xattr.c
+++ b/librpc/gen_ndr/ndr_xattr.c
@@ -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--;
}
diff --git a/librpc/gen_ndr/xattr.h b/librpc/gen_ndr/xattr.h
index 39f1cb0884..3138e6fa24 100644
--- a/librpc/gen_ndr/xattr.h
+++ b/librpc/gen_ndr/xattr.h
@@ -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 {
diff --git a/librpc/idl/xattr.idl b/librpc/idl/xattr.idl
index c2b8bb0cc2..4485caa48f 100644
--- a/librpc/idl/xattr.idl
+++ b/librpc/idl/xattr.idl
@@ -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 {