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

chore(falco.yaml): use HOME env var for ebpf probe path. #2971

Merged
merged 1 commit into from Dec 13, 2023

Conversation

FedeDP
Copy link
Contributor

@FedeDP FedeDP commented Dec 13, 2023

What type of PR is this?

/kind cleanup

Any specific area of the project related to this PR?

What this PR does / why we need it:

Since #2918 is now merged, we can freely use env var.
This is more correct since eg: falcoctl will copy built drivers there: https://github.com/falcosecurity/falcoctl/blob/main/pkg/driver/type/bpf.go#L55.
Most of the time, both falcoctl and Falco will run as root, thus the env var will resolve to the current /root/.falco/falco-bpf.o.
But if user decides to eg: have a Falco user with reduced privileges, she/he will still be able to let falcoctl install its ebpf probe and then Falco would start without issues.

Example output without and with sudo:

Wed Dec 13 17:10:40 2023: Opening 'syscall' source with BPF probe. BPF probe path: /home/federico/.falco/falco-bpf.o
Wed Dec 13 17:10:52 2023: Opening 'syscall' source with BPF probe. BPF probe path: /root/.falco/falco-bpf.o

Also, this was already the default behavior when FALCO_BPF_PROBE="" env var was passed:

const char *home = std::getenv("HOME");

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
@FedeDP
Copy link
Contributor Author

FedeDP commented Dec 13, 2023

/milestone 0.37.0

@poiana poiana added this to the 0.37.0 milestone Dec 13, 2023
Copy link
Contributor

@incertum incertum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@FedeDP
Copy link
Contributor Author

FedeDP commented Dec 13, 2023

Wow Melissa, quicker than me 😆

Copy link
Member

@Andreagit97 Andreagit97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@poiana
Copy link

poiana commented Dec 13, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Andreagit97, FedeDP, incertum

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [Andreagit97,FedeDP,incertum]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit 752e8bf into master Dec 13, 2023
28 checks passed
@poiana poiana deleted the chore/use_home_env_var branch December 13, 2023 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants