summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/smb2/connect.c7
-rw-r--r--source4/libcli/smb2/smb2.h1
-rw-r--r--source4/libcli/smb2/tcon.c8
3 files changed, 16 insertions, 0 deletions
diff --git a/source4/libcli/smb2/connect.c b/source4/libcli/smb2/connect.c
index 783d628f59..41f2d4bfa9 100644
--- a/source4/libcli/smb2/connect.c
+++ b/source4/libcli/smb2/connect.c
@@ -244,6 +244,13 @@ static void smb2_connect_tcon_done(struct smb2_request *smb2req)
state->tree->tid = state->tcon.out.tid;
state->tree->capabilities = state->tcon.out.capabilities;
+ smb2cli_tcon_set_values(state->tree->smbXcli,
+ state->tcon.out.tid,
+ state->tcon.out.share_type,
+ state->tcon.out.flags,
+ state->tcon.out.capabilities,
+ state->tcon.out.access_mask);
+
tevent_req_done(req);
}
diff --git a/source4/libcli/smb2/smb2.h b/source4/libcli/smb2/smb2.h
index c4dc0001a0..569028e63c 100644
--- a/source4/libcli/smb2/smb2.h
+++ b/source4/libcli/smb2/smb2.h
@@ -108,6 +108,7 @@ struct smb2_tree {
struct smb2_session *session;
uint32_t tid;
uint32_t capabilities;
+ struct smbXcli_tcon *smbXcli;
};
/*
diff --git a/source4/libcli/smb2/tcon.c b/source4/libcli/smb2/tcon.c
index 3a0f246022..b13b5c1c51 100644
--- a/source4/libcli/smb2/tcon.c
+++ b/source4/libcli/smb2/tcon.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "libcli/smb2/smb2.h"
#include "libcli/smb2/smb2_calls.h"
+#include "../libcli/smb/smbXcli_base.h"
/*
initialise a smb2_session structure
@@ -40,6 +41,13 @@ struct smb2_tree *smb2_tree_init(struct smb2_session *session,
} else {
tree->session = talloc_reference(tree, session);
}
+
+ tree->smbXcli = smbXcli_tcon_create(tree);
+ if (tree->smbXcli == NULL) {
+ talloc_free(tree);
+ return NULL;
+ }
+
return tree;
}