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/raw | |
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/raw')
-rw-r--r-- | source4/torture/raw/session.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/source4/torture/raw/session.c b/source4/torture/raw/session.c index c96e970d061..0c460ae3069 100644 --- a/source4/torture/raw/session.c +++ b/source4/torture/raw/session.c @@ -234,7 +234,6 @@ static bool test_session_expire1(struct torture_context *tctx) struct smbcli_session_options session_options; 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_state *cli = NULL; enum credentials_use_kerberos use_kerberos; char fname[256]; @@ -244,7 +243,8 @@ static bool test_session_expire1(struct torture_context *tctx) struct smb_composite_sesssetup io_sesssetup; size_t i; - use_kerberos = cli_credentials_get_kerberos_state(credentials); + use_kerberos = cli_credentials_get_kerberos_state( + popt_get_cmdline_credentials()); if (use_kerberos != CRED_MUST_USE_KERBEROS) { torture_warning(tctx, "smb2.session.expire1 requires -k yes!"); torture_skip(tctx, "smb2.session.expire1 requires -k yes!"); @@ -264,7 +264,7 @@ static bool test_session_expire1(struct torture_context *tctx) lpcfg_smb_ports(tctx->lp_ctx), share, NULL, lpcfg_socket_options(tctx->lp_ctx), - credentials, + popt_get_cmdline_credentials(), lpcfg_resolve_context(tctx->lp_ctx), tctx->ev, &options, &session_options, lpcfg_gensec_settings(tctx, tctx->lp_ctx)); @@ -312,7 +312,8 @@ static bool test_session_expire1(struct torture_context *tctx) * the krb5 library may not handle expired creds * well, lets start with an empty ccache. */ - cli_credentials_invalidate_ccache(credentials, CRED_SPECIFIED); + cli_credentials_invalidate_ccache(popt_get_cmdline_credentials(), + CRED_SPECIFIED); /* * now with CAP_DYNAMIC_REAUTH @@ -323,7 +324,7 @@ static bool test_session_expire1(struct torture_context *tctx) io_sesssetup.in.sesskey = cli->transport->negotiate.sesskey; io_sesssetup.in.capabilities = cli->transport->negotiate.capabilities; io_sesssetup.in.capabilities |= CAP_DYNAMIC_REAUTH; - io_sesssetup.in.credentials = credentials; + io_sesssetup.in.credentials = popt_get_cmdline_credentials(); io_sesssetup.in.workgroup = lpcfg_workgroup(tctx->lp_ctx); io_sesssetup.in.gensec_settings = lpcfg_gensec_settings(tctx, tctx->lp_ctx); @@ -357,7 +358,8 @@ static bool test_session_expire1(struct torture_context *tctx) * the krb5 library may not handle expired creds * well, lets start with an empty ccache. */ - cli_credentials_invalidate_ccache(credentials, CRED_SPECIFIED); + cli_credentials_invalidate_ccache( + popt_get_cmdline_credentials(), CRED_SPECIFIED); torture_comment(tctx, "reauth with CAP_DYNAMIC_REAUTH => OK\n"); ZERO_STRUCT(io_sesssetup.out); @@ -378,7 +380,8 @@ static bool test_session_expire1(struct torture_context *tctx) * the krb5 library may not handle expired creds * well, lets start with an empty ccache. */ - cli_credentials_invalidate_ccache(credentials, CRED_SPECIFIED); + cli_credentials_invalidate_ccache(popt_get_cmdline_credentials(), + CRED_SPECIFIED); /* * now without CAP_DYNAMIC_REAUTH |