diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-07-23 19:47:05 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-07-23 22:13:29 +0200 |
commit | af90c71ed8e66586aa23f7d0e18efc557c9a0c08 (patch) | |
tree | 25da12b998f56924ba34b3fb20490765eea77263 /source4 | |
parent | cdec0c46464c8b524fc64ff46f1af809af026086 (diff) | |
download | samba-af90c71ed8e66586aa23f7d0e18efc557c9a0c08.tar.gz samba-af90c71ed8e66586aa23f7d0e18efc557c9a0c08.tar.bz2 samba-af90c71ed8e66586aa23f7d0e18efc557c9a0c08.zip |
s4:libcli/raw: setup a smbXcli_session for each smbcli_session
metze
Diffstat (limited to 'source4')
-rw-r--r-- | source4/libcli/raw/clisession.c | 14 | ||||
-rw-r--r-- | source4/libcli/raw/libcliraw.h | 1 | ||||
-rw-r--r-- | source4/libcli/raw/rawrequest.c | 2 |
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); |