summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-07-23 22:11:19 +0200
committerStefan Metzmacher <metze@samba.org>2012-07-24 22:20:06 +0200
commit41538b17c5420b1e8e45d3e2987c77bc79c14de5 (patch)
tree7e81704fbb5f75ae4a3254efdf7e292a732d6d06 /source4/libcli
parentb9100a7ac443159716398aaadfab34af64d8858b (diff)
downloadsamba-41538b17c5420b1e8e45d3e2987c77bc79c14de5.tar.gz
samba-41538b17c5420b1e8e45d3e2987c77bc79c14de5.tar.bz2
samba-41538b17c5420b1e8e45d3e2987c77bc79c14de5.zip
s4:libcli/smb2: setup a smbXcli_tcon for each smb2_tree
metze
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;
}