summaryrefslogtreecommitdiff
path: root/source4/libcli/raw
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/raw')
-rw-r--r--source4/libcli/raw/clisession.c14
-rw-r--r--source4/libcli/raw/libcliraw.h1
-rw-r--r--source4/libcli/raw/rawrequest.c2
3 files changed, 16 insertions, 1 deletions
diff --git a/source4/libcli/raw/clisession.c b/source4/libcli/raw/clisession.c
index d68f309519..23d7fd1287 100644
--- a/source4/libcli/raw/clisession.c
+++ b/source4/libcli/raw/clisession.c
@@ -55,7 +55,19 @@ struct smbcli_session *smbcli_session_init(struct smbcli_transport *transport,
session->pid = (uint16_t)getpid();
session->vuid = UID_FIELD_INVALID;
session->options = options;
-
+
+ /*
+ * for now session->vuid is still used by the callers, but we call:
+ * smb1cli_session_set_id(session->smbXcli, session->vuid);
+ * before using session->smbXcli, in future we should remove
+ * session->vuid.
+ */
+ session->smbXcli = smbXcli_session_create(session, transport->conn);
+ if (session->smbXcli == NULL) {
+ talloc_free(session);
+ return NULL;
+ }
+
capabilities = transport->negotiate.capabilities;
flags2 = FLAGS2_LONG_PATH_COMPONENTS | FLAGS2_EXTENDED_ATTRIBUTES;
diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h
index b7e5e21a92..8cdccc1f45 100644
--- a/source4/libcli/raw/libcliraw.h
+++ b/source4/libcli/raw/libcliraw.h
@@ -156,6 +156,7 @@ struct smbcli_session {
/* after a session setup the server provides us with
a vuid identifying the security context */
+ struct smbXcli_session *smbXcli;
uint16_t vuid;
/* default pid for this session */
diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c
index 1b4c8c7524..56bbf259e1 100644
--- a/source4/libcli/raw/rawrequest.c
+++ b/source4/libcli/raw/rawrequest.c
@@ -146,6 +146,8 @@ struct smbcli_request *smbcli_request_setup_session(struct smbcli_session *sessi
if (!req) return NULL;
+ smb1cli_session_set_id(session->smbXcli, session->vuid);
+
req->session = session;
SSVAL(req->out.hdr, HDR_FLG2, session->flags2);