svn commit: samba r9921 - in branches/SOC/SAMBA_4_0/source/torture/rpc: .

brad at samba.org brad at samba.org
Thu Sep 1 21:37:54 GMT 2005


Author: brad
Date: 2005-09-01 21:37:54 +0000 (Thu, 01 Sep 2005)
New Revision: 9921

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

Log:
Added copyright statement.
Cleaned up unneeded variables from torture_join_domain().

Modified:
   branches/SOC/SAMBA_4_0/source/torture/rpc/testjoin.c


Changeset:
Modified: branches/SOC/SAMBA_4_0/source/torture/rpc/testjoin.c
===================================================================
--- branches/SOC/SAMBA_4_0/source/torture/rpc/testjoin.c	2005-09-01 21:34:13 UTC (rev 9920)
+++ branches/SOC/SAMBA_4_0/source/torture/rpc/testjoin.c	2005-09-01 21:37:54 UTC (rev 9921)
@@ -4,6 +4,7 @@
    utility code to join/leave a domain
 
    Copyright (C) Andrew Tridgell 2004
+   Copyright (C) Brad Henry 2005
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -289,7 +290,6 @@
 	struct libnet_context *libnet_ctx;
 	struct libnet_JoinDomain *libnet_r;
 	struct test_join *tj;
-	struct policy_handle *u_handle;
 	NTSTATUS status;
 
 	
@@ -310,18 +310,16 @@
 	 Call libnet_JoinDomain() rather than libnet_Join() -- it calls libnet_Join_primary_domain(), which puts 
 	 the machine acct info into secrets.tdb. We don't want that for a torture_join.
 	 */	
-	printf("joining domain.\n");
+	printf("Joining domain.\n");
 	
 	status = libnet_JoinDomain(libnet_ctx, mem_ctx, libnet_r);
 	if (!NT_STATUS_IS_OK(status)) {
 		return NULL;
 	}
-	
+
 	tj = talloc(mem_ctx, struct test_join);
-	
-	tj->p = talloc_steal(tj, libnet_r->out.samr_pipe);
-	u_handle = talloc_steal(tj, libnet_r->out.user_handle);
-	tj->user_handle = *u_handle;
+	tj->p = libnet_r->out.samr_pipe;
+	tj->user_handle = libnet_r->out.user_handle;
 	tj->dom_sid = dom_sid_string(tj, libnet_r->out.domain_sid);
 	*machine_password = talloc_steal(tj, libnet_r->out.join_password);
 	
@@ -329,11 +327,10 @@
 	  Leave domain. This will ensure that the info for the torture machine
 	  acct is what we are expecting when we rejoin again.
 	*/
-	printf("leaving domain.\n");
-	
+	printf("Leaving domain.\n");
 	torture_leave_domain(tj);
 	
-	printf("joining domain.\n");
+	printf("Joining domain.\n");
 	
 	status = libnet_JoinDomain(libnet_ctx, mem_ctx, libnet_r);
 	if (!NT_STATUS_IS_OK(status)) {
@@ -341,10 +338,8 @@
 	}
 	
 	tj = talloc(mem_ctx, struct test_join);
-	
-	tj->p = talloc_steal(tj, libnet_r->out.samr_pipe);
-	u_handle = talloc_steal(tj, libnet_r->out.user_handle);
-	tj->user_handle = *u_handle;
+	tj->p = libnet_r->out.samr_pipe;
+	tj->user_handle = libnet_r->out.user_handle;
 	tj->dom_sid = dom_sid_string(tj, libnet_r->out.domain_sid);
 	*machine_password = talloc_steal(tj, libnet_r->out.join_password);
 			



More information about the samba-cvs mailing list