From: Bhagyashree Bantwal Date: Wed, 14 Jan 2015 21:32:12 +0000 (-0500) Subject: Change the profile name 'all' to 'default' X-Git-Tag: 3.0.0-233~1083^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e22b3b2d64a6f3535c603a869ecc97a94bbc16ed;p=thirdparty%2Fsnort3.git Change the profile name 'all' to 'default' --- diff --git a/lua/snort_defaults.lua b/lua/snort_defaults.lua index 554ae6de7..08f7d0a73 100644 --- a/lua/snort_defaults.lua +++ b/lua/snort_defaults.lua @@ -211,9 +211,9 @@ http_methods = -- build from default_http_methods 'RPC_IN_DATA', 'RPC_OUT_DATA', 'RPC_ECHO_DATA' } -http_profile_all = +http_profile_default = { - profile_type = 'all', + profile_type = 'default', server_flow_depth = 300, client_flow_depth = 300, post_depth = -1, diff --git a/src/service_inspectors/http_inspect/hi_client.cc b/src/service_inspectors/http_inspect/hi_client.cc index 51d53bcc6..6cded8df6 100644 --- a/src/service_inspectors/http_inspect/hi_client.cc +++ b/src/service_inspectors/http_inspect/hi_client.cc @@ -1986,7 +1986,7 @@ const u_char *extract_http_content_length(HI_SESSION *session, p++; if ( hi_util_in_bounds(start, end, p) ) { - if ( ServerConf->profile == HI_APACHE || ServerConf->profile == HI_ALL) + if ( ServerConf->profile == HI_APACHE || ServerConf->profile == HI_DEFAULT) { SkipWhiteSpace(start,end,&p); } @@ -2019,7 +2019,7 @@ const u_char *extract_http_content_length(HI_SESSION *session, if ( isdigit((int)*p)) break; else if(isspace((int)*p) && - (ServerConf->profile == HI_APACHE || ServerConf->profile == HI_ALL) ) + (ServerConf->profile == HI_APACHE || ServerConf->profile == HI_DEFAULT) ) { SkipWhiteSpace(start,end,&p); } @@ -2085,7 +2085,7 @@ const u_char *extract_http_content_length(HI_SESSION *session, } else { - if (ServerConf->profile == HI_APACHE || ServerConf->profile == HI_ALL) + if (ServerConf->profile == HI_APACHE || ServerConf->profile == HI_DEFAULT) { SkipWhiteSpace(start,end,&p); } diff --git a/src/service_inspectors/http_inspect/hi_main.cc b/src/service_inspectors/http_inspect/hi_main.cc index 6977b2746..9391281a4 100644 --- a/src/service_inspectors/http_inspect/hi_main.cc +++ b/src/service_inspectors/http_inspect/hi_main.cc @@ -188,7 +188,7 @@ int PrintServerConf(HTTPINSPECT_CONF *ServerConf) prof = ServerConf->profile; LogMessage(" Server profile: %s\n", - prof==HI_ALL?"All": + prof==HI_DEFAULT?"Default": prof==HI_APACHE?"Apache": prof==HI_IIS?"IIS": prof==HI_IIS4?"IIS4":"IIS5"); diff --git a/src/service_inspectors/http_inspect/hi_module.cc b/src/service_inspectors/http_inspect/hi_module.cc index 14a9c10cf..da34abdc5 100644 --- a/src/service_inspectors/http_inspect/hi_module.cc +++ b/src/service_inspectors/http_inspect/hi_module.cc @@ -250,7 +250,7 @@ bool HttpInspectModule::end(const char* fqn, int, SnortConfig*) // http_server module //------------------------------------------------------------------------- -#define profiles "all | apache | iis | iis_40 | iis_50" +#define profiles "default | apache | iis | iis_40 | iis_50" #define default_methods \ "GET POST PUT SEARCH MKCOL COPY MOVE LOCK UNLOCK NOTIFY POLL BCOPY " \ @@ -329,7 +329,7 @@ static const Parameter hi_profile_server_params[] = { "post_depth", Parameter::PT_INT, "-1:65535", "65495", "amount of POST data to inspect" }, - { "profile_type", Parameter::PT_ENUM, profiles, "all", + { "profile_type", Parameter::PT_ENUM, profiles, "default", "set defaults appropriate for selected server" }, { "server_flow_depth", Parameter::PT_INT, "-1:65535", "0", diff --git a/src/service_inspectors/http_inspect/hi_server.cc b/src/service_inspectors/http_inspect/hi_server.cc index 5b2069839..f25a077aa 100644 --- a/src/service_inspectors/http_inspect/hi_server.cc +++ b/src/service_inspectors/http_inspect/hi_server.cc @@ -420,7 +420,7 @@ static inline const u_char *extract_http_content_encoding(HTTPINSPECT_CONF *Serv p++; if ( hi_util_in_bounds(start, end, p) ) { - if ( ServerConf->profile == HI_APACHE || ServerConf->profile == HI_ALL) + if ( ServerConf->profile == HI_APACHE || ServerConf->profile == HI_DEFAULT) { SkipWhiteSpace(start,end,&p); } @@ -446,7 +446,7 @@ static inline const u_char *extract_http_content_encoding(HTTPINSPECT_CONF *Serv { if ( isalpha((int)*p)) break; - else if(isspace((int)*p) && (ServerConf->profile == HI_APACHE || ServerConf->profile == HI_ALL) ) + else if(isspace((int)*p) && (ServerConf->profile == HI_APACHE || ServerConf->profile == HI_DEFAULT) ) { SkipWhiteSpace(start,end,&p); } diff --git a/src/service_inspectors/http_inspect/hi_ui_config.h b/src/service_inspectors/http_inspect/hi_ui_config.h index b02e2800c..5e1fec198 100644 --- a/src/service_inspectors/http_inspect/hi_ui_config.h +++ b/src/service_inspectors/http_inspect/hi_ui_config.h @@ -70,7 +70,7 @@ struct HTTPINSPECT_CONF_OPT * and debugging information. */ enum PROFILES { - HI_ALL, + HI_DEFAULT, HI_APACHE, HI_IIS, HI_IIS4,