tools: bpftool: Make libcap dependency optional
The new libcap dependency is not used for an essential feature of bpftool, and we could imagine building the tool without checks on CAP_SYS_ADMIN by disabling probing features as an unprivileged users. Make it so, in order to avoid a hard dependency on libcap, and to ease packaging/embedding of bpftool. Signed-off-by: Quentin Monnet <quentin@isovalent.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: John Fastabend <john.fastabend@gmail.com> Link: https://lore.kernel.org/bpf/20200429144506.8999-4-quentin@isovalent.com
This commit is contained in:

committed by
Daniel Borkmann

parent
cf9bf71452
commit
0b3b9ca3d1
@@ -55,7 +55,9 @@ DESCRIPTION
|
||||
that case usually represent a small subset of the parameters
|
||||
supported by the system. Unprivileged users MUST use the
|
||||
**unprivileged** keyword: This is to avoid misdetection if
|
||||
bpftool is inadvertently run as non-root, for example.
|
||||
bpftool is inadvertently run as non-root, for example. This
|
||||
keyword is unavailable if bpftool was compiled without
|
||||
libcap.
|
||||
|
||||
**bpftool feature probe dev** *NAME* [**full**] [**macros** [**prefix** *PREFIX*]]
|
||||
Probe network device for supported eBPF features and dump
|
||||
|
Reference in New Issue
Block a user