From: Russ Combs Date: Wed, 27 Aug 2014 16:55:18 +0000 (-0400) Subject: more FIXITs X-Git-Tag: 3.0.0-233~1417^2~12^2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bdd7b74ed72a5ba150b10830cefda146b19cfb69;p=thirdparty%2Fsnort3.git more FIXITs --- diff --git a/ChangeLog b/ChangeLog index 89c19e4dd..96f9753ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,8 @@ -- fixed error / warning line number issue -- changed --conf-error-out to --pedantic -- more FIXIT-H fixed +-- removed process.plugin_path and process.script_path since they are + needed ahead of parsing 116 -- fixed valgrind leak diff --git a/src/hash/zhash.cc b/src/hash/zhash.cc index 960a1458e..ac0c76187 100644 --- a/src/hash/zhash.cc +++ b/src/hash/zhash.cc @@ -243,7 +243,10 @@ ZHash::ZHash(int rows, int keysz) sfhashfcn = sfhashfcn_new(rows); if ( !sfhashfcn ) - return; // FIXIT-H can't just return + { + FatalError("can't allocate hash table\n"); + return; + } /* Allocate the array of node ptrs */ table = new ZHashNode*[rows]; diff --git a/src/main/modules.cc b/src/main/modules.cc index 7fcba6903..497aa13dc 100644 --- a/src/main/modules.cc +++ b/src/main/modules.cc @@ -864,9 +864,8 @@ static const Parameter daq_params[] = { "no_promisc", Parameter::PT_BOOL, nullptr, "false", "whether to put DAQ device into promiscuous mode" }, - // FIXIT-H range determined by available plugins - { "name", Parameter::PT_STRING, nullptr, "pcap", - "select name of DAQ" }, + { "type", Parameter::PT_STRING, nullptr, "pcap", + "select type of DAQ" }, // FIXIT-L should be a list? { "var", Parameter::PT_STRING, nullptr, nullptr, @@ -901,7 +900,7 @@ bool DaqModule::set(const char*, Value& v, SnortConfig* sc) if ( v.get_bool() ) sc->run_flags |= RUN_FLAG__NO_PROMISCUOUS; } - else if ( v.is("name") ) + else if ( v.is("type") ) ConfigDaqType(sc, v.get_string()); else if ( v.is("var") ) @@ -1111,12 +1110,6 @@ static const Parameter process_params[] = { "set_uid", Parameter::PT_STRING, nullptr, nullptr, "set user ID (same as -u)" }, - { "plugin_path", Parameter::PT_STRING, nullptr, nullptr, - "directory containing plugins (same as --plugin-path)" }, - - { "script_path", Parameter::PT_STRING, nullptr, nullptr, - "directory containing scripts (same as --scripts-path)" }, - { "umask", Parameter::PT_STRING, nullptr, nullptr, "set process umask (same as -m)" }, @@ -1154,12 +1147,6 @@ bool ProcessModule::set(const char*, Value& v, SnortConfig* sc) else if ( v.is("set_uid") ) ConfigSetUid(sc, v.get_string()); - else if ( v.is("plugin_path") ) - ConfigPluginPath(sc, v.get_string()); - - else if ( v.is("script_path") ) - ConfigScriptPath(sc, v.get_string()); - else if ( v.is("umask") ) ConfigUmask(sc, v.get_string()); @@ -1464,9 +1451,9 @@ static const Parameter rate_filter_params[] = "count interval" }, { "new_action", Parameter::PT_SELECT, - // FIXIT-H range based on available action plugins + // FIXIT-L this list should be defined globally "alert | drop | log | pass | | reject | sdrop", "alert", - "restrict filter to these addresses according to track" }, + "take this action on future hits until timeout" }, { "timeout", Parameter::PT_INT, "0:", "1", "count interval" }, @@ -1599,7 +1586,7 @@ bool RuleStateModule::end(const char*, int idx, SnortConfig* sc) // hosts module //------------------------------------------------------------------------- -// FIXIT-H these are cloned from ip_module.cc and tcp_module.cc +// FIXIT-L these are cloned from ip_module.cc and tcp_module.cc static const char* ip_policies = "first | linux | bsd | bsd_right |last | windows | solaris"; diff --git a/src/main/policy.h b/src/main/policy.h index 50953c00c..7faae8d7b 100644 --- a/src/main/policy.h +++ b/src/main/policy.h @@ -31,7 +31,7 @@ typedef unsigned int PolicyId; -// FIXIT-H split into separate modules +// FIXIT-L split into separate headers //------------------------------------------------------------------------- // traffic stuff diff --git a/src/main/snort.cc b/src/main/snort.cc index 03a348fb2..bb7d820e3 100644 --- a/src/main/snort.cc +++ b/src/main/snort.cc @@ -325,7 +325,6 @@ static void SnortInit(int argc, char **argv) LogMessage("--------------------------------------------------\n"); - // FIXIT-H config plugin_path won't work like this Shell::init(); ModuleManager::init(); diff --git a/src/network_inspectors/network_inspectors.cc b/src/network_inspectors/network_inspectors.cc index 7ca500c4f..390007ffa 100644 --- a/src/network_inspectors/network_inspectors.cc +++ b/src/network_inspectors/network_inspectors.cc @@ -1,6 +1,5 @@ /* ** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved. -** Copyright (C) 2013-2013 Sourcefire, Inc. ** ** 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 diff --git a/src/packet_io/sfdaq.h b/src/packet_io/sfdaq.h index ad9e872ff..811bbb006 100644 --- a/src/packet_io/sfdaq.h +++ b/src/packet_io/sfdaq.h @@ -1,6 +1,6 @@ /**************************************************************************** * -** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved. + * Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2005-2013 Sourcefire, Inc. * * This program is free software; you can redistribute it and/or modify