]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
fixed copyrights, added -R <rules file>
authorRuss Combs <rucombs@cisco.com>
Fri, 21 Nov 2014 01:16:57 +0000 (20:16 -0500)
committerRuss Combs <rucombs@cisco.com>
Fri, 21 Nov 2014 01:16:57 +0000 (20:16 -0500)
src/main/snort_module.cc
src/utils/ring.h
src/utils/ring_logic.h

index d6631361c52b3e7ca3939453c760fd86b431085f..d9e39594aa47aec0d9545172542f35219d75f6f2 100644 (file)
@@ -178,6 +178,9 @@ static const Parameter s_params[] =
     { "-q", Parameter::PT_IMPLIED, nullptr, nullptr,
       "quiet mode - Don't show banner and status report" },
 
+    { "-R", Parameter::PT_STRING, nullptr, nullptr, 
+      "<rules> include this rules file in the default policy" },
+
     { "-r", Parameter::PT_STRING, nullptr, nullptr, 
       "<pcap>... (same as --pcap-list)" },
 
@@ -538,6 +541,12 @@ bool SnortModule::set(const char*, Value& v, SnortConfig* sc)
     else if ( v.is("-q") )
         ConfigQuiet(sc, v.get_string());
 
+    else if ( v.is("-R") )
+    {
+        string s = "include ";
+        s += v.get_string();
+        parser_append_rules(s.c_str());
+    }
     else if ( v.is("-r") || v.is("--pcap-list") )
     {
         Trough_Multi(SOURCE_LIST, v.get_string());
index 7063882b89e6baaf168f0b7c5324a76accea432a..0920df0fb68f428280eefaa855450e45314bd483 100644 (file)
@@ -16,6 +16,7 @@
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
+// ring.h author Russ Combs <rucombs@cisco.com>
 
 //-------------------------------------------------------------------
 // simple ring
index a20be0afb3c5a0acd2e1bbab59e3c55ffb37e8e0..ee6e7bcd783fdb18815843949c8c02d81de0a336 100644 (file)
@@ -1,3 +1,23 @@
+/*
+** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License Version 2 as
+** published by the Free Software Foundation.  You may not use, modify or
+** distribute this program under any other version of the GNU General
+** Public License.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*/
+// ring_logic.h author Russ Combs <rucombs@cisco.com>
+
 //-------------------------------------------------------------------
 // simple ring logic
 //-------------------------------------------------------------------