[debian-edu-commits] debian-edu/pkg-team/ 43/159: user

Dominik George natureshadow-guest at moszumanska.debian.org
Tue Feb 23 10:04:23 UTC 2016


This is an automated email from the git hooks/post-receive script.

natureshadow-guest pushed a commit to branch master
in repository xrdp.

commit 844f053a0dfcdc7922c481e90bc2ccde5b934910
Author: mirabilos <tg at mirbsd.org>
Date:   Thu Aug 6 20:25:42 2015 +0200

    user
---
 changelog     | 3 ++-
 xrdp.postinst | 6 ++++++
 xrdp.postrm   | 3 +++
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/changelog b/changelog
index 40d4cb3..27b9860 100644
--- a/changelog
+++ b/changelog
@@ -1,8 +1,9 @@
 xrdp (0.9.0~git20150803-1~alpha2) teckids; urgency=medium
 
   * Merge some patches from the Debian package
+  * Use an xrdp user; tear it down on purge like old Debian package does
 
- -- Thorsten Glaser <thorsten.glaser at teckids.org>  Thu, 06 Aug 2015 20:16:58 +0200
+ -- Thorsten Glaser <thorsten.glaser at teckids.org>  Thu, 06 Aug 2015 20:25:20 +0200
 
 xrdp (0.9.0~git20150803-1~alpha1) teckids; urgency=medium
 
diff --git a/xrdp.postinst b/xrdp.postinst
index 938317b..e708e88 100644
--- a/xrdp.postinst
+++ b/xrdp.postinst
@@ -24,9 +24,15 @@ set -e
 
 case $1 in
 configure)
+	getent passwd xrdp >/dev/null 2>&1 || adduser \
+	    --quiet --system --group --no-create-home \
+	    --disabled-password --disabled-login \
+	    --home /var/run/xrdp xrdp
+
 	test -e /etc/xrdp/rsakeys.ini || (
 		umask 077
 		xrdp-keygen xrdp auto
+		chown xrdp /etc/xrdp/rsakeys.ini
 	)
 	;;
 
diff --git a/xrdp.postrm b/xrdp.postrm
index d083007..179fe27 100644
--- a/xrdp.postrm
+++ b/xrdp.postrm
@@ -28,6 +28,9 @@ remove)
 purge)
 	rm -f /etc/xrdp/rsakeys.ini
 	rmdir --ignore-fail-on-non-empty /etc/xrdp
+
+	(deluser --system --quiet xrdp || :)
+	(delgroup --system --quiet xrdp || :)
 	;;
 
 upgrade|disappear|failed-upgrade|abort-install|abort-upgrade)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/xrdp.git



More information about the debian-edu-commits mailing list