s3:smbd: SMB2 session ids are 64bit...
[ira/wip.git] / source3 / smbd / smb2_server.c
index 36f4c10b17d6aec56043d301fed1a7e26d84b5a8..c6160189fe2057bae6ed08e5a31f9641ac3dafe9 100644 (file)
@@ -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(),
@@ -308,7 +308,7 @@ static NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req)
                if (!NT_STATUS_IS_OK(status)) {
                        return smbd_smb2_request_error(req, status);
                }
-               return smbd_smb2_request_error(req, NT_STATUS_NOT_IMPLEMENTED);
+               return smbd_smb2_request_process_logoff(req);
 
        case SMB2_OP_TCON:
                status = smbd_smb2_request_check_session(req);
@@ -571,7 +571,7 @@ NTSTATUS smbd_smb2_request_done_ex(struct smbd_smb2_request *req,
        /* the fallback dynamic buffer */
        outdyn = outhdr + SMB2_HDR_BODY + 8;
 
-       next_command_ofs = SIVAL(outhdr, SMB2_HDR_NEXT_COMMAND, 0);
+       next_command_ofs = IVAL(outhdr, SMB2_HDR_NEXT_COMMAND);
        SIVAL(outhdr, SMB2_HDR_STATUS, NT_STATUS_V(status));
 
        req->out.vector[i+1].iov_base = (void *)body.data;