mirror of
https://github.com/falcosecurity/falco.git
synced 2025-10-22 12:27:10 +00:00
The HOST_ROOT environment variable was incorrectly detected when deploying Falco inside a container. Co-Authored-By: Leonardo Di Donato <leodidonato@gmail.com> Signed-off-by: Lorenzo Fontana <lo@linux.com>
32 lines
966 B
Diff
32 lines
966 B
Diff
diff --git a/userspace/libscap/scap.c b/userspace/libscap/scap.c
|
|
index e9faea51..a1b3b501 100644
|
|
--- a/userspace/libscap/scap.c
|
|
+++ b/userspace/libscap/scap.c
|
|
@@ -52,7 +52,7 @@ limitations under the License.
|
|
//#define NDEBUG
|
|
#include <assert.h>
|
|
|
|
-static const char *SYSDIG_BPF_PROBE_ENV = "SYSDIG_BPF_PROBE";
|
|
+static const char *SYSDIG_BPF_PROBE_ENV = "FALCO_BPF_PROBE";
|
|
|
|
//
|
|
// Probe version string size
|
|
@@ -171,7 +171,7 @@ scap_t* scap_open_live_int(char *error, int32_t *rc,
|
|
return NULL;
|
|
}
|
|
|
|
- snprintf(buf, sizeof(buf), "%s/.sysdig/%s-bpf.o", home, PROBE_NAME);
|
|
+ snprintf(buf, sizeof(buf), "%s/.falco/%s-bpf.o", home, PROBE_NAME);
|
|
bpf_probe = buf;
|
|
}
|
|
}
|
|
@@ -1808,7 +1808,7 @@ int32_t scap_disable_dynamic_snaplen(scap_t* handle)
|
|
|
|
const char* scap_get_host_root()
|
|
{
|
|
- char* p = getenv("SYSDIG_HOST_ROOT");
|
|
+ char* p = getenv("HOST_ROOT");
|
|
static char env_str[SCAP_MAX_PATH_SIZE + 1];
|
|
static bool inited = false;
|
|
if (! inited) {
|