summaryrefslogtreecommitdiff
path: root/libcli/smb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-09-18 03:50:42 +0200
committerKarolin Seeger <kseeger@samba.org>2014-03-10 16:12:19 +0100
commite5b7647a6bc308a517e16e676ec4ee7912c6c60d (patch)
tree3e1d55e456e628e47c474a5bcb962f7b4608b75f /libcli/smb
parent66de9134420c1a6743369cc54958cc94e9128a26 (diff)
downloadsamba-e5b7647a6bc308a517e16e676ec4ee7912c6c60d.tar.gz
libcli/smb: add SMB2_HDR_FLAG_DFS for SMB2 Create operations on dfs shares
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> (cherry picked from commit 60f16bacdc242a8512df352dcdd625661e4b25ad)
Diffstat (limited to 'libcli/smb')
-rw-r--r--libcli/smb/smb2cli_create.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libcli/smb/smb2cli_create.c b/libcli/smb/smb2cli_create.c
index 3f8d67250c1..9cb94b11962 100644
--- a/libcli/smb/smb2cli_create.c
+++ b/libcli/smb/smb2cli_create.c
@@ -63,6 +63,8 @@ struct tevent_req *smb2cli_create_send(
uint8_t *dyn;
size_t dyn_len;
size_t max_dyn_len;
+ uint32_t additional_flags = 0;
+ uint32_t clear_flags = 0;
req = tevent_req_create(mem_ctx, &state,
struct smb2cli_create_state);
@@ -130,6 +132,12 @@ struct tevent_req *smb2cli_create_send(
data_blob_free(&blob);
}
+ if (smbXcli_conn_dfs_supported(conn) &&
+ smbXcli_tcon_is_dfs_share(tcon))
+ {
+ additional_flags |= SMB2_HDR_FLAG_DFS;
+ }
+
/*
* We use max_dyn_len = 0
* as we don't explicitly ask for any output length.
@@ -140,7 +148,7 @@ struct tevent_req *smb2cli_create_send(
max_dyn_len = 0;
subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_CREATE,
- 0, 0, /* flags */
+ additional_flags, clear_flags,
timeout_msec,
tcon,
session,