summaryrefslogtreecommitdiffstats
path: root/contrib/tcpdump/tcpdump.c
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2014-10-06 15:03:08 +0000
committerluigi <luigi@FreeBSD.org>2014-10-06 15:03:08 +0000
commitb0b04372356cce9b0d0a95c3d84a514421750bb4 (patch)
treea2a199781e821d8cbdd28ff7e85101caaaca6136 /contrib/tcpdump/tcpdump.c
parent90e45e872567394488b42e3824f966c49451bf4a (diff)
downloadFreeBSD-src-b0b04372356cce9b0d0a95c3d84a514421750bb4.zip
FreeBSD-src-b0b04372356cce9b0d0a95c3d84a514421750bb4.tar.gz
Fix comment and sort rights by name
MFC after: 3 days
Diffstat (limited to 'contrib/tcpdump/tcpdump.c')
-rw-r--r--contrib/tcpdump/tcpdump.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/tcpdump/tcpdump.c b/contrib/tcpdump/tcpdump.c
index af34f88..7ca2cfe 100644
--- a/contrib/tcpdump/tcpdump.c
+++ b/contrib/tcpdump/tcpdump.c
@@ -1534,11 +1534,11 @@ main(int argc, char **argv)
static const unsigned long cmds[] = { BIOCGSTATS };
/*
- * the various libpcap devices use a combination of
- * read (bpf), ioctl (bpf, netmap), poll (netmap)
- * so we add the relevant access rights.
+ * The various libpcap devices use a combination of
+ * read (bpf), ioctl (bpf, netmap), poll (netmap).
+ * Grant the relevant access rights, sorted by name.
*/
- cap_rights_init(&rights, CAP_IOCTL, CAP_READ, CAP_EVENT);
+ cap_rights_init(&rights, CAP_EVENT, CAP_IOCTL, CAP_READ);
if (cap_rights_limit(pcap_fileno(pd), &rights) < 0 &&
errno != ENOSYS) {
error("unable to limit pcap descriptor");
OpenPOWER on IntegriCloud