From: Bhargava Jandhyala (bjandhya) Date: Thu, 17 Sep 2020 08:35:25 +0000 (+0000) Subject: Merge pull request #2481 in SNORT/snort3 from ~NEHASH4/snort3:smb_ut_failure to master X-Git-Tag: 3.0.3-1~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08d0c72349463c69498604f381199fde35bede02;p=thirdparty%2Fsnort3.git Merge pull request #2481 in SNORT/snort3 from ~NEHASH4/snort3:smb_ut_failure to master Squashed commit of the following: commit 18c263d3f2978092d2d3630f35638c18baafcfd2 Author: Neha Sharma Date: Thu Sep 17 02:22:48 2020 -0400 dec_rpc: modifying logs to show if file context is found or not found --- diff --git a/src/service_inspectors/dce_rpc/dce_smb2_commands.cc b/src/service_inspectors/dce_rpc/dce_smb2_commands.cc index 5a30cecab..11b6deb71 100644 --- a/src/service_inspectors/dce_rpc/dce_smb2_commands.cc +++ b/src/service_inspectors/dce_rpc/dce_smb2_commands.cc @@ -319,8 +319,8 @@ static void DCE2_Smb2CreateResponse(DCE2_Smb2SsnData*, true); debug_logf(dce_smb_trace, nullptr, "%s_RESP: file size %" PRIu64 " fid %" PRIu64 "" - "file_name_hash %" PRIu64 " file %p\n", smb2_command_string[SMB2_COM_CREATE], - file_size, fileId_persistent, ftracker->file_name_hash, (void *)file); + "file_name_hash %" PRIu64 " file context %s\n", smb2_command_string[SMB2_COM_CREATE], + file_size, fileId_persistent, ftracker->file_name_hash, (file ? "found" : "not found")); if (file) { @@ -542,8 +542,9 @@ void DCE2_Smb2SetInfo(DCE2_Smb2SsnData*, const Smb2Hdr* smb_hdr, FileContext* file = get_smb_file_context(ftracker->file_name_hash, fileId_persistent); debug_logf(dce_smb_trace, nullptr, - "%s_REQ: set file size %" PRIu64 " fid %" PRIu64 " file %p\n", - smb2_command_string[SMB2_COM_SET_INFO], file_size, fileId_persistent, (void*)file); + "%s_REQ: set file size %" PRIu64 " fid %" PRIu64 " file context %s\n", + smb2_command_string[SMB2_COM_SET_INFO], file_size, fileId_persistent, + file ? "found" : "not found"); if (file) { file->set_file_size(ftracker->file_size);