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];
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!");
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));
* 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
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);
* 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);
* 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
struct smb2_tree *tree;
struct smb2_handle job_h;
- struct cli_credentials *credentials = popt_get_cmdline_credentials();
struct smbcli_options options;
TALLOC_CTX *mem_ctx = talloc_new(tctx);
/*
lpcfg_smb_ports(tctx->lp_ctx),
share,
lpcfg_resolve_context(tctx->lp_ctx),
- credentials,
+ popt_get_cmdline_credentials(),
&tree,
tctx->ev,
&options,
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);
lpcfg_smb_ports(tctx->lp_ctx),
share,
lpcfg_resolve_context(tctx->lp_ctx),
- credentials,
+ popt_get_cmdline_credentials(),
0,
tree,
tctx->ev,
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);
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)) {
{
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;
lpcfg_smb_ports(tctx->lp_ctx),
share,
lpcfg_resolve_context(tctx->lp_ctx),
- credentials,
+ popt_get_cmdline_credentials(),
&tree2,
tctx->ev,
&transport1->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();
NTSTATUS status;
TALLOC_CTX *mem_ctx = talloc_new(tctx);
struct smb2_handle _h1;
lpcfg_smb_ports(tctx->lp_ctx),
share,
lpcfg_resolve_context(tctx->lp_ctx),
- credentials,
+ popt_get_cmdline_credentials(),
&tree2,
tctx->ev,
&transport1->options,
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;
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");
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");
{
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),
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));
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,
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);
lpcfg_smb_ports(tctx->lp_ctx),
share,
lpcfg_resolve_context(tctx->lp_ctx),
- credentials,
+ popt_get_cmdline_credentials(),
0,
tree,
tctx->ev,
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);
lpcfg_smb_ports(tctx->lp_ctx),
share,
lpcfg_resolve_context(tctx->lp_ctx),
- credentials,
+ popt_get_cmdline_credentials(),
0,
tree,
tctx->ev,