summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-05-22 11:06:54 +0200
committerStefan Metzmacher <metze@samba.org>2009-05-22 14:03:13 +0200
commit7749647740e945cf63e3df76545c04129d592429 (patch)
tree0dab3d7462d11f9131d22bb5ba5b2f477e2faf1d /source3
parentedd9bd9b167cb04290b06eb9b209c21ad5a884a0 (diff)
downloadsamba-7749647740e945cf63e3df76545c04129d592429.tar.gz
samba-7749647740e945cf63e3df76545c04129d592429.tar.bz2
samba-7749647740e945cf63e3df76545c04129d592429.zip
s3:smbd: SMB2 session ids are 64bit...
We only grand ids up to 0x0000000000FFFFFF, because that's what our idtree implementation can handle. But also 16777215 sessions on one tcp connection should be enough:-) metze
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/smb2_server.c2
-rw-r--r--source3/smbd/smb2_sesssetup.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 83ce7c4358..c6160189fe 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -59,7 +59,7 @@ static NTSTATUS smbd_initialize_smb2(struct smbd_server_connection *conn)
if (conn->smb2.sessions.idtree == NULL) {
return NT_STATUS_NO_MEMORY;
}
- conn->smb2.sessions.limit = 0x0000FFFF;
+ conn->smb2.sessions.limit = 0x00FFFFFF;
conn->smb2.sessions.list = NULL;
ret = tstream_bsd_existing_socket(conn, smbd_server_fd(),
diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c
index 50476bfbe5..a7fef4ab2f 100644
--- a/source3/smbd/smb2_sesssetup.c
+++ b/source3/smbd/smb2_sesssetup.c
@@ -71,7 +71,7 @@ NTSTATUS smbd_smb2_request_process_sesssetup(struct smbd_smb2_request *req)
return smbd_smb2_request_error(req, NT_STATUS_INVALID_PARAMETER);
}
- in_session_id = SVAL(inhdr, SMB2_HDR_SESSION_ID);
+ in_session_id = BVAL(inhdr, SMB2_HDR_SESSION_ID);
in_security_buffer.data = (uint8_t *)req->in.vector[i+2].iov_base;
in_security_buffer.length = in_security_length;
@@ -207,7 +207,7 @@ NTSTATUS smbd_smb2_request_check_session(struct smbd_smb2_request *req)
inhdr = (const uint8_t *)req->in.vector[i+0].iov_base;
- in_session_id = SVAL(inhdr, SMB2_HDR_SESSION_ID);
+ in_session_id = BVAL(inhdr, SMB2_HDR_SESSION_ID);
/* lookup an existing session */
p = idr_find(req->conn->smb2.sessions.idtree, in_session_id);