diff options
author | Michael Adam <obnox@samba.org> | 2012-02-26 01:45:53 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2012-02-28 00:08:54 +0100 |
commit | 1d9df362b249bcd4636a414c7fa61ab3adfdc832 (patch) | |
tree | 4de0bdb528f02cb10f658984fdcc3c6fd08beb06 /source4/torture | |
parent | 28b77605c48494b27e50d18c488c7a65be74fce3 (diff) | |
download | samba-1d9df362b249bcd4636a414c7fa61ab3adfdc832.tar.gz samba-1d9df362b249bcd4636a414c7fa61ab3adfdc832.tar.bz2 samba-1d9df362b249bcd4636a414c7fa61ab3adfdc832.zip |
s4:torture:smb2: add torture_smb2_connection_ext() that takes previous_session
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/smb2/util.c | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/source4/torture/smb2/util.c b/source4/torture/smb2/util.c index 403c1abadd..62e4681563 100644 --- a/source4/torture/smb2/util.c +++ b/source4/torture/smb2/util.c @@ -338,7 +338,9 @@ bool torture_smb2_session_setup(struct torture_context *tctx, /* open a smb2 connection */ -bool torture_smb2_connection(struct torture_context *tctx, struct smb2_tree **tree) +bool torture_smb2_connection_ext(struct torture_context *tctx, + uint64_t previous_session_id, + struct smb2_tree **tree) { NTSTATUS status; const char *host = torture_setting_string(tctx, "host", NULL); @@ -348,18 +350,19 @@ bool torture_smb2_connection(struct torture_context *tctx, struct smb2_tree **tr 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, - lpcfg_socket_options(tctx->lp_ctx), - lpcfg_gensec_settings(tctx, tctx->lp_ctx) - ); + status = smb2_connect_ext(tctx, + host, + lpcfg_smb_ports(tctx->lp_ctx), + share, + lpcfg_resolve_context(tctx->lp_ctx), + credentials, + previous_session_id, + tree, + tctx->ev, + &options, + lpcfg_socket_options(tctx->lp_ctx), + lpcfg_gensec_settings(tctx, tctx->lp_ctx) + ); if (!NT_STATUS_IS_OK(status)) { printf("Failed to connect to SMB2 share \\\\%s\\%s - %s\n", host, share, nt_errstr(status)); @@ -368,6 +371,15 @@ bool torture_smb2_connection(struct torture_context *tctx, struct smb2_tree **tr return true; } +bool torture_smb2_connection(struct torture_context *tctx, struct smb2_tree **tree) +{ + bool ret; + + ret = torture_smb2_connection_ext(tctx, 0, tree); + + return ret; +} + /* create and return a handle to a test file |