summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr/ndr_basic.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-12-01 03:19:43 +0000
committerAndrew Tridgell <tridge@samba.org>2003-12-01 03:19:43 +0000
commit5b46116923fb7c2945db128736b7f8113ea1a160 (patch)
tree7a5fec775d4f7d9fe5e20bcd5a4d13e5104be620 /source4/librpc/ndr/ndr_basic.c
parentb0531a38cc7135538d251440ac4fc2c887d9f335 (diff)
downloadsamba-5b46116923fb7c2945db128736b7f8113ea1a160.tar.gz
samba-5b46116923fb7c2945db128736b7f8113ea1a160.tar.bz2
samba-5b46116923fb7c2945db128736b7f8113ea1a160.zip
added netr_ServerReqChallenge and cleaned up byte array printing
(This used to be commit bb42107dccf3a384a4a5c029b4d2752e0898d7cb)
Diffstat (limited to 'source4/librpc/ndr/ndr_basic.c')
-rw-r--r--source4/librpc/ndr/ndr_basic.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c
index 32cc7bac5f..0300bdd3fb 100644
--- a/source4/librpc/ndr/ndr_basic.c
+++ b/source4/librpc/ndr/ndr_basic.c
@@ -707,6 +707,16 @@ void ndr_print_array_uint8(struct ndr_print *ndr, const char *name,
{
int i;
+ if (count <= 32 && (ndr->flags & LIBNDR_PRINT_ARRAY_HEX)) {
+ char s[65];
+ for (i=0;i<count;i++) {
+ snprintf(&s[i*2], 3, "%02x", data[i]);
+ }
+ s[i*2] = 0;
+ ndr->print(ndr, "%-25s: %s", name, s);
+ return;
+ }
+
ndr->print(ndr, "%s: ARRAY(%d)", name, count);
ndr->depth++;
for (i=0;i<count;i++) {
@@ -830,14 +840,3 @@ NTSTATUS ndr_pull_DATA_BLOB(struct ndr_pull *ndr, DATA_BLOB *blob)
ndr->offset += length;
return NT_STATUS_OK;
}
-
-
-void ndr_print_policy_handle(struct ndr_print *ndr, const char *name, struct policy_handle *r)
-{
- ndr->print(ndr, "%-25s: policy_handle %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
- name,
- r->data[0], r->data[1], r->data[2], r->data[3], r->data[4],
- r->data[5], r->data[6], r->data[7], r->data[8], r->data[9],
- r->data[10], r->data[11], r->data[12], r->data[13], r->data[14],
- r->data[15], r->data[16], r->data[17], r->data[18], r->data[19]);
-}