s3:smb2_server: pass smbXsrv_connection to smb2_validate_message_id()
authorStefan Metzmacher <metze@samba.org>
Wed, 11 Jun 2014 08:05:43 +0000 (10:05 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 6 Aug 2014 07:51:12 +0000 (09:51 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source3/smbd/smb2_server.c

index 427f81550d960add5fe69c4e4be09001e82eb15a..1f7c3d4521ffee77773129c8899d21d241f72937 100644 (file)
@@ -652,10 +652,9 @@ static bool smb2_validate_sequence_number(struct smbXsrv_connection *xconn,
        return true;
 }
 
-static bool smb2_validate_message_id(struct smbd_server_connection *sconn,
-                               const uint8_t *inhdr)
+static bool smb2_validate_message_id(struct smbXsrv_connection *xconn,
+                                    const uint8_t *inhdr)
 {
-       struct smbXsrv_connection *xconn = sconn->conn;
        uint64_t message_id = BVAL(inhdr, SMB2_HDR_MESSAGE_ID);
        uint16_t opcode = SVAL(inhdr, SMB2_HDR_OPCODE);
        uint16_t credit_charge = 1;
@@ -754,7 +753,7 @@ static NTSTATUS smbd_smb2_request_validate(struct smbd_smb2_request *req)
                        return NT_STATUS_INVALID_PARAMETER;
                }
 
-               if (!smb2_validate_message_id(req->sconn, inhdr)) {
+               if (!smb2_validate_message_id(req->xconn, inhdr)) {
                        return NT_STATUS_INVALID_PARAMETER;
                }
        }