![Balint Reczey](/assets/img/avatar_default.png)
Change-Id: Ice41c3a723c2606c047ad59a1fde17dfe65f3ce7 Signed-off-by: Balint Reczey <balint.reczey@canonical.com> LP: #1687344 Reviewed-on: https://code.wireshark.org/review/22968 Reviewed-by: Balint Reczey <balint@balintreczey.hu> Petri-Dish: Balint Reczey <balint@balintreczey.hu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
44 lines
1.2 KiB
Bash
44 lines
1.2 KiB
Bash
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
. /usr/share/debconf/confmodule
|
|
PROGRAM=/usr/bin/dumpcap
|
|
GROUP=wireshark
|
|
|
|
if ! dpkg-statoverride --list $PROGRAM > /dev/null; then
|
|
db_get wireshark-common/install-setuid
|
|
if [ -e "$PROGRAM" ]; then
|
|
if [ "$RET" = "false" ] ; then
|
|
chown root:root $PROGRAM
|
|
chmod u=rwx,go=rx $PROGRAM
|
|
else
|
|
if ! addgroup --quiet --system $GROUP; then
|
|
if ! getent group wireshark > /dev/null; then
|
|
db_input high wireshark-common/addgroup-failed || true
|
|
db_go
|
|
exit 1
|
|
else
|
|
db_input high wireshark-common/group-is-user-group || true
|
|
db_go
|
|
fi
|
|
fi
|
|
chown root:$GROUP $PROGRAM
|
|
if which setcap > /dev/null ; then
|
|
chmod u=rwx,g=rx,o=r $PROGRAM
|
|
if ! setcap cap_net_raw,cap_net_admin=eip $PROGRAM; then
|
|
db_input high wireshark-common/setcap-failed || true
|
|
db_go
|
|
chmod u=rwxs,g=rx,o=r $PROGRAM
|
|
fi
|
|
else
|
|
chmod u=rwxs,g=rx,o=r $PROGRAM
|
|
fi
|
|
fi
|
|
fi
|
|
else
|
|
dpkg-statoverride --list $PROGRAM
|
|
fi
|
|
|
|
#DEBHELPER#
|