summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorBalint Reczey <balint@balintreczey.hu>2015-11-08 22:14:01 +0400
committerBalint Reczey <balint@balintreczey.hu>2015-11-11 04:52:30 +0000
commit51b4c32ba1d8086ce6ebc1a3540e640e2b325ff8 (patch)
tree55a25632ceb9ba5d022471cf21a1256349250da1 /debian
parent1cdaea26696c5cbf6c52228a690e40b2ade58475 (diff)
downloadwireshark-51b4c32ba1d8086ce6ebc1a3540e640e2b325ff8.tar.gz
debian: Finish postinst of wireshark-common even when wireshark group is a user group
Failing postinst has been reported several times under LP#1447893 Change-Id: I196f246b34aa3be9d53f02b4e0092c802effc42a Reviewed-on: https://code.wireshark.org/review/11693 Reviewed-by: Balint Reczey <balint@balintreczey.hu> (cherry picked from commit 2d1bf738d71a4f4f6ac6832bba3889b2c39a471a) Reviewed-on: https://code.wireshark.org/review/11717
Diffstat (limited to 'debian')
-rw-r--r--debian/wireshark-common.postinst13
1 files changed, 8 insertions, 5 deletions
diff --git a/debian/wireshark-common.postinst b/debian/wireshark-common.postinst
index 052fb536b8..f14c9fda8d 100644
--- a/debian/wireshark-common.postinst
+++ b/debian/wireshark-common.postinst
@@ -14,16 +14,19 @@ if ! dpkg-statoverride --list $PROGRAM > /dev/null; then
chmod u=rwx,go=rx $PROGRAM
else
if ! addgroup --quiet --system $GROUP; then
- echo "Executing \"addgroup --quiet --system $GROUP\" failed."
- echo "Most probably the $GROUP group exists, but is not a system group."
- echo "Please delete the existing group or re-create it as a system group and try configuring wireshark-common again."
- exit 1
+ if ! getent group wireshark > /dev/null; then
+ echo "Error: $GROUP group does not exist and executing \"addgroup --quiet --system $GROUP\" failed which prevents configuring Wireshark for capturing traffic as an unprivileged user."
+ echo "Please create the $GROUP system (or user) group and try configuring wireshark-common again."
+ exit 1
+ else
+ echo "Note: $GROUP is a user group, but the preferred configuration is setting it up as a system group. Purging wireshark-common will not remove the $GROUP group as a result, but otherwise everything should work properly."
+ 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
- echo "Setting capabilities for dumpcap using Linux Capabilities failed."
+ echo "Error: Setting capabilities for dumpcap using Linux Capabilities failed."
echo "Falling back to setting set-user-id bit."
chmod u=rwxs,g=rx,o=r $PROGRAM
fi