TODO netlogon_user_flags_ntlmv2_enabled
[wireshark-sm.git] / packaging / debian / wireshark-common.postinst
blob8e6df32f1faa65ea6597095102d4c1efad4b5d36
1 #!/bin/sh
3 set -e
5 . /usr/share/debconf/confmodule
6 PROGRAM=$(dpkg-divert --truename /usr/bin/dumpcap)
7 GROUP=wireshark
9 if ! dpkg-statoverride --list $PROGRAM > /dev/null; then
10 db_get wireshark-common/install-setuid
11 if [ -e "$PROGRAM" ]; then
12 if [ "$RET" = "false" ] ; then
13 chown root:root $PROGRAM
14 chmod u=rwx,go=rx $PROGRAM
15 else
16 if ! addgroup --quiet --system $GROUP; then
17 if ! getent group wireshark > /dev/null; then
18 db_input high wireshark-common/addgroup-failed || true
19 db_go
20 exit 1
21 else
22 db_input high wireshark-common/group-is-user-group || true
23 db_go
26 chown root:$GROUP $PROGRAM
27 if which setcap > /dev/null ; then
28 chmod u=rwx,g=rx,o=r $PROGRAM
29 if ! setcap cap_net_raw,cap_net_admin=eip $PROGRAM; then
30 db_input high wireshark-common/setcap-failed || true
31 db_go
32 chmod u=rwxs,g=rx,o=r $PROGRAM
34 else
35 chmod u=rwxs,g=rx,o=r $PROGRAM
39 else
40 dpkg-statoverride --list $PROGRAM
43 #DEBHELPER#