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

feat: detect CAP_BPF #681

Merged
merged 2 commits into from
Dec 6, 2024
Merged

feat: detect CAP_BPF #681

merged 2 commits into from
Dec 6, 2024

Conversation

Asphaltt
Copy link
Member

@Asphaltt Asphaltt commented Dec 5, 2024

Without this check, there will be many noisy logs before log "error:operation not permitted", like #678 (comment).

In order to simplify code of main.go, let us move code of kernel
checking to cli.

Furthermore, put kernel checking at pre-run phase of cli.

Signed-off-by: Leon Hwang <hffilwlqm@gmail.com>
cli/cmd/env_detection.go Outdated Show resolved Hide resolved
@cfc4n cfc4n self-requested a review December 5, 2024 14:17
@cfc4n cfc4n added the improve label Dec 5, 2024
If no capability to run bpf progs, we must check CAP_BPF asap.

Without this check, there will be many noisy logs before log "error:operation
not permitted", like gojue#678 (comment).

Signed-off-by: Leon Hwang <hffilwlqm@gmail.com>
Copy link
Member

@cfc4n cfc4n left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks.

@cfc4n cfc4n merged commit 1183b8d into gojue:master Dec 6, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants