]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #2481 in SNORT/snort3 from ~NEHASH4/snort3:smb_ut_failure to master
authorBhargava Jandhyala (bjandhya) <bjandhya@cisco.com>
Thu, 17 Sep 2020 08:35:25 +0000 (08:35 +0000)
committerBhargava Jandhyala (bjandhya) <bjandhya@cisco.com>
Thu, 17 Sep 2020 08:35:25 +0000 (08:35 +0000)
Squashed commit of the following:

commit 18c263d3f2978092d2d3630f35638c18baafcfd2
Author: Neha Sharma <nehash4@cisco.com>
Date:   Thu Sep 17 02:22:48 2020 -0400

    dec_rpc: modifying logs to show if file context is found or not found

src/service_inspectors/dce_rpc/dce_smb2_commands.cc

index 5a30cecabd8db85a7f276bfd14196410a13f39be..11b6deb71fe66dfd12a98353892642ef2cbbeeab 100644 (file)
@@ -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);