diff options
author | Jeremy Allison <jra@samba.org> | 2017-05-09 16:28:53 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2017-05-12 00:37:29 +0200 |
commit | 91852dd0816a745f501b765a556b5985521c8119 (patch) | |
tree | 0713cf045dbadeb155433bbbef7e1a6870887785 /source4/torture/smb2 | |
parent | 4039e51a6fdb476d9865df74dfccf7a020ead141 (diff) | |
download | samba-91852dd0816a745f501b765a556b5985521c8119.tar.gz |
s4: torture: Remove use of local variables that are simply mirroring popt_get_cmdline_credentials().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri May 12 00:37:29 CEST 2017 on sn-devel-144
Diffstat (limited to 'source4/torture/smb2')
-rw-r--r-- | source4/torture/smb2/acls.c | 3 | ||||
-rw-r--r-- | source4/torture/smb2/oplock.c | 4 | ||||
-rw-r--r-- | source4/torture/smb2/replay.c | 6 | ||||
-rw-r--r-- | source4/torture/smb2/scan.c | 7 | ||||
-rw-r--r-- | source4/torture/smb2/util.c | 10 |
5 files changed, 13 insertions, 17 deletions
diff --git a/source4/torture/smb2/acls.c b/source4/torture/smb2/acls.c index fe30380df98..7365554470c 100644 --- a/source4/torture/smb2/acls.c +++ b/source4/torture/smb2/acls.c @@ -1872,7 +1872,6 @@ static bool torture_smb2_con_share(struct torture_context *tctx, struct smbcli_options options; NTSTATUS status; const char *host = torture_setting_string(tctx, "host", NULL); - struct cli_credentials *credentials = popt_get_cmdline_credentials(); lpcfg_smbcli_options(tctx->lp_ctx, &options); @@ -1881,7 +1880,7 @@ static bool torture_smb2_con_share(struct torture_context *tctx, lpcfg_smb_ports(tctx->lp_ctx), share, lpcfg_resolve_context(tctx->lp_ctx), - credentials, + popt_get_cmdline_credentials(), 0, tree, tctx->ev, diff --git a/source4/torture/smb2/oplock.c b/source4/torture/smb2/oplock.c index 635037b7124..858bdcfa46e 100644 --- a/source4/torture/smb2/oplock.c +++ b/source4/torture/smb2/oplock.c @@ -281,7 +281,6 @@ static bool open_smb2_connection_no_level2_oplocks(struct torture_context *tctx, NTSTATUS status; const char *host = torture_setting_string(tctx, "host", NULL); const char *share = torture_setting_string(tctx, "share", NULL); - struct cli_credentials *credentials = popt_get_cmdline_credentials(); struct smbcli_options options; lpcfg_smbcli_options(tctx->lp_ctx, &options); @@ -290,7 +289,8 @@ static bool open_smb2_connection_no_level2_oplocks(struct torture_context *tctx, status = smb2_connect(tctx, host, lpcfg_smb_ports(tctx->lp_ctx), share, lpcfg_resolve_context(tctx->lp_ctx), - credentials, tree, tctx->ev, &options, + popt_get_cmdline_credentials(), + tree, tctx->ev, &options, lpcfg_socket_options(tctx->lp_ctx), lpcfg_gensec_settings(tctx, tctx->lp_ctx)); if (!NT_STATUS_IS_OK(status)) { diff --git a/source4/torture/smb2/replay.c b/source4/torture/smb2/replay.c index f715cf80048..a38518aebf2 100644 --- a/source4/torture/smb2/replay.c +++ b/source4/torture/smb2/replay.c @@ -1764,7 +1764,6 @@ static bool test_replay3(struct torture_context *tctx, struct smb2_tree *tree1) { const char *host = torture_setting_string(tctx, "host", NULL); const char *share = torture_setting_string(tctx, "share", NULL); - struct cli_credentials *credentials = popt_get_cmdline_credentials(); NTSTATUS status; TALLOC_CTX *mem_ctx = talloc_new(tctx); struct smb2_handle _h; @@ -1845,7 +1844,7 @@ static bool test_replay3(struct torture_context *tctx, struct smb2_tree *tree1) lpcfg_smb_ports(tctx->lp_ctx), share, lpcfg_resolve_context(tctx->lp_ctx), - credentials, + popt_get_cmdline_credentials(), &tree2, tctx->ev, &transport1->options, @@ -1923,7 +1922,6 @@ static bool test_replay4(struct torture_context *tctx, struct smb2_tree *tree1) { const char *host = torture_setting_string(tctx, "host", NULL); const char *share = torture_setting_string(tctx, "share", NULL); - struct cli_credentials *credentials = popt_get_cmdline_credentials(); NTSTATUS status; TALLOC_CTX *mem_ctx = talloc_new(tctx); struct smb2_handle _h1; @@ -2069,7 +2067,7 @@ static bool test_replay4(struct torture_context *tctx, struct smb2_tree *tree1) lpcfg_smb_ports(tctx->lp_ctx), share, lpcfg_resolve_context(tctx->lp_ctx), - credentials, + popt_get_cmdline_credentials(), &tree2, tctx->ev, &transport1->options, diff --git a/source4/torture/smb2/scan.c b/source4/torture/smb2/scan.c index 24d1421430f..3e43b9dfa32 100644 --- a/source4/torture/smb2/scan.c +++ b/source4/torture/smb2/scan.c @@ -204,7 +204,6 @@ static bool torture_smb2_scan(struct torture_context *tctx) struct smb2_tree *tree; const char *host = torture_setting_string(tctx, "host", NULL); const char *share = torture_setting_string(tctx, "share", NULL); - struct cli_credentials *credentials = popt_get_cmdline_credentials(); NTSTATUS status; int opcode; struct smb2_request *req; @@ -216,7 +215,8 @@ static bool torture_smb2_scan(struct torture_context *tctx) lpcfg_smb_ports(tctx->lp_ctx), share, lpcfg_resolve_context(tctx->lp_ctx), - credentials, &tree, tctx->ev, &options, + popt_get_cmdline_credentials(), + &tree, tctx->ev, &options, lpcfg_socket_options(tctx->lp_ctx), lpcfg_gensec_settings(tctx, tctx->lp_ctx)); torture_assert_ntstatus_ok(tctx, status, "Connection failed"); @@ -233,7 +233,8 @@ static bool torture_smb2_scan(struct torture_context *tctx) lpcfg_smb_ports(tctx->lp_ctx), share, lpcfg_resolve_context(tctx->lp_ctx), - credentials, &tree, tctx->ev, &options, + popt_get_cmdline_credentials(), + &tree, tctx->ev, &options, lpcfg_socket_options(tctx->lp_ctx), lpcfg_gensec_settings(mem_ctx, tctx->lp_ctx)); torture_assert_ntstatus_ok(tctx, status, "Connection failed"); diff --git a/source4/torture/smb2/util.c b/source4/torture/smb2/util.c index 58956be723e..52a63dd962a 100644 --- a/source4/torture/smb2/util.c +++ b/source4/torture/smb2/util.c @@ -351,7 +351,6 @@ bool torture_smb2_session_setup(struct torture_context *tctx, { NTSTATUS status; struct smb2_session *session; - struct cli_credentials *credentials = popt_get_cmdline_credentials(); session = smb2_session_init(transport, lpcfg_gensec_settings(tctx, tctx->lp_ctx), @@ -361,7 +360,8 @@ bool torture_smb2_session_setup(struct torture_context *tctx, return false; } - status = smb2_session_setup_spnego(session, credentials, + status = smb2_session_setup_spnego(session, + popt_get_cmdline_credentials(), previous_session_id); if (!NT_STATUS_IS_OK(status)) { torture_comment(tctx, "session setup failed: %s\n", nt_errstr(status)); @@ -385,14 +385,13 @@ bool torture_smb2_connection_ext(struct torture_context *tctx, NTSTATUS status; const char *host = torture_setting_string(tctx, "host", NULL); const char *share = torture_setting_string(tctx, "share", NULL); - struct cli_credentials *credentials = popt_get_cmdline_credentials(); status = smb2_connect_ext(tctx, host, lpcfg_smb_ports(tctx->lp_ctx), share, lpcfg_resolve_context(tctx->lp_ctx), - credentials, + popt_get_cmdline_credentials(), previous_session_id, tree, tctx->ev, @@ -431,7 +430,6 @@ bool torture_smb2_con_sopt(struct torture_context *tctx, NTSTATUS status; const char *host = torture_setting_string(tctx, "host", NULL); const char *share = torture_setting_string(tctx, soption, NULL); - struct cli_credentials *credentials = popt_get_cmdline_credentials(); lpcfg_smbcli_options(tctx->lp_ctx, &options); @@ -445,7 +443,7 @@ bool torture_smb2_con_sopt(struct torture_context *tctx, lpcfg_smb_ports(tctx->lp_ctx), share, lpcfg_resolve_context(tctx->lp_ctx), - credentials, + popt_get_cmdline_credentials(), 0, tree, tctx->ev, |