From 9b3442d2f84759594dbec7f8231d750fad649372 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sat, 31 Jul 2021 16:47:33 +0200 Subject: debian: Do not remove users/groups in postrm Doing so is dangerous (UID/GID recycling!) from a security point of view. It should *never* be done automatically. --- debian/changelog | 6 ++++++ debian/gnunet.postrm | 24 ------------------------ 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/debian/changelog b/debian/changelog index 516530fbb..f8cb6ac6f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +gnunet (0.14.1-10) unstable; urgency=low + + * Do not remove users/groups in postrm. + + -- Florian Dold Sat, 31 Jul 2021 16:46:13 +0200 + gnunet (0.14.1-9) unstable; urgency=low * Fix some bugs in configuration file parsing. diff --git a/debian/gnunet.postrm b/debian/gnunet.postrm index 2c3887202..93dac87d1 100644 --- a/debian/gnunet.postrm +++ b/debian/gnunet.postrm @@ -2,19 +2,6 @@ set -e -pathfind() { - OLDIFS="$IFS" - IFS=: - for p in $PATH; do - if [ -x "$p/$*" ]; then - IFS="$OLDIFS" - return 0 - fi - done - IFS="$OLDIFS" - return 1 -} - remove_gns() { # abort if /etc/nsswitch.conf does not exist if ! [ -e /etc/nsswitch.conf ]; then @@ -66,17 +53,6 @@ case "${1}" in remove_gns fi - if pathfind deluser - then - deluser --quiet --system ${_USERNAME} || true - fi - - if pathfind delgroup - then - delgroup --quiet --system --only-if-empty ${_GROUPNAME} || true - delgroup --quiet --system --only-if-empty ${GNUNETDNS_GROUP} || true - fi - rm -rf /var/log/gnunet.log /var/lib/gnunet /etc/default/gnunet ;; -- cgit v1.2.3