[med-svn] [Git][med-team/dcmtk][master] Changed dcmtk user shell to nologin, added a check to delete the dcmtk user on...

Lance Lin (@linqigang) gitlab at salsa.debian.org
Wed Apr 13 13:41:16 BST 2022



Lance Lin pushed to branch master at Debian Med / dcmtk


Commits:
4bac454c by Lance Lin at 2022-04-13T19:40:54+07:00
Changed dcmtk user shell to nologin, added a check to delete the dcmtk user on uninstall if it exists (Closes: #987972

- - - - -


3 changed files:

- debian/changelog
- debian/dcmtk.postinst
- debian/dcmtk.postrm


Changes:

=====================================
debian/changelog
=====================================
@@ -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 at 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


=====================================
debian/dcmtk.postinst
=====================================
@@ -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


=====================================
debian/dcmtk.postrm
=====================================
@@ -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#	
 



View it on GitLab: https://salsa.debian.org/med-team/dcmtk/-/commit/4bac454c0763ad05868bb93ee8581b7348ec1b3c

-- 
View it on GitLab: https://salsa.debian.org/med-team/dcmtk/-/commit/4bac454c0763ad05868bb93ee8581b7348ec1b3c
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20220413/32082ed5/attachment-0001.htm>


More information about the debian-med-commit mailing list