mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-25 12:19:56 +00:00
Load probe
This commit is contained in:
@@ -6,3 +6,4 @@
|
||||
|
||||
#define DIGWATCH_LUA_MAIN "${DIGWATCH_LUA_MAIN}"
|
||||
|
||||
#define PROBE_NAME "${PROBE_NAME}"
|
||||
|
@@ -292,7 +292,19 @@ int digwatch_init(int argc, char **argv)
|
||||
|
||||
rules->load_rules(rules_file);
|
||||
inspector->set_filter(rules->get_filter());
|
||||
inspector->open("");
|
||||
|
||||
try
|
||||
{
|
||||
inspector->open("");
|
||||
}
|
||||
catch(sinsp_exception e)
|
||||
{
|
||||
if(system("modprobe " PROBE_NAME " > /dev/null 2> /dev/null"))
|
||||
{
|
||||
fprintf(stderr, "Unable to load the driver\n");
|
||||
}
|
||||
inspector->open("");
|
||||
}
|
||||
|
||||
do_inspect(inspector,
|
||||
rules,
|
||||
|
Reference in New Issue
Block a user