]> The Tcpdump Group git mirrors - libpcap/commit
Set the error message for "permission denied" errors.
authorGuy Harris <[email protected]>
Sat, 12 Mar 2022 00:53:11 +0000 (16:53 -0800)
committerGuy Harris <[email protected]>
Wed, 16 Mar 2022 04:59:14 +0000 (21:59 -0700)
commit9fffbf03961018f765be8ec174620d68a03c8078
treee78bfa363d36a96956dfeb16d4f435b81f2aad87
parentba84dae08b45470f64a4c9cecaad227a848526dc
Set the error message for "permission denied" errors.

Provide a suggestion for PCAP_ERROR_PERM_DENIED and
PCAP_ERROR_PROMISC_PERM_DENIED; the suggestion may be nothing more than
"you might require root permission", but at least it's something.

Note also what we were trying to do, to indicate that the problem might
be that you need root permission to set promiscuous mode even if you
don't need it to capture, or that you need CAP_NET_ADMIN permission to
change the time stamp mode of an adapter on Linux even though you don't
need it to capture.  (The latter was done as per the discussion in issue
and that triggered the same double-free bug that failing to set up the
memory-mapped ring buffer caused in issue #1054.)

(cherry picked from commit 92c547194ffa85c89b579658f1cc752fad98666f)
pcap-bpf.c
pcap-dag.c
pcap-dlpi.c
pcap-libdlpi.c
pcap-linux.c
pcap-npf.c
pcap-snit.c
pcap-usb-linux.c