summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/raw/clitree.c6
-rw-r--r--source4/libcli/raw/libcliraw.h1
-rw-r--r--source4/libcli/raw/rawrequest.c2
3 files changed, 9 insertions, 0 deletions
diff --git a/source4/libcli/raw/clitree.c b/source4/libcli/raw/clitree.c
index a47b395a6b..1c3321e6b8 100644
--- a/source4/libcli/raw/clitree.c
+++ b/source4/libcli/raw/clitree.c
@@ -24,6 +24,7 @@
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "libcli/smb_composite/smb_composite.h"
+#include "../libcli/smb/smbXcli_base.h"
#define SETUP_REQUEST_TREE(cmd, wct, buflen) do { \
req = smbcli_request_setup(tree, cmd, wct, buflen); \
@@ -49,6 +50,11 @@ _PUBLIC_ struct smbcli_tree *smbcli_tree_init(struct smbcli_session *session,
tree->session = talloc_reference(tree, session);
}
+ tree->smbXcli = smbXcli_tcon_create(tree);
+ if (tree->smbXcli == NULL) {
+ talloc_free(tree);
+ return NULL;
+ }
return tree;
}
diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h
index 8cdccc1f45..b269471081 100644
--- a/source4/libcli/raw/libcliraw.h
+++ b/source4/libcli/raw/libcliraw.h
@@ -188,6 +188,7 @@ struct smbcli_tree {
/* session layer info */
struct smbcli_session *session;
+ struct smbXcli_tcon *smbXcli;
uint16_t tid; /* tree id, aka cnum */
char *device;
char *fs_type;
diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c
index 56bbf259e1..9cabea5c78 100644
--- a/source4/libcli/raw/rawrequest.c
+++ b/source4/libcli/raw/rawrequest.c
@@ -169,6 +169,8 @@ struct smbcli_request *smbcli_request_setup(struct smbcli_tree *tree,
req = smbcli_request_setup_session(tree->session, command, wct, buflen);
if (req) {
+ smb1cli_tcon_set_id(tree->smbXcli, tree->tid);
+
req->tree = tree;
SSVAL(req->out.hdr,HDR_TID,tree->tid);
}