]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #1599 in SNORT/snort3 from ~KATHARVE/snort3:uniformity_rule_state...
authorTom Peters (thopeter) <thopeter@cisco.com>
Mon, 6 May 2019 21:01:49 +0000 (17:01 -0400)
committerTom Peters (thopeter) <thopeter@cisco.com>
Mon, 6 May 2019 21:01:49 +0000 (17:01 -0400)
Squashed commit of the following:

commit b5dbbf67ffbef7a7f0afcf0fa68083339bea3c2b
Author: Katura Harvey <katharve@cisco.com>
Date:   Wed May 1 09:52:43 2019 -0400

    Uniformity: Update the rule_state value to yes or no

src/main/modules.cc
tools/snort2lua/keyword_states/kws_rule_state.cc

index 520f2d557ead96ad31d801887bdeeeaa0178976a..3abaa0886b1376ac4b35eb65f846312be4e15d85 100644 (file)
@@ -1218,7 +1218,7 @@ bool InspectionModule::set(const char*, Value& v, SnortConfig* sc)
 
 static const Parameter ips_params[] =
 {
-    { "default_rule_state", Parameter::PT_ENUM, "false | true | inherit", "inherit",
+    { "default_rule_state", Parameter::PT_ENUM, "no | yes | inherit", "inherit",
       "enable or disable ips rules" },
 
     { "enable_builtin_rules", Parameter::PT_BOOL, nullptr, "false",
@@ -1737,7 +1737,7 @@ static const Parameter single_rule_state_params[] =
       "log | pass | alert | drop | block | reset | inherit", "inherit",
       "apply action if rule matches or inherit from rule definition" },
 
-    { "enable", Parameter::PT_ENUM, "false | true | inherit", "inherit",
+    { "enable", Parameter::PT_ENUM, "no | yes | inherit", "inherit",
       "enable or disable rule in current ips policy or use default defined by ips policy" },
 
     { nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr }
index 6519fa1c34533ca15072f8889f27548fab945c0a..6ffadb613000ccb4f8e8d82063c76c0aa8e4b057 100644 (file)
@@ -75,9 +75,9 @@ bool RuleState::convert(std::istringstream& data_stream)
             break;
         case 2:
             if (arg == "enabled")
-                enable = "true";
+                enable = "yes";
             else if (arg == "disabled")
-                enable = "false";
+                enable = "no";
             else
             {
                 data_api.failed_conversion(data_stream, "third option must be {enabled|disabled|");