From 51f6577e2497727ca9225e97aa9eb212fabb89f1 Mon Sep 17 00:00:00 2001 From: Thomas Penteker Date: Tue, 11 Aug 2015 12:22:16 +0200 Subject: [PATCH] wireshark: check for xattr support in post-install --- wireshark/post-install | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wireshark/post-install b/wireshark/post-install index a52ac140e..43a2b5fae 100755 --- a/wireshark/post-install +++ b/wireshark/post-install @@ -4,6 +4,15 @@ # as non-root users. # +# ugly hack to test for support for capabilities +if ! setfattr -n user.xattr_test /usr/bin/dumpcap 2> /dev/null; then + echo capabilities not supported on this system + echo capturing with wireshark will require root privileges + exit 0 +fi + +setfattr -x user.xattr_test /usr/bin/dumpcap + getent group wireshark >/dev/null || groupadd -r wireshark