summaryrefslogtreecommitdiff
path: root/wireshark/post-install
blob: 43a2b5faed44f6b98a0f207368bd4b515b9fa8dd (plain)
    1 #!/bin/sh
    2 #
    3 # Add your users to the wireshark group and allow them to capture network data
    4 # as non-root users.
    5 #
    6 
    7 # ugly hack to test for support for capabilities
    8 if ! setfattr -n user.xattr_test /usr/bin/dumpcap 2> /dev/null; then
    9   echo capabilities not supported on this system
   10   echo capturing with wireshark will require root privileges
   11   exit 0
   12 fi
   13 
   14 setfattr -x user.xattr_test /usr/bin/dumpcap 
   15 
   16 
   17 getent group wireshark >/dev/null || groupadd -r wireshark
   18 
   19 chgrp wireshark /usr/bin/dumpcap
   20 chmod 754 /usr/bin/dumpcap
   21 /sbin/setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/dumpcap

Generated by cgit