struct smb2_create io1, io2;
uint64_t previous_session_id;
bool ret = true;
+ struct smbcli_options options;
+
+ options = tree->session->transport->options;
/* Choose a random name in case the state is left a little funky. */
snprintf(fname, 256, "durable_open_reopen2_%s.dat",
talloc_free(tree);
tree = NULL;
- if (!torture_smb2_connection_ext(tctx, previous_session_id, &tree)) {
+ if (!torture_smb2_connection_ext(tctx, previous_session_id,
+ &options, &tree))
+ {
torture_warning(tctx, "couldn't reconnect, bailing\n");
ret = false;
goto done;
uint8_t b = 0;
uint64_t previous_session_id;
uint64_t alloc_size_step;
+ struct smbcli_options options;
+
+ options = tree->session->transport->options;
/* Choose a random name in case the state is left a little funky. */
snprintf(fname, 256, "durable_open_delete_on_close2_%s.dat",
/* disconnect, leaving the durable handle in place */
TALLOC_FREE(tree);
- if (!torture_smb2_connection_ext(tctx, previous_session_id, &tree)) {
+ if (!torture_smb2_connection_ext(tctx, previous_session_id,
+ &options, &tree))
+ {
torture_warning(tctx, "could not reconnect, bailing\n");
ret = false;
goto done;
bool ret = true;
uint64_t pos;
uint64_t previous_session_id;
+ struct smbcli_options options;
+
+ options = tree->session->transport->options;
smb2_util_unlink(tree, fname);
tree = NULL;
/* do a session reconnect */
- if (!torture_smb2_connection_ext(tctx, previous_session_id, &tree)) {
+ if (!torture_smb2_connection_ext(tctx, previous_session_id,
+ &options, &tree))
+ {
torture_warning(tctx, "couldn't reconnect, bailing\n");
ret = false;
goto done;
uint64_t alloc_size_step;
uint64_t initial_alloc_size = 0x100;
const uint8_t *b = NULL;
+ struct smbcli_options options;
+
+ options = tree->session->transport->options;
/* Choose a random name in case the state is left a little funky. */
snprintf(fname, 256, "durable_open_alloc_size_%s.dat",
talloc_free(tree);
tree = NULL;
- if (!torture_smb2_connection_ext(tctx, previous_session_id, &tree)) {
+ if (!torture_smb2_connection_ext(tctx, previous_session_id,
+ &options, &tree))
+ {
torture_warning(tctx, "couldn't reconnect, bailing\n");
ret = false;
goto done;
talloc_free(tree);
tree = NULL;
- if (!torture_smb2_connection_ext(tctx, previous_session_id, &tree)) {
+ if (!torture_smb2_connection_ext(tctx, previous_session_id,
+ &options, &tree))
+ {
torture_warning(tctx, "couldn't reconnect, bailing\n");
ret = false;
goto done;
talloc_free(tree);
tree = NULL;
- if (!torture_smb2_connection_ext(tctx, previous_session_id, &tree)) {
+ if (!torture_smb2_connection_ext(tctx, previous_session_id,
+ &options, &tree))
+ {
torture_warning(tctx, "couldn't reconnect, bailing\n");
ret = false;
goto done;
uint64_t previous_session_id;
const uint8_t b = 0;
uint64_t alloc_size = 0;
+ struct smbcli_options options;
+
+ options = tree->session->transport->options;
/* Choose a random name in case the state is left a little funky. */
snprintf(fname, 256, "durable_open_initial_alloc_%s.dat",
talloc_free(tree);
tree = NULL;
- if (!torture_smb2_connection_ext(tctx, previous_session_id, &tree)) {
+ if (!torture_smb2_connection_ext(tctx, previous_session_id,
+ &options, &tree))
+ {
torture_warning(tctx, "couldn't reconnect, bailing\n");
ret = false;
goto done;
*/
bool torture_smb2_connection_ext(struct torture_context *tctx,
uint64_t previous_session_id,
+ const struct smbcli_options *options,
struct smb2_tree **tree)
{
NTSTATUS status;
const char *host = torture_setting_string(tctx, "host", NULL);
const char *share = torture_setting_string(tctx, "share", NULL);
struct cli_credentials *credentials = cmdline_credentials;
- struct smbcli_options options;
-
- lpcfg_smbcli_options(tctx->lp_ctx, &options);
status = smb2_connect_ext(tctx,
host,
previous_session_id,
tree,
tctx->ev,
- &options,
+ options,
lpcfg_socket_options(tctx->lp_ctx),
lpcfg_gensec_settings(tctx, tctx->lp_ctx)
);
bool torture_smb2_connection(struct torture_context *tctx, struct smb2_tree **tree)
{
bool ret;
+ struct smbcli_options options;
+
+ lpcfg_smbcli_options(tctx->lp_ctx, &options);
- ret = torture_smb2_connection_ext(tctx, 0, tree);
+ ret = torture_smb2_connection_ext(tctx, 0, &options, tree);
return ret;
}