From f7481c407820430669d89e2b7a36b96e08d796a2 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 22 Sep 2016 10:45:29 +0200 Subject: [PATCH] file-hashing: restore 'force-md5' We don't want to break existing setups. Do issue a warning that a new option is available. --- src/util-file.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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");