summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/raw/clitransport.c13
-rw-r--r--source4/libcli/raw/rawtrans.c20
2 files changed, 22 insertions, 11 deletions
diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c
index f9759b1b7f..321df768f2 100644
--- a/source4/libcli/raw/clitransport.c
+++ b/source4/libcli/raw/clitransport.c
@@ -214,7 +214,7 @@ struct tevent_req *smbcli_transport_setup_subreq(struct smbcli_request *req)
uint16_t clear_flags2;
uint32_t pid;
uint16_t tid;
- uint16_t uid;
+ struct smbXcli_session *session = NULL;
uint32_t timeout_msec = transport->options.request_timeout * 1000;
struct iovec *bytes_iov = NULL;
struct tevent_req *subreq = NULL;
@@ -225,11 +225,14 @@ struct tevent_req *smbcli_transport_setup_subreq(struct smbcli_request *req)
pid = SVAL(req->out.hdr, HDR_PID);
pid |= SVAL(req->out.hdr, HDR_PIDHIGH)<<16;
tid = SVAL(req->out.hdr, HDR_TID);
- uid = SVAL(req->out.hdr, HDR_UID);
clear_flags = ~additional_flags;
clear_flags2 = ~additional_flags2;
+ if (req->session) {
+ session = req->session->smbXcli;
+ }
+
bytes_iov = talloc(req, struct iovec);
if (bytes_iov == NULL) {
return NULL;
@@ -248,7 +251,7 @@ struct tevent_req *smbcli_transport_setup_subreq(struct smbcli_request *req)
timeout_msec,
pid,
tid,
- uid,
+ session,
req->out.wct,
(uint16_t *)req->out.vwv,
1, bytes_iov);
@@ -293,7 +296,7 @@ void smbcli_transport_send(struct smbcli_request *req)
0, /* timeout_msec */
0, /* pid */
0, /* tid */
- 0, /* uid */
+ NULL, /* session */
0, /* wct */
NULL, /* vwv */
0, /* iov_count */
@@ -499,7 +502,7 @@ static void smbcli_transport_break_handler(struct tevent_req *subreq)
0, /* timeout_msec */
0, /* pid */
0, /* tid */
- 0, /* uid */
+ NULL, /* session */
0, /* wct */
NULL, /* vwv */
0, /* iov_count */
diff --git a/source4/libcli/raw/rawtrans.c b/source4/libcli/raw/rawtrans.c
index 8e16e5b911..1df5209523 100644
--- a/source4/libcli/raw/rawtrans.c
+++ b/source4/libcli/raw/rawtrans.c
@@ -37,7 +37,7 @@ static struct smbcli_request *smb_raw_trans_backend_send(struct smbcli_tree *tre
uint16_t clear_flags2;
uint32_t pid;
uint16_t tid;
- uint16_t uid;
+ struct smbXcli_session *session = NULL;
const char *pipe_name = NULL;
uint8_t s;
uint32_t timeout_msec;
@@ -55,7 +55,10 @@ static struct smbcli_request *smb_raw_trans_backend_send(struct smbcli_tree *tre
pid = SVAL(req->out.hdr, HDR_PID);
pid |= SVAL(req->out.hdr, HDR_PIDHIGH)<<16;
tid = SVAL(req->out.hdr, HDR_TID);
- uid = SVAL(req->out.hdr, HDR_UID);
+
+ if (req->session) {
+ session = req->session->smbXcli;
+ }
clear_flags = ~additional_flags;
clear_flags2 = ~additional_flags2;
@@ -86,7 +89,8 @@ static struct smbcli_request *smb_raw_trans_backend_send(struct smbcli_tree *tre
additional_flags2,
clear_flags2,
timeout_msec,
- pid, tid, uid,
+ pid, tid,
+ session,
pipe_name,
0xFFFF, /* fid */
0, /* function */
@@ -259,7 +263,7 @@ struct smbcli_request *smb_raw_nttrans_send(struct smbcli_tree *tree,
uint16_t clear_flags2;
uint32_t pid;
uint16_t tid;
- uint16_t uid;
+ struct smbXcli_session *session = NULL;
uint32_t timeout_msec;
uint32_t tmp;
@@ -275,7 +279,10 @@ struct smbcli_request *smb_raw_nttrans_send(struct smbcli_tree *tree,
pid = SVAL(req->out.hdr, HDR_PID);
pid |= SVAL(req->out.hdr, HDR_PIDHIGH)<<16;
tid = SVAL(req->out.hdr, HDR_TID);
- uid = SVAL(req->out.hdr, HDR_UID);
+
+ if (req->session) {
+ session = req->session->smbXcli;
+ }
clear_flags = ~additional_flags;
clear_flags2 = ~additional_flags2;
@@ -302,7 +309,8 @@ struct smbcli_request *smb_raw_nttrans_send(struct smbcli_tree *tree,
additional_flags2,
clear_flags2,
timeout_msec,
- pid, tid, uid,
+ pid, tid,
+ session,
NULL, /* pipe_name */
0xFFFF, /* fid */
parms->in.function,