From: Shawn Turner (shaturne) Date: Tue, 14 Feb 2017 17:14:57 +0000 (-0500) Subject: Merge pull request #814 in SNORT/snort3 from snort2lua_smb_file to master X-Git-Tag: 3.0.0-233~75 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=63c2ef7c5bf887fae7a0e183cd87c25e196973d8;p=thirdparty%2Fsnort3.git Merge pull request #814 in SNORT/snort3 from snort2lua_smb_file to master Squashed commit of the following: commit 022682efddaa17849e1b74bd93173d8f2fc251b9 Author: Bhagya Tholpady Date: Mon Feb 13 15:21:03 2017 -0500 snort2lua changes to add file_id when smb file inspection is on --- diff --git a/tools/snort2lua/preprocessor_states/pps_dcerpc_server.cc b/tools/snort2lua/preprocessor_states/pps_dcerpc_server.cc index 73e88e67b..f02030373 100644 --- a/tools/snort2lua/preprocessor_states/pps_dcerpc_server.cc +++ b/tools/snort2lua/preprocessor_states/pps_dcerpc_server.cc @@ -712,9 +712,24 @@ bool DcerpcServer::convert(std::istringstream& data_stream) } else if (!keyword.compare("smb_file_inspection")) { + std::string val; table_api.open_table(table_name["smb"]); tmpval = parse_smb_file_inspection(data_stream); - table_api.close_table(); + if (!table_api.get_option_value("smb_file_inspection", val)) + { + table_api.close_table(); + } + else + { + table_api.close_table(); + if ( val.compare("on") == 0 ) + { + table_api.open_table("file_id"); + table_api.add_option("enable_type", true); + table_api.close_table(); + } + } + } else if (!keyword.compare("smb2_max_compound")) {