]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
build 155; file fixup
authorRuss Combs <rucombs@cisco.com>
Sat, 30 May 2015 15:12:23 +0000 (11:12 -0400)
committerRuss Combs <rucombs@cisco.com>
Sat, 30 May 2015 15:12:23 +0000 (11:12 -0400)
src/file_api/file_mime_config.h
src/file_api/file_mime_process.cc
src/file_api/libs/file_lib.h
src/main/build.h
src/service_inspectors/imap/imap.cc
src/service_inspectors/imap/imap_module.cc
src/service_inspectors/pop/pop.cc
src/service_inspectors/smtp/smtp.cc

index 39b6827f92e9ebfda6e293b2057446a6d40eed12..30402bb724054b62a1d50a04564ee586370fdb20 100644 (file)
 #include "file_api.h"
 
 /* Function prototypes  */
-void set_mime_decode_config_defauts(DecodeConfig* decode_conf);
-void set_mime_log_config_defauts(MAIL_LogConfig* log_config);
-int parse_mime_decode_args(DecodeConfig* decode_conf, char* arg, const char* preproc_name);
-bool is_decoding_enabled(DecodeConfig* decode_conf);
-bool is_mime_log_enabled(MAIL_LogConfig* log_config);
+void set_mime_decode_config_defauts(DecodeConfig*);
+void set_mime_log_config_defauts(MAIL_LogConfig*);
+int parse_mime_decode_args(DecodeConfig*, char* arg, const char* preproc_name);
+bool is_mime_log_enabled(MAIL_LogConfig*);
+bool is_decoding_enabled(DecodeConfig*);
 bool is_decoding_conf_changed(DecodeConfig* configNext, DecodeConfig* config, const
     char* preproc_name);
-void check_decode_config(DecodeConfig* currentConfig);
+void check_decode_config(DecodeConfig*);
 #endif
 
index 9c1bf19f16fc2274c7d00ff899088b00d84a6743..377f2715d6da28ee94b0cad583e22003851d5ae5 100644 (file)
@@ -37,6 +37,7 @@
 #include "protocols/packet.h"
 #include "detection_util.h"
 #include "framework/data_bus.h"
+#include "file_mime_config.h"
 
 MimePcre mime_boundary_pcre;
 
@@ -335,18 +336,6 @@ static int search_str_found(void* id, void*, int index, void*, void*)
     return 1;
 }
 
-static inline int is_decoding_enabled(DecodeConfig* pPolicyConfig)
-{
-    if ( (pPolicyConfig->b64_depth > -1) || (pPolicyConfig->qp_depth > -1)
-        || (pPolicyConfig->uu_depth > -1) || (pPolicyConfig->bitenc_depth > -1)
-        || (pPolicyConfig->file_depth > -1))
-    {
-        return 0;
-    }
-    else
-        return -1;
-}
-
 static inline void process_decode_type(const char* start, int length, bool cnt_xf,
     MimeState* mime_ssn)
 {
index 7dc16cc75df79650a845cf2f2a70f8492b6e6ba7..2e39f572847631f8be77d2685df08b0e77150993 100644 (file)
@@ -87,8 +87,6 @@ void file_sig_sha256_set(FileContext* context, uint8_t* signature);
 uint8_t* file_sig_sha256_get(FileContext* context);
 
 const char* file_type_name(void* conf, uint32_t id);
-extern int64_t file_type_depth;
-extern int64_t file_signature_depth;
 
 void free_file_identifiers(void*);
 void file_sha256_print(unsigned char* hash);
index 9ced4405d622fdddbac60eddf0c7212879f23a01..87306d35864df39dcebb401354bbba2a0944521b 100644 (file)
@@ -7,5 +7,5 @@
 //                                               //
 //-----------------------------------------------//
 
-#define BUILD "154"
+#define BUILD "155"
 
index 7e7f6378177dd2cd5a89d137dd3b694cb9102a7a..da62f26f816fa23fd014a93b39a3ed29e396030e 100644 (file)
@@ -804,7 +804,7 @@ bool Imap::configure(SnortConfig*)
 {
     config->decode_conf.file_depth = file_api->get_max_file_depth();
 
-    if (config->decode_conf.file_depth > 0)
+    if (config->decode_conf.file_depth > -1)
         config->log_config.log_filename = 1;
 
     if (file_api->is_decoding_enabled(&config->decode_conf) )
index 2aad991809a263c8a375bfa1c8568919413b7480..ba51581b0159e637a4185873baa7d56c3a8fd098 100644 (file)
@@ -97,7 +97,7 @@ bool ImapModule::set(const char*, Value& v, SnortConfig*)
             decode_depth += 4 - (decode_depth & 3);
             if (decode_depth > 65535 )
             {
-                decode_depth = decode_depth - 4;
+                decode_depth = decode_depth - 4;  // FIXIT-L what does this do?
             }
             LogMessage("WARNING: IMAP: 'b64_decode_depth' is not a multiple of 4. "
                 "Rounding up to the next multiple of 4. The new 'b64_decode_depth' is %d.\n",
index d8b96c4cb9c4038cd9aa9970be44f853b2b8e26f..4000400ce4ca3f101e831f07733a5ae8963c5b63 100644 (file)
@@ -738,7 +738,7 @@ bool Pop::configure(SnortConfig* )
 {
     config->decode_conf.file_depth = file_api->get_max_file_depth();
 
-    if (config->decode_conf.file_depth > 0)
+    if (config->decode_conf.file_depth > -1)
         config->log_config.log_filename = 1;
 
     if (file_api->is_decoding_enabled(&config->decode_conf) )
index 296d98166f3b957080af540663f4ed30ff875287..355ce6a205d798cd57d7d46bfc5d94d59b5eab49 100644 (file)
@@ -1647,7 +1647,7 @@ bool Smtp::configure(SnortConfig*)
 {
     config->decode_conf.file_depth = file_api->get_max_file_depth();
 
-    if (config->decode_conf.file_depth > 0)
+    if (config->decode_conf.file_depth > -1)
         config->log_config.log_filename = 1;
 
     if (file_api->is_decoding_enabled(&config->decode_conf) )