Changed dcmtk user shell to nologin, added a check to delete the dcmtk user on uninst...
authorLance Lin <lqi254@protonmail.com>
Wed, 13 Apr 2022 12:40:54 +0000 (19:40 +0700)
committerLance Lin <lqi254@protonmail.com>
Wed, 13 Apr 2022 12:40:54 +0000 (19:40 +0700)
debian/changelog
debian/dcmtk.postinst
debian/dcmtk.postrm

index 710b0a371f99390a36c056bb1d6bc8c539341eda..9a44ab6940ff258bd687800c834ab7a4c99af19f 100644 (file)
@@ -1,3 +1,10 @@
+dcmtk (3.6.6-6) UNRELEASED; urgency=medium
+
+  * d/dcmtk.postrm: Added check to remove dcmtk user (Closes: #987972)
+  * d/dcmtk.postinst: Change dcmtk user shell to nologin
+
+ -- Lance Lin <LQi254@protonmail.com>  Wed, 13 Apr 2022 19:36:57 +0700
+
 dcmtk (3.6.6-5) unstable; urgency=medium
 
   * d/rules: Re-exposed --interleave-none option. Closes: #1001703
index 42a34251fc0661cd010db9107f6015971595741a..525636d9c8c5adedf3ffcaaa31a307ba78da7a7a 100644 (file)
@@ -11,7 +11,7 @@ if ! getent passwd dcmtk >/dev/null 2>&1; then
     fi
     echo "Adding \`dcmtk' user to system ..."
     adduser --quiet --system --ingroup dcmtk --home /var/lib/dcmtk/db \
-       --shell /bin/sh --disabled-password dcmtk || true
+       --shell /usr/sbin/nologin dcmtk || true
 fi
 
 # work around possible adduser bug, see #119366
index 7365e3be5019014c7b5b17869a823fa769105ffa..17d01187db96c1be40ca06fa0724faa560615650 100644 (file)
@@ -15,5 +15,11 @@ if [ "$1" = "purge" ] ; then
    fi
 fi
 
+# Remove dcmtk user/group if they exist on cleanup
+if -u "dcmtk" > /dev/null 2>&1; then
+       echo "Removing 'dcmtk' user and group from the system...\n"
+       userdel dcmtk
+fi
+
 #DEBHELPER#