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

abartlet at samba.org abartlet at samba.org
Mon Oct 31 03:00:38 GMT 2005


Author: abartlet
Date: 2005-10-31 03:00:36 +0000 (Mon, 31 Oct 2005)
New Revision: 11406

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

Log:
Clean up uninitialised value warnings found by -01.

The warnings were caused by the structure assignements, which we don't
need to do.  The actual values are filled in by the NDR layer later.

Andrew Bartlett

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


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/testjoin.c
===================================================================
--- branches/SAMBA_4_0/source/torture/rpc/testjoin.c	2005-10-31 02:58:29 UTC (rev 11405)
+++ branches/SAMBA_4_0/source/torture/rpc/testjoin.c	2005-10-31 03:00:36 UTC (rev 11406)
@@ -112,8 +112,6 @@
 	uint32_t rid;
 	DATA_BLOB session_key;
 	struct lsa_String name;
-	struct lsa_String comment;
-	struct lsa_String full_name;
 	
 	int policy_min_pw_len = 0;
 	struct test_join *join;
@@ -243,15 +241,15 @@
 
 	u.info21.acct_flags = acct_type;
 	u.info21.fields_present = SAMR_FIELD_ACCT_FLAGS | SAMR_FIELD_DESCRIPTION | SAMR_FIELD_COMMENT | SAMR_FIELD_FULL_NAME;
-	comment.string = talloc_asprintf(join, 
-					 "Tortured by Samba4: %s", 
-					 timestring(join, time(NULL)));
-	u.info21.comment = comment;
-	full_name.string = talloc_asprintf(join, 
-					 "Torture account for Samba4: %s", 
-					 timestring(join, time(NULL)));
-	u.info21.full_name = full_name;
 
+	u.info21.comment.string = talloc_asprintf(join, 
+						  "Tortured by Samba4: %s", 
+						  timestring(join, time(NULL)));
+	
+	u.info21.full_name.string = talloc_asprintf(join, 
+						    "Torture account for Samba4: %s", 
+						    timestring(join, time(NULL)));
+	
 	u.info21.description.string = talloc_asprintf(join, 
 					 "Samba4 torture account created by host %s: %s", 
 					 lp_netbios_name(), timestring(join, time(NULL)));
@@ -286,8 +284,6 @@
 	struct test_join *tj;
 	struct samr_SetUserInfo s;
 	union samr_UserInfo u;
-	struct lsa_String comment;
-	struct lsa_String full_name;
 	
 	tj = talloc(NULL, struct test_join);
 	if (!tj) return NULL;
@@ -320,6 +316,7 @@
 	}
 	
 	libnet_r->in.acct_type = acct_flags;
+	libnet_r->in.recreate_account = True;
 
 	status = libnet_JoinDomain(libnet_ctx, libnet_r, libnet_r);
 	if (NT_STATUS_EQUAL(status, NT_STATUS_USER_EXISTS)) {
@@ -356,15 +353,13 @@
 	s.in.level = 21;
 
 	u.info21.fields_present = SAMR_FIELD_DESCRIPTION | SAMR_FIELD_COMMENT | SAMR_FIELD_FULL_NAME;
-	comment.string = talloc_asprintf(tj, 
-					 "Tortured by Samba4: %s", 
-					 timestring(tj, time(NULL)));
-	u.info21.comment = comment;
-	full_name.string = talloc_asprintf(tj, 
-					 "Torture account for Samba4: %s", 
-					 timestring(tj, time(NULL)));
-	u.info21.full_name = full_name;
-
+	u.info21.comment.string = talloc_asprintf(tj, 
+						  "Tortured by Samba4: %s", 
+						  timestring(tj, time(NULL)));
+	u.info21.full_name.string = talloc_asprintf(tj, 
+						    "Torture account for Samba4: %s", 
+						    timestring(tj, time(NULL)));
+	
 	u.info21.description.string = talloc_asprintf(tj, 
 						      "Samba4 torture account created by host %s: %s", 
 						      lp_netbios_name(), timestring(tj, time(NULL)));
@@ -415,7 +410,6 @@
 
 NTSTATUS torture_leave_ads_domain(TALLOC_CTX *mem_ctx, struct libnet_JoinDomain *libnet_r)
 {
-	NTSTATUS status;
 	int rtn;
 	TALLOC_CTX *tmp_ctx;
 
@@ -474,7 +468,7 @@
 	DEBUG(0, ("%s removed successfully.\n", libnet_r->out.server_dn_str));
 
 	talloc_free(tmp_ctx); 
-	return status;
+	return NT_STATUS_OK;
 }
 
 /*



More information about the samba-cvs mailing list