summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2015-01-05 16:37:08 +0000
committermarcus <marcus@FreeBSD.org>2015-01-05 16:37:08 +0000
commit5c1be5ffb392a2bcafea14bbcc45876c2e971d27 (patch)
tree9a9ee26ad96fed2441b0f63c95f79fbc10a16ddc
parentecbe9e77c74651b842db22bb13a37091fc4b4176 (diff)
downloadFreeBSD-ports-5c1be5ffb392a2bcafea14bbcc45876c2e971d27.zip
FreeBSD-ports-5c1be5ffb392a2bcafea14bbcc45876c2e971d27.tar.gz
Setgid dumpcap to network so non-root users can use wireshark in capture
mode. PR: 195435 Submitted by: yuri@rawbw.com No objection from: ports@
-rw-r--r--net/wireshark/Makefile4
-rw-r--r--net/wireshark/files/pkg-message17
-rw-r--r--net/wireshark/pkg-plist4
3 files changed, 24 insertions, 1 deletions
diff --git a/net/wireshark/Makefile b/net/wireshark/Makefile
index 1071095..825edbc 100644
--- a/net/wireshark/Makefile
+++ b/net/wireshark/Makefile
@@ -3,7 +3,7 @@
PORTNAME?= wireshark
PORTVERSION= 1.12.2
-PORTREVISION?= 2
+PORTREVISION?= 3
CATEGORIES= net ipv6
MASTER_SITES= http://www.wireshark.org/download/src/ \
http://ftp.uni-kl.de/pub/wireshark/src/ \
@@ -162,6 +162,8 @@ CONFIGURE_ARGS+=--with-libgcrypt-prefix=${LOCALBASE}
CONFIGURE_ARGS+=--with-krb5=no
.endif
+PKG_MESSAGE= ${FILESDIR}/pkg-message
+
post-patch:
@${REINPLACE_CMD} -e 's|llua|llua-${LUA_VER}|g ; \
s|-DGDK_PIXBUF_DISABLE_DEPRECATED||g ; \
diff --git a/net/wireshark/files/pkg-message b/net/wireshark/files/pkg-message
new file mode 100644
index 0000000..962a833
--- /dev/null
+++ b/net/wireshark/files/pkg-message
@@ -0,0 +1,17 @@
+===============================================================================
+
+In order for wireshark be able to capture packets when used by unprivileged
+user, /dev/bpf should be in network group and have read-write permissions.
+For example:
+
+# chgrp network /dev/bpf*
+# chmod g+r /dev/bpf*
+# chmod g+w /dev/bpf*
+
+In order for this to persist across reboots, add the following to
+/etc/devfs.conf:
+
+own bpf* root:network
+perm bpf* 0660
+
+===============================================================================
diff --git a/net/wireshark/pkg-plist b/net/wireshark/pkg-plist
index c84b8b8..3606739 100644
--- a/net/wireshark/pkg-plist
+++ b/net/wireshark/pkg-plist
@@ -1,7 +1,11 @@
%%CAPINFOS%%
%%CAPTYPE%%
%%DFTEST%%
+@group network
+@mode 2555
bin/dumpcap
+@mode
+@group
%%EDITCAP%%
%%WIRESHARK%%
%%MERGECAP%%
OpenPOWER on IntegriCloud