diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:34:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:34:13 +0000 |
commit | 5033b68d4d2519270fa3690ed1a31fd3e4f7e777 (patch) | |
tree | ab9889da869694224fc01fa4f677b97ada54b544 /debian/wireshark-common.postinst | |
parent | Adding upstream version 4.2.2. (diff) | |
download | wireshark-5033b68d4d2519270fa3690ed1a31fd3e4f7e777.tar.xz wireshark-5033b68d4d2519270fa3690ed1a31fd3e4f7e777.zip |
Adding debian version 4.2.2-1.debian/4.2.2-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/wireshark-common.postinst')
-rw-r--r-- | debian/wireshark-common.postinst | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/debian/wireshark-common.postinst b/debian/wireshark-common.postinst new file mode 100644 index 00000000..aefcf9d8 --- /dev/null +++ b/debian/wireshark-common.postinst @@ -0,0 +1,43 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule +PROGRAM=$(dpkg-divert --truename /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 command -v 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# |