From a0c189b7302b25ce4770f0450b76e665a5df37b7 Mon Sep 17 00:00:00 2001 From: Lorenzo Fontana Date: Wed, 8 Apr 2020 18:19:15 +0200 Subject: [PATCH] fix: HOST_ROOT environment variable detection The HOST_ROOT environment variable was incorrectly detected when deploying Falco inside a container. Co-Authored-By: Leonardo Di Donato Signed-off-by: Lorenzo Fontana --- cmake/modules/sysdig-repo/patch/libscap.patch | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cmake/modules/sysdig-repo/patch/libscap.patch b/cmake/modules/sysdig-repo/patch/libscap.patch index 70ff3fb8..0fe37496 100644 --- a/cmake/modules/sysdig-repo/patch/libscap.patch +++ b/cmake/modules/sysdig-repo/patch/libscap.patch @@ -1,5 +1,5 @@ diff --git a/userspace/libscap/scap.c b/userspace/libscap/scap.c -index 59b04e0a..bdc311cb 100644 +index e9faea51..a1b3b501 100644 --- a/userspace/libscap/scap.c +++ b/userspace/libscap/scap.c @@ -52,7 +52,7 @@ limitations under the License. @@ -20,3 +20,12 @@ index 59b04e0a..bdc311cb 100644 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) {