[PATCH] move netlogon_samlogon_response to idl

Günther Deschner gd at samba.org
Wed Jun 29 13:16:50 UTC 2016


Arg, stupid me!

Here it is :)

On 29/06/16 15:15, Ralph Boehme wrote:
> On Wed, Jun 29, 2016 at 03:05:19PM +0200, Günther Deschner wrote:
>> Hi,
>>
>> this ...
> 
> ...attachment was taketh away. :)
> 
> Cheerio!
> -slow
> 


-- 
Günther Deschner                    GPG-ID: 8EE11688
Red Hat                         gdeschner at redhat.com
Samba Team                              gd at samba.org
-------------- next part --------------
From 8534f5fb3874dd77fbb4aada5e5d1ad841ae15f4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd at samba.org>
Date: Tue, 28 Jun 2016 18:40:25 +0200
Subject: [PATCH] librpc: add decode_netlogon_samlogon_response_packet for
 mailslot debugging.

Guenther

Signed-off-by: Guenther Deschner <gd at samba.org>
---
 librpc/idl/nbt.idl   | 15 +++++++++++++++
 librpc/ndr/ndr_nbt.h | 11 -----------
 2 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/librpc/idl/nbt.idl b/librpc/idl/nbt.idl
index ef3f074..211095d 100644
--- a/librpc/idl/nbt.idl
+++ b/librpc/idl/nbt.idl
@@ -482,6 +482,21 @@ interface nbt
 		uint16               lm20_token;
 	} NETLOGON_SAM_LOGON_RESPONSE_EX;
 
+	typedef [nopush,nopull] union {
+		[case(NETLOGON_NT_VERSION_1)] NETLOGON_SAM_LOGON_RESPONSE_NT40 nt4;
+		[case(NETLOGON_NT_VERSION_5)] NETLOGON_SAM_LOGON_RESPONSE nt5;
+		[case(NETLOGON_NT_VERSION_5EX)] NETLOGON_SAM_LOGON_RESPONSE_EX nt5_ex;
+	} netlogon_samlogon_response_union;
+
+	typedef [nopush,nopull] struct {
+		uint32 ntver;
+		[switch_is(ntver)] netlogon_samlogon_response_union data;
+	} netlogon_samlogon_response;
+
+	void decode_netlogon_samlogon_response_packet(
+		[in] netlogon_samlogon_response packet
+		);
+
 	/* query for pdc request */
 	typedef struct {
 		astring              computer_name;
diff --git a/librpc/ndr/ndr_nbt.h b/librpc/ndr/ndr_nbt.h
index 870ee43..edb2bf7 100644
--- a/librpc/ndr/ndr_nbt.h
+++ b/librpc/ndr/ndr_nbt.h
@@ -30,17 +30,6 @@
 
 NDR_SCALAR_PROTO(nbt_string, const char *)
 
-struct netlogon_samlogon_response
-{
-	uint32_t ntver;
-	union {
-		struct NETLOGON_SAM_LOGON_RESPONSE_NT40 nt4;
-		struct NETLOGON_SAM_LOGON_RESPONSE nt5;
-		struct NETLOGON_SAM_LOGON_RESPONSE_EX nt5_ex;
-	} data;
-
-};
-
 enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_REQUEST(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_SAM_LOGON_REQUEST *r);
 enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_REQUEST(struct ndr_pull *ndr, int ndr_flags, struct NETLOGON_SAM_LOGON_REQUEST *r);
 enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_RESPONSE_EX_with_flags(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_SAM_LOGON_RESPONSE_EX *r);
-- 
2.5.5

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160629/26603cab/signature.sig>


More information about the samba-technical mailing list