svn commit: samba r8368 - in branches/SAMBA_4_0/source: cldap_server librpc/idl torture/ldap

metze at samba.org metze at samba.org
Tue Jul 12 09:40:34 GMT 2005


Author: metze
Date: 2005-07-12 09:40:34 +0000 (Tue, 12 Jul 2005)
New Revision: 8368

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8368

Log:
the type filed depends on the user being present or not

call ndr_print for each call

metze
Modified:
   branches/SAMBA_4_0/source/cldap_server/netlogon.c
   branches/SAMBA_4_0/source/librpc/idl/nbt.idl
   branches/SAMBA_4_0/source/torture/ldap/cldap.c


Changeset:
Modified: branches/SAMBA_4_0/source/cldap_server/netlogon.c
===================================================================
--- branches/SAMBA_4_0/source/cldap_server/netlogon.c	2005-07-12 09:31:41 UTC (rev 8367)
+++ branches/SAMBA_4_0/source/cldap_server/netlogon.c	2005-07-12 09:40:34 UTC (rev 8368)
@@ -108,6 +108,7 @@
 	switch (version & 0xF) {
 	case 0:
 	case 1:
+		netlogon->logon1.type        = (user?19+2:19);
 		netlogon->logon1.pdc_name    = pdc_name;
 		netlogon->logon1.user_name   = user;
 		netlogon->logon1.domain_name = flatname;
@@ -117,6 +118,7 @@
 		break;
 	case 2:
 	case 3:
+		netlogon->logon3.type         = (user?19+2:19);
 		netlogon->logon3.pdc_name     = pdc_name;
 		netlogon->logon3.user_name    = user;
 		netlogon->logon3.domain_name  = flatname;
@@ -133,6 +135,7 @@
 	case 5:
 	case 6:
 	case 7:
+		netlogon->logon5.type         = (user?23+2:23);
 		netlogon->logon5.server_type  = server_type;
 		netlogon->logon5.domain_uuid  = domain_uuid;
 		netlogon->logon5.forest       = realm;
@@ -147,6 +150,7 @@
 		netlogon->logon5.lm20_token   = 0xFFFF;
 		break;
 	default:
+		netlogon->logon13.type         = (user?23+2:23);
 		netlogon->logon13.server_type  = server_type;
 		netlogon->logon13.domain_uuid  = domain_uuid;
 		netlogon->logon13.forest       = realm;
@@ -181,7 +185,7 @@
 	int i;
 	const char *domain = NULL;
 	const char *host = NULL;
-	const char *user = "";
+	const char *user = NULL;
 	const char *domain_guid = NULL;
 	const char *domain_sid = NULL;
 	int acct_control = -1;

Modified: branches/SAMBA_4_0/source/librpc/idl/nbt.idl
===================================================================
--- branches/SAMBA_4_0/source/librpc/idl/nbt.idl	2005-07-12 09:31:41 UTC (rev 8367)
+++ branches/SAMBA_4_0/source/librpc/idl/nbt.idl	2005-07-12 09:40:34 UTC (rev 8368)
@@ -454,7 +454,7 @@
 	   quite identical to, the netlogon structures above */
 
 	typedef struct {
-		[value(21)] uint16   type;
+		uint16               type;
 		nstring              pdc_name;
 		nstring              user_name;
 		nstring              domain_name;
@@ -464,7 +464,7 @@
 	} nbt_cldap_netlogon_1;
 
 	typedef struct {
-		[value(21)] uint16   type;
+		uint16               type;
 		nstring              pdc_name;
 		nstring              user_name;
 		nstring              domain_name;
@@ -481,7 +481,7 @@
 	} nbt_cldap_netlogon_3;
 
 	typedef struct {
-		[value(25)] uint32   type;
+		uint32               type;
 		nbt_server_type      server_type;
 		GUID                 domain_uuid;
 		nbt_string           forest;
@@ -498,7 +498,7 @@
 	} nbt_cldap_netlogon_5;
 
 	typedef struct {
-		[value(25)] uint32   type;
+		uint32               type;
 		nbt_server_type      server_type;
 		GUID                 domain_uuid;
 		nbt_string           forest;

Modified: branches/SAMBA_4_0/source/torture/ldap/cldap.c
===================================================================
--- branches/SAMBA_4_0/source/torture/ldap/cldap.c	2005-07-12 09:31:41 UTC (rev 8367)
+++ branches/SAMBA_4_0/source/torture/ldap/cldap.c	2005-07-12 09:40:34 UTC (rev 8368)
@@ -32,9 +32,14 @@
 		       __location__, nt_errstr(status), nt_errstr(correct)); \
 		ret = False; \
 		goto done; \
-	}} while (0)
+	} \
+	if (DEBUGLVL(10)) { \
+		NDR_PRINT_UNION_DEBUG(nbt_cldap_netlogon, \
+				      search.in.version & 0xF, \
+				      &search.out.netlogon); \
+	} \
+} while (0)
 
-
 /*
   test netlogon operations
 */
@@ -72,11 +77,6 @@
 		printf("Trying netlogon level %d\n", i);
 		status = cldap_netlogon(cldap, mem_ctx, &search);
 		CHECK_STATUS(status, NT_STATUS_OK);
-		if (DEBUGLVL(10)) {
-			NDR_PRINT_UNION_DEBUG(nbt_cldap_netlogon, 
-					      search.in.version & 0xF, 
-					      &search.out.netlogon);
-		}
 	}
 
 	printf("Scanning for netlogon level bits\n");
@@ -85,11 +85,6 @@
 		printf("Trying netlogon level 0x%x\n", i);
 		status = cldap_netlogon(cldap, mem_ctx, &search);
 		CHECK_STATUS(status, NT_STATUS_OK);
-		if (DEBUGLVL(10)) {
-			NDR_PRINT_UNION_DEBUG(nbt_cldap_netlogon, 
-					      search.in.version & 0xF, 
-					      &search.out.netlogon);
-		}
 	}
 
 	search.in.version = 6;



More information about the samba-cvs mailing list