mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
Re-instantiate providing location information to LoadFile
hooks.
#1835 subtly changed the semantics of the `LoadFile` plugin hook to no longer have the current script location available for signature files being loaded through `@load-sigs`. This was undocumented behavior, so it's technically not a regression, but since at least one external plugin is depending on it, this change restores the old behavior.
This commit is contained in:
parent
d29160e9de
commit
fccb9ccab0
8 changed files with 66 additions and 11 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <zeek/Obj.h>
|
||||
#include <list>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
@ -40,9 +41,10 @@ struct SignatureFile
|
|||
{
|
||||
std::string file;
|
||||
std::optional<std::string> full_path;
|
||||
Location load_location;
|
||||
|
||||
SignatureFile(std::string file);
|
||||
SignatureFile(std::string file, std::string full_path);
|
||||
SignatureFile(std::string file, std::string full_path, Location load_location);
|
||||
};
|
||||
|
||||
extern std::vector<SignatureFile> sig_files;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue