[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Thu Mar 11 15:25:22 MST 2010


The branch, master has been updated
       via  98ba174... s4-smbtorture: add netr_SamLogon test with NULL domain to RPC-NETLOGON-S3.
      from  222b955... Moved access_check_on_dn from acl module as an utility.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 98ba174fa2bd174de58b9c97ba16627ff77374e8
Author: Günther Deschner <gd at samba.org>
Date:   Thu Mar 11 23:15:14 2010 +0100

    s4-smbtorture: add netr_SamLogon test with NULL domain to RPC-NETLOGON-S3.
    
    This is to demonstrate how a "Windows 2002 Service Pack 3 2600" box constantly
    crashes smbd (in preparation of fixing bug #7237).
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source4/torture/rpc/netlogon.c |   34 ++++++++++++++++++++++++++++++----
 1 files changed, 30 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index c2ff86d..dd23c6e 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -660,9 +660,10 @@ static bool test_GetTrustPasswords(struct torture_context *tctx,
 /*
   try a netlogon SamLogon
 */
-bool test_netlogon_ops(struct dcerpc_pipe *p, struct torture_context *tctx,
-			      struct cli_credentials *credentials, 
-			      struct netlogon_creds_CredentialState *creds)
+static bool test_netlogon_ops_args(struct dcerpc_pipe *p, struct torture_context *tctx,
+				   struct cli_credentials *credentials,
+				   struct netlogon_creds_CredentialState *creds,
+				   bool null_domain)
 {
 	NTSTATUS status;
 	struct netr_LogonSamLogon r;
@@ -685,7 +686,11 @@ bool test_netlogon_ops(struct dcerpc_pipe *p, struct torture_context *tctx,
 	cli_credentials_get_ntlm_username_domain(cmdline_credentials, tctx, 
 						 &ninfo.identity_info.account_name.string,
 						 &ninfo.identity_info.domain_name.string);
-	
+
+	if (null_domain) {
+		ninfo.identity_info.domain_name.string = NULL;
+	}
+
 	generate_random_buffer(ninfo.challenge, 
 			       sizeof(ninfo.challenge));
 	chal = data_blob_const(ninfo.challenge, 
@@ -757,6 +762,13 @@ bool test_netlogon_ops(struct dcerpc_pipe *p, struct torture_context *tctx,
 	return true;
 }
 
+bool test_netlogon_ops(struct dcerpc_pipe *p, struct torture_context *tctx,
+		       struct cli_credentials *credentials,
+		       struct netlogon_creds_CredentialState *creds)
+{
+	return test_netlogon_ops_args(p, tctx, credentials, creds, false);
+}
+
 /*
   try a netlogon SamLogon
 */
@@ -773,6 +785,19 @@ static bool test_SamLogon(struct torture_context *tctx,
 	return test_netlogon_ops(p, tctx, credentials, creds);
 }
 
+static bool test_SamLogon_NULL_domain(struct torture_context *tctx,
+				      struct dcerpc_pipe *p,
+				      struct cli_credentials *credentials)
+{
+	struct netlogon_creds_CredentialState *creds;
+
+	if (!test_SetupCredentials(p, tctx, credentials, &creds)) {
+		return false;
+	}
+
+	return test_netlogon_ops_args(p, tctx, credentials, creds, true);
+}
+
 /* we remember the sequence numbers so we can easily do a DatabaseDelta */
 static uint64_t sequence_nums[3];
 
@@ -2939,6 +2964,7 @@ struct torture_suite *torture_rpc_netlogon_s3(TALLOC_CTX *mem_ctx)
 						  &ndr_table_netlogon, TEST_MACHINE_NAME);
 
 	torture_rpc_tcase_add_test_creds(tcase, "SamLogon", test_SamLogon);
+	torture_rpc_tcase_add_test_creds(tcase, "SamLogon_NULL_domain", test_SamLogon_NULL_domain);
 	torture_rpc_tcase_add_test_creds(tcase, "SetPassword", test_SetPassword);
 	torture_rpc_tcase_add_test_creds(tcase, "SetPassword_with_flags", test_SetPassword_with_flags);
 	torture_rpc_tcase_add_test_creds(tcase, "SetPassword2", test_SetPassword2);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list