mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s4:torture/rpc: avoid compiler warnings
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
3e9e03fb56
commit
698b69e702
@ -2756,7 +2756,7 @@ static bool check_dom_trust_pw(struct dcerpc_pipe *p,
|
|||||||
struct cli_credentials *credentials;
|
struct cli_credentials *credentials;
|
||||||
char *dummy;
|
char *dummy;
|
||||||
struct netlogon_creds_CredentialState *creds;
|
struct netlogon_creds_CredentialState *creds;
|
||||||
struct dcerpc_pipe *pipe;
|
struct dcerpc_pipe *p2;
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
bool ok;
|
bool ok;
|
||||||
|
|
||||||
@ -2776,7 +2776,7 @@ static bool check_dom_trust_pw(struct dcerpc_pipe *p,
|
|||||||
trusted_dom_name, CRED_SPECIFIED);
|
trusted_dom_name, CRED_SPECIFIED);
|
||||||
cli_credentials_set_secure_channel_type(credentials, SEC_CHAN_DOMAIN);
|
cli_credentials_set_secure_channel_type(credentials, SEC_CHAN_DOMAIN);
|
||||||
|
|
||||||
status = dcerpc_pipe_connect_b(tctx, &pipe, p->binding,
|
status = dcerpc_pipe_connect_b(tctx, &p2, p->binding,
|
||||||
&ndr_table_netlogon,
|
&ndr_table_netlogon,
|
||||||
cli_credentials_init_anon(tctx),
|
cli_credentials_init_anon(tctx),
|
||||||
tctx->ev, tctx->lp_ctx);
|
tctx->ev, tctx->lp_ctx);
|
||||||
@ -2785,10 +2785,10 @@ static bool check_dom_trust_pw(struct dcerpc_pipe *p,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ok = check_pw_with_ServerAuthenticate3(pipe, tctx,
|
ok = check_pw_with_ServerAuthenticate3(p2, tctx,
|
||||||
NETLOGON_NEG_AUTH2_ADS_FLAGS,
|
NETLOGON_NEG_AUTH2_ADS_FLAGS,
|
||||||
credentials, &creds);
|
credentials, &creds);
|
||||||
talloc_free(pipe);
|
talloc_free(p2);
|
||||||
|
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
@ -1649,9 +1649,8 @@ bool torture_rpc_samlogon(struct torture_context *torture)
|
|||||||
bool ret = true;
|
bool ret = true;
|
||||||
struct test_join *join_ctx = NULL;
|
struct test_join *join_ctx = NULL;
|
||||||
struct test_join *user_ctx = NULL, *user_ctx_wrong_wks = NULL, *user_ctx_wrong_time = NULL;
|
struct test_join *user_ctx = NULL, *user_ctx_wrong_wks = NULL, *user_ctx_wrong_time = NULL;
|
||||||
char *user_password, *user_password_wrong_wks, *user_password_wrong_time;
|
const char *old_user_password, *user_password_wrong_wks, *user_password_wrong_time;
|
||||||
const char *old_user_password;
|
char *user_password;
|
||||||
char *test_machine_account;
|
|
||||||
const char *userdomain;
|
const char *userdomain;
|
||||||
struct samr_SetUserInfo s;
|
struct samr_SetUserInfo s;
|
||||||
union samr_UserInfo u;
|
union samr_UserInfo u;
|
||||||
@ -1672,7 +1671,6 @@ bool torture_rpc_samlogon(struct torture_context *torture)
|
|||||||
torture_assert(torture, handle_minPwdAge(torture, mem_ctx, true),
|
torture_assert(torture, handle_minPwdAge(torture, mem_ctx, true),
|
||||||
"handle_minPwdAge error!");
|
"handle_minPwdAge error!");
|
||||||
|
|
||||||
test_machine_account = talloc_asprintf(mem_ctx, "%s$", TEST_MACHINE_NAME);
|
|
||||||
/* We only need to join as a workstation here, and in future,
|
/* We only need to join as a workstation here, and in future,
|
||||||
* if we wish to test against trusted domains, we must be a
|
* if we wish to test against trusted domains, we must be a
|
||||||
* workstation here */
|
* workstation here */
|
||||||
@ -1686,12 +1684,14 @@ bool torture_rpc_samlogon(struct torture_context *torture)
|
|||||||
TEST_USER_NAME,
|
TEST_USER_NAME,
|
||||||
userdomain,
|
userdomain,
|
||||||
ACB_NORMAL,
|
ACB_NORMAL,
|
||||||
(const char **)&user_password);
|
&old_user_password);
|
||||||
torture_assert(torture, user_ctx, "Failed to create a test user\n");
|
torture_assert(torture, user_ctx, "Failed to create a test user\n");
|
||||||
|
|
||||||
old_user_password = user_password;
|
user_password = talloc_strdup(torture, old_user_password);
|
||||||
|
torture_assert(torture, user_password != NULL, "Failed to copy old_user_password\n");
|
||||||
|
|
||||||
tmp_p = torture_join_samr_pipe(user_ctx);
|
tmp_p = torture_join_samr_pipe(user_ctx);
|
||||||
|
torture_assert(torture, tmp_p, "torture_join_samr_pipe failed\n");
|
||||||
test_ChangePasswordUser3(tmp_p, torture,
|
test_ChangePasswordUser3(tmp_p, torture,
|
||||||
TEST_USER_NAME, 16 /* > 14 */, &user_password,
|
TEST_USER_NAME, 16 /* > 14 */, &user_password,
|
||||||
NULL, 0, false);
|
NULL, 0, false);
|
||||||
@ -1700,7 +1700,7 @@ bool torture_rpc_samlogon(struct torture_context *torture)
|
|||||||
TEST_USER_NAME_WRONG_WKS,
|
TEST_USER_NAME_WRONG_WKS,
|
||||||
userdomain,
|
userdomain,
|
||||||
ACB_NORMAL,
|
ACB_NORMAL,
|
||||||
(const char **)&user_password_wrong_wks);
|
&user_password_wrong_wks);
|
||||||
torture_assert(torture, user_ctx_wrong_wks,
|
torture_assert(torture, user_ctx_wrong_wks,
|
||||||
"Failed to create a test user (wrong workstation test)\n");
|
"Failed to create a test user (wrong workstation test)\n");
|
||||||
|
|
||||||
@ -1723,7 +1723,7 @@ bool torture_rpc_samlogon(struct torture_context *torture)
|
|||||||
= torture_create_testuser(torture, TEST_USER_NAME_WRONG_TIME,
|
= torture_create_testuser(torture, TEST_USER_NAME_WRONG_TIME,
|
||||||
userdomain,
|
userdomain,
|
||||||
ACB_NORMAL,
|
ACB_NORMAL,
|
||||||
(const char **)&user_password_wrong_time);
|
&user_password_wrong_time);
|
||||||
torture_assert(torture, user_ctx_wrong_time,
|
torture_assert(torture, user_ctx_wrong_time,
|
||||||
"Failed to create a test user (wrong workstation test)\n");
|
"Failed to create a test user (wrong workstation test)\n");
|
||||||
|
|
||||||
|
@ -554,7 +554,6 @@ static bool test_schannel_anonymous_setPassword(struct torture_context *tctx,
|
|||||||
uint32_t dcerpc_flags,
|
uint32_t dcerpc_flags,
|
||||||
bool use2)
|
bool use2)
|
||||||
{
|
{
|
||||||
struct test_join *join_ctx;
|
|
||||||
NTSTATUS status, result;
|
NTSTATUS status, result;
|
||||||
const char *binding = torture_setting_string(tctx, "binding", NULL);
|
const char *binding = torture_setting_string(tctx, "binding", NULL);
|
||||||
struct dcerpc_binding *b;
|
struct dcerpc_binding *b;
|
||||||
@ -790,6 +789,7 @@ struct torture_schannel_bench {
|
|||||||
bool stopped;
|
bool stopped;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if 0
|
||||||
static void torture_schannel_bench_connected(struct composite_context *c)
|
static void torture_schannel_bench_connected(struct composite_context *c)
|
||||||
{
|
{
|
||||||
struct torture_schannel_bench_conn *conn =
|
struct torture_schannel_bench_conn *conn =
|
||||||
@ -803,6 +803,7 @@ static void torture_schannel_bench_connected(struct composite_context *c)
|
|||||||
s->nconns++;
|
s->nconns++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void torture_schannel_bench_recv(struct tevent_req *subreq);
|
static void torture_schannel_bench_recv(struct tevent_req *subreq);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user