summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuk Claes <luk@debian.org>2012-06-02 12:49:22 +0200
committerStefan Metzmacher <metze@samba.org>2012-07-23 22:13:29 +0200
commit6bff589e33afde6e0f7db9f99f14be5cb171f587 (patch)
tree36e5641b73de42593736d82d30ca1244ea40c963
parenta256d61c505ab10710c7d7152bab4f018cfdcd74 (diff)
downloadsamba-6bff589e33afde6e0f7db9f99f14be5cb171f587.tar.gz
samba-6bff589e33afde6e0f7db9f99f14be5cb171f587.tar.bz2
samba-6bff589e33afde6e0f7db9f99f14be5cb171f587.zip
libcli/smb: introduce smb1.session for uid use
Signed-off-by: Luk Claes <luk@debian.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--libcli/smb/smbXcli_base.c15
-rw-r--r--libcli/smb/smbXcli_base.h3
2 files changed, 18 insertions, 0 deletions
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c
index 326a43df05..1d473690c3 100644
--- a/libcli/smb/smbXcli_base.c
+++ b/libcli/smb/smbXcli_base.c
@@ -132,6 +132,10 @@ struct smbXcli_session {
struct smbXcli_conn *conn;
struct {
+ uint16_t session_id;
+ } smb1;
+
+ struct {
uint64_t session_id;
uint16_t session_flags;
DATA_BLOB application_key;
@@ -4208,6 +4212,17 @@ struct smbXcli_session *smbXcli_session_create(TALLOC_CTX *mem_ctx,
return session;
}
+uint16_t smb1cli_session_current_id(struct smbXcli_session *session)
+{
+ return session->smb1.session_id;
+}
+
+void smb1cli_session_set_id(struct smbXcli_session *session,
+ uint16_t session_id)
+{
+ session->smb1.session_id = session_id;
+}
+
uint8_t smb2cli_session_security_mode(struct smbXcli_session *session)
{
struct smbXcli_conn *conn = session->conn;
diff --git a/libcli/smb/smbXcli_base.h b/libcli/smb/smbXcli_base.h
index 81a8e93ade..5f02fb4a60 100644
--- a/libcli/smb/smbXcli_base.h
+++ b/libcli/smb/smbXcli_base.h
@@ -245,6 +245,9 @@ NTSTATUS smbXcli_negprot(struct smbXcli_conn *conn,
struct smbXcli_session *smbXcli_session_create(TALLOC_CTX *mem_ctx,
struct smbXcli_conn *conn);
+uint16_t smb1cli_session_current_id(struct smbXcli_session* session);
+void smb1cli_session_set_id(struct smbXcli_session* session,
+ uint16_t session_id);
uint8_t smb2cli_session_security_mode(struct smbXcli_session *session);
uint64_t smb2cli_session_current_id(struct smbXcli_session *session);
uint16_t smb2cli_session_get_flags(struct smbXcli_session *session);