diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-10-31 03:00:36 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:45:32 -0500 |
commit | b4b155c970268bbbb47781b560fdeec140cec5ec (patch) | |
tree | 90d1a8123adc04daded6b1430d321f46b30ddcd9 /source4/torture | |
parent | 6779373ec4eec8b2fe464b77b981f4e050a5766d (diff) | |
download | samba-b4b155c970268bbbb47781b560fdeec140cec5ec.tar.gz samba-b4b155c970268bbbb47781b560fdeec140cec5ec.tar.bz2 samba-b4b155c970268bbbb47781b560fdeec140cec5ec.zip |
r11406: 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
(This used to be commit f140117535c3281f0a0a7970ea4127498737d112)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rpc/testjoin.c | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c index 57d56e1ce8..d0b1e5c9bf 100644 --- a/source4/torture/rpc/testjoin.c +++ b/source4/torture/rpc/testjoin.c @@ -112,8 +112,6 @@ struct test_join *torture_create_testuser(const char *username, 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 @@ again: 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 *torture_join_domain(const char *machine_name, 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 @@ struct test_join *torture_join_domain(const char *machine_name, } 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 @@ struct test_join *torture_join_domain(const char *machine_name, 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 @@ struct policy_handle *torture_join_samr_user_policy(struct test_join *join) 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 @@ NTSTATUS torture_leave_ads_domain(TALLOC_CTX *mem_ctx, struct libnet_JoinDomain DEBUG(0, ("%s removed successfully.\n", libnet_r->out.server_dn_str)); talloc_free(tmp_ctx); - return status; + return NT_STATUS_OK; } /* |