unix system accounts are less than 1000
authorMarkus Bröker <mbroeker@largo.dyndns.tv>
Fri, 26 Dec 2008 11:23:45 +0100
changeset 32 89fb9c6611ca
parent 31 bbcb8a3366b4
child 33 56571d34d754
unix system accounts are less than 1000 The bot don't need to appear in KDE or GNOME committer: Markus Bröker <mbroeker@largo.homelinux.org>
debian/changelog
debian/copyright
debian/postinst
debian/postrm
debian/preinst
debian/rules
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-mcbot (0.97-1) unstable; urgency=low
+mcbot (0.97-2) unstable; urgency=low
 
   * Initial Release
   * the location of mcbot.cgi is stored in the db
@@ -7,7 +7,7 @@
   * Locale Settings changed to C
   * freenode connect fix
   * stream handling for freebsd
-  * Debian Policy: Assume everything is working and start the 
+  * Debian Policy: Assume everything is working and start the
     service via default
   * irc_login connects now to the proper (non-freenode.net) server
   * privmsgs will be send to the proper location...
@@ -29,5 +29,6 @@
   * Lintian Build Checks
   * command must be freed on error - makes valgrind happy
   * mcbot needs a proper system account - nobody collides with selinux-policy
+  * a system account is between 100 and 999
 
- -- Markus Broeker <mbroeker@largo.homelinux.org>  Thu, 25 Dec 2008 20:00:00 +0200
+ -- Markus Broeker <mbroeker@largo.homelinux.org>  Fri, 26 Dec 2008 11:25:00 +0100
--- a/debian/copyright
+++ b/debian/copyright
@@ -3,11 +3,11 @@
 
 It was downloaded from http://largo.homelinux.org
 
-Upstream Author(s): 
+Upstream Author(s):
 
 	mbroeker@largo.homelinux.org
 
-Copyright: 
+Copyright:
 
 	mbroeker@largo.homelinux.org
 
--- a/debian/postinst
+++ b/debian/postinst
@@ -21,7 +21,7 @@
 case "$1" in
     configure)
 	if [ ! -f /var/lib/mcbot/data/mcbot.dat ];
-	then		
+	then
 		echo "Creating initial database in /var/lib/mcbot/data";
 		dbtool -a -k 1 -v 1;
 		dbtool -d 1;
@@ -33,7 +33,7 @@
 	fi
 
 	echo "Changing ownership in /var/lib/mcbot"
-	useradd -c "MCBOT" -s /bin/bash -d /var/lib/mcbot mcbot
+	useradd -K UID_MIN=100 -K UID_MAX=999 -K GID_MIN=100 -K GID_MAX=999 -c "MCBOT" -s /bin/bash -d /var/lib/mcbot mcbot
 	chown -R mcbot:mcbot /var/lib/mcbot
 	echo "Setting permissions for /var/lib/mcbot/.mcbotrc to 600"
 	chmod 600 /var/lib/mcbot/.mcbotrc
--- a/debian/postrm
+++ b/debian/postrm
@@ -25,12 +25,12 @@
 	rm -f /var/lib/mcbot/.mcbotrc;
 	rm -f /var/lib/mcbot/mcbot-*.log;
     ;;
-    
+
     remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
 	update-rc.d -f mcbot remove &>/dev/null
 	userdel mcbot
 	;;
-	
+
     *)
         echo "postrm called with unknown argument \`$1'" >&2
         exit 1
--- a/debian/preinst
+++ b/debian/preinst
@@ -16,12 +16,12 @@
 
 case "$1" in
     install|upgrade)
-	if [ -x /etc/init.d/mcbot ]; 
+	if [ -x /etc/init.d/mcbot ];
 	then
 		invoke-rc.d mcbot stop;
 	fi
 
-	if [ -f /var/lib/mcbot/.mcbotrc ]; 
+	if [ -f /var/lib/mcbot/.mcbotrc ];
 	then
 		cp -f /var/lib/mcbot/.mcbotrc /var/lib/mcbot/.mcbotrc.dpkg-old
 	fi
--- a/debian/rules
+++ b/debian/rules
@@ -22,7 +22,7 @@
 
 build: build-stamp
 
-build-stamp: configure-stamp 
+build-stamp: configure-stamp
 	dh_testdir
 
 	# Add here commands to compile the package.
@@ -38,12 +38,12 @@
 
 	# Add here commands to clean up after the build process.
 	$(MAKE) distclean
-	dh_clean 
+	dh_clean
 
 install: build
 	dh_testdir
 	dh_testroot
-	dh_clean -k 
+	dh_clean -k
 	dh_installdirs
 
 	# Add here commands to install the package into debian/mcbot.
@@ -58,12 +58,12 @@
 binary-arch: build install
 	dh_testdir
 	dh_testroot
-	dh_installchangelogs 
+	dh_installchangelogs
 	dh_installdocs
 	dh_installexamples
 #	dh_install
 #	dh_installmenu
-#	dh_installdebconf	
+#	dh_installdebconf
 #	dh_installlogrotate
 #	dh_installemacsen
 #	dh_installpam