Move logic to execute HookLoadFile for signatures into rule matcher code.

This (1) fixes an issue where signature files supplied on the command
line wouldn't pass through the hooks, and (2) prepares for allowing
hooks to supply the content of a signature file directly.
This commit is contained in:
Robin Sommer 2021-10-07 09:59:15 +02:00
parent f080a814c4
commit 1efaf8d7a4
9 changed files with 94 additions and 40 deletions

View file

@ -3,6 +3,7 @@
#pragma once
#include <list>
#include <optional>
#include <string>
#include <vector>
@ -34,6 +35,16 @@ public:
};
extern std::list<ScannedFile> files_scanned;
extern std::vector<std::string> sig_files;
struct SignatureFile
{
std::string file;
std::optional<std::string> full_path;
SignatureFile(std::string file);
SignatureFile(std::string file, std::string full_path);
};
extern std::vector<SignatureFile> sig_files;
} // namespace zeek::detail