diff --git a/agent/common/permission.go b/agent/common/permission.go index 499cca3..8a1e869 100644 --- a/agent/common/permission.go +++ b/agent/common/permission.go @@ -1,12 +1,17 @@ package common import ( + "os" "slices" "github.com/containerd/containerd/pkg/cap" ) func HasPermission() (bool, error) { + // root is considered as having CAP_BPF capability. + if os.Geteuid() > 0 { + return true, nil + } current, err := cap.Current() if err != nil { return false, err