Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename BPF_PROBE and SYSDIG_BPF_PROBE to FALCO_BPF_PROBE and make the variable consistent #1050

Merged
merged 1 commit into from
Feb 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cmake/modules/sysdig-repo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ ExternalProject_Add(
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND "")
TEST_COMMAND ""
PATCH_COMMAND patch -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/patch/libscap.patch)
22 changes: 22 additions & 0 deletions cmake/modules/sysdig-repo/patch/libscap.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/userspace/libscap/scap.c b/userspace/libscap/scap.c
index 59b04e0a..bdc311cb 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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
# Leave blank for the default probe location, or set to the path
# of a precompiled probe.
# env:
# - name: BPF_PROBE
# - name: FALCO_BPF_PROBE
# value: ""
args: [ "/usr/bin/falco", "--cri", "/host/run/containerd/containerd.sock", "-K", "/var/run/secrets/kubernetes.io/serviceaccount/token", "-k", "https://$(KUBERNETES_SERVICE_HOST)", "-pk"]
volumeMounts:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
# Leave blank for the default probe location, or set to the path
# of a precompiled probe.
# env:
# - name: BPF_PROBE
# - name: FALCO_BPF_PROBE
# value: ""
args: [ "/usr/bin/falco", "--cri", "/host/run/containerd/containerd.sock", "-K", "/var/run/secrets/kubernetes.io/serviceaccount/token", "-k", "https://$(KUBERNETES_SERVICE_HOST)", "-pk"]
volumeMounts:
Expand Down
4 changes: 2 additions & 2 deletions scripts/falco-probe-loader
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ load_bpf_probe() {
echo "**********************************************************"
fi

echo "* BPF probe located, it's now possible to start sysdig"
echo "* BPF probe located, it's now possible to start falco"

ln -sf "${HOME}/.falco/${BPF_PROBE_FILENAME}" "${HOME}/.falco/${BPF_PROBE_NAME}.o"
exit $?
Expand Down Expand Up @@ -402,7 +402,7 @@ if ! hash curl > /dev/null 2>&1; then
exit 1
fi

if [ -v BPF_PROBE ] || [ "${1}" = "bpf" ]; then
if [ -v FALCO_BPF_PROBE ] || [ "${1}" = "bpf" ]; then
load_bpf_probe
else
load_kernel_probe
Expand Down