From: Victor Julien Date: Thu, 22 Sep 2016 08:45:29 +0000 (+0200) Subject: file-hashing: restore 'force-md5' X-Git-Tag: suricata-3.2beta1~326 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7481c407820430669d89e2b7a36b96e08d796a2;p=thirdparty%2Fsuricata.git file-hashing: restore 'force-md5' We don't want to break existing setups. Do issue a warning that a new option is available. --- diff --git a/src/util-file.c b/src/util-file.c index b2f6b47a5e..502fcf059b 100644 --- a/src/util-file.c +++ b/src/util-file.c @@ -134,6 +134,22 @@ void FileForceHashParseCfg(ConfNode *conf) ConfNode *forcehash_node = NULL; + /* legacy option */ + const char *force_md5 = ConfNodeLookupChildValue(conf, "force-md5"); + if (force_md5 != NULL) { + SCLogWarning(SC_ERR_DEPRECATED_CONF, "deprecated 'force-md5' option " + "found. Please use 'force-hash: [md5]' instead"); + + if (ConfValIsTrue(force_md5)) { +#ifdef HAVE_NSS + FileForceMd5Enable(); + SCLogInfo("forcing md5 calculation for logged files"); +#else + SCLogInfo("md5 calculation requires linking against libnss"); +#endif + } + } + if (conf != NULL) forcehash_node = ConfNodeLookupChild(conf, "force-hash");