mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Read fuzzy hash databases on init
Instead of reading the fuzzy db on every invocation, read and store the db contents during initialization and store the contents in memory. The only significant behavior change here is that a change in db contents now (obviously) requires a daemon restart, as no API is provided to flush the list of ssdeep chunks.
This commit is contained in:
committed by
Felipe Zimmerle
parent
fd49ca7138
commit
96a1f55e16
@@ -409,8 +409,14 @@ struct msre_cache_rec {
|
||||
apr_size_t val_len;
|
||||
};
|
||||
|
||||
struct fuzzy_hash_chunk {
|
||||
const char *data;
|
||||
struct fuzzy_hash_chunk *next;
|
||||
};
|
||||
|
||||
struct fuzzy_hash_param_data {
|
||||
const char *file;
|
||||
struct fuzzy_hash_chunk *head;
|
||||
int threshold;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user