svn commit: r272653 - head/contrib/tcpdump
Luigi Rizzo
luigi at FreeBSD.org
Mon Oct 6 15:03:09 UTC 2014
Author: luigi
Date: Mon Oct 6 15:03:08 2014
New Revision: 272653
URL: https://svnweb.freebsd.org/changeset/base/272653
Log:
Fix comment and sort rights by name
MFC after: 3 days
Modified:
head/contrib/tcpdump/tcpdump.c
Modified: head/contrib/tcpdump/tcpdump.c
==============================================================================
--- head/contrib/tcpdump/tcpdump.c Mon Oct 6 14:57:26 2014 (r272652)
+++ head/contrib/tcpdump/tcpdump.c Mon Oct 6 15:03:08 2014 (r272653)
@@ -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");
More information about the svn-src-all
mailing list