extracted files to filesystem.
output_ctx->data = logfile_ctx;
output_ctx->DeInit = LogFileLogDeInitCtx;
+ const char *force_filestore = ConfNodeLookupChildValue(conf, "force-filestore");
+ if (force_filestore != NULL && ConfValIsTrue(force_filestore)) {
+ FileForceFilestoreEnable();
+ SCLogInfo("forcing filestore of all files");
+ }
+
const char *force_magic = ConfNodeLookupChildValue(conf, "force-magic");
if (force_magic != NULL && ConfValIsTrue(force_magic)) {
FileForceMagicEnable();
}
}
+ const char *force_filestore = ConfNodeLookupChildValue(conf, "force-filestore");
+ if (force_filestore != NULL && ConfValIsTrue(force_filestore)) {
+ FileForceFilestoreEnable();
+ SCLogInfo("forcing filestore of all files");
+ }
+
const char *force_magic = ConfNodeLookupChildValue(conf, "force-magic");
if (force_magic != NULL && ConfValIsTrue(force_magic)) {
FileForceMagicEnable();
output_file_ctx->file_ctx = ojc->file_ctx;
if (conf) {
+ const char *force_filestore = ConfNodeLookupChildValue(conf, "force-filestore");
+ if (force_filestore != NULL && ConfValIsTrue(force_filestore)) {
+ FileForceFilestoreEnable();
+ SCLogInfo("forcing filestore of all files");
+ }
+
const char *force_magic = ConfNodeLookupChildValue(conf, "force-magic");
if (force_magic != NULL && ConfValIsTrue(force_magic)) {
FileForceMagicEnable();
#include "app-layer-parser.h"
#include "util-validate.h"
+/** \brief switch to force filestore on all files
+ * regardless of the rules.
+ */
+static int g_file_force_filestore = 0;
+
/** \brief switch to force magic checks on all files
* regardless of the rules.
*/
static void FileFree(File *);
static void FileDataFree(FileData *);
+void FileForceFilestoreEnable(void)
+{
+ g_file_force_filestore = 1;
+}
+
void FileForceMagicEnable(void)
{
g_file_force_magic = 1;
g_file_force_md5 = 1;
}
+int FileForceFilestore(void)
+{
+ return g_file_force_filestore;
+}
+
int FileForceMagic(void)
{
return g_file_force_magic;
SCReturnPtr(NULL, "File");
}
- if (flags & FILE_STORE) {
+ if (flags & FILE_STORE || g_file_force_filestore) {
FileStore(ff);
} else if (flags & FILE_NOSTORE) {
SCLogDebug("not storing this file");
void FlowFileDisableStoringForTransaction(struct Flow_ *f, uint64_t tx_id);
void FilePrune(FileContainer *ffc);
+void FileForceFilestoreEnable(void);
+int FileForceFilestore(void);
void FileDisableMagic(Flow *f, uint8_t);
void FileForceMagicEnable(void);
log-dir: files # directory to store the files
force-magic: no # force logging magic on all stored files
force-md5: no # force logging of md5 checksums
+ force-filestore: no # force storing of all files
#waldo: file.waldo # waldo file to store the file_id across runs
# output module to log files tracked in a easily parsable json format