list-keywords: fix when not using default install

As we don't parse the YAML file when listing of keywords is asked,
suricata make a test on existence of the build-default directory.
So with a non standard (working) install (even a single configure
without option lead to a failure), the keyword listing fails
because the default logging directory does not exist.
pull/175/merge
Eric Leblond 13 years ago committed by Victor Julien
parent b0471fb8e4
commit 42ace54137

@ -1315,6 +1315,8 @@ int main(int argc, char **argv)
log_dir = DEFAULT_LOG_DIR;
#endif /* OS_WIN32 */
}
if (!list_keywords && !list_app_layer_protocols) {
#ifdef OS_WIN32
if (_stat(log_dir, &buf) != 0) {
#else
@ -1325,6 +1327,7 @@ int main(int argc, char **argv)
"Shutting down the engine", log_dir, conf_filename);
exit(EXIT_FAILURE);
}
}
/* Pull the max pending packets from the config, if not found fall
* back on a sane default. */

Loading…
Cancel
Save