[PATCH] support --ndr64 in ndrdump --validate

Günther Deschner gd at samba.org
Wed Aug 24 12:37:57 UTC 2016


Hi,

when calling ndrdump --validate the --ndr64 flag has not been honored in
the push path, attached patch fixes that.

Please review and push,

Guenther
-- 
Günther Deschner                    GPG-ID: 8EE11688
Red Hat                         gdeschner at redhat.com
Samba Team                              gd at samba.org
-------------- next part --------------
From 40f5a2a0fb14e7346ab82fdf95465a311efa5dae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd at samba.org>
Date: Tue, 23 Aug 2016 15:54:26 +0200
Subject: [PATCH] librpc/tools: support ndr64 in the validate path of ndrdump

Guenther

Signed-off-by: Guenther Deschner <gd at samba.org>
---
 librpc/tools/ndrdump.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/librpc/tools/ndrdump.c b/librpc/tools/ndrdump.c
index 2827e8d..d534e3c 100644
--- a/librpc/tools/ndrdump.c
+++ b/librpc/tools/ndrdump.c
@@ -493,7 +493,11 @@ static void ndr_print_dummy(struct ndr_print *ndr, const char *format, ...)
 		bool differ;
 
 		ndr_v_push = ndr_push_init_ctx(mem_ctx);
-		
+
+		if (assume_ndr64) {
+			ndr_v_push->flags |= LIBNDR_FLAG_NDR64;
+		}
+
 		ndr_err = f->ndr_push(ndr_v_push, flags, st);
 		status = ndr_map_error2ntstatus(ndr_err);
 		printf("push returned %s\n", nt_errstr(status));
-- 
2.7.4



More information about the samba-technical mailing list