[med-svn] r13678 - trunk/packages/gnuhealth/trunk/debian

Emilien Klein e2jk-guest at alioth.debian.org
Mon May 20 12:55:38 UTC 2013


Author: e2jk-guest
Date: 2013-05-20 12:55:38 +0000 (Mon, 20 May 2013)
New Revision: 13678

Modified:
   trunk/packages/gnuhealth/trunk/debian/gnuhealth-server.postinst
Log:
Make the server's configuration file only readable by the gnuhealth user (as it might contain sensitive authentication information [doesn't right now])


Modified: trunk/packages/gnuhealth/trunk/debian/gnuhealth-server.postinst
===================================================================
--- trunk/packages/gnuhealth/trunk/debian/gnuhealth-server.postinst	2013-05-20 08:35:33 UTC (rev 13677)
+++ trunk/packages/gnuhealth/trunk/debian/gnuhealth-server.postinst	2013-05-20 12:55:38 UTC (rev 13678)
@@ -30,6 +30,7 @@
 GNUHEALTH_USER="gnuhealth"
 GNUHEALTH_HOMEDIR="/var/lib/gnuhealth"
 GNUHEALTH_LOGDIR="/var/log/gnuhealth"
+GNUHEALTH_CONFFILE="/etc/gnuhealth/gnuhealth-server.conf"
 
 case "$1" in
     configure)
@@ -42,6 +43,10 @@
 		    chown ${GNUHEALTH_USER}:adm ${GNUHEALTH_LOGDIR}
 		    chmod 0750 ${GNUHEALTH_LOGDIR}
 		fi
+
+		# Setting ownership and permissions on configuration file
+		chown ${GNUHEALTH_USER}:${GNUHEALTH_USER} ${GNUHEALTH_CONFFILE}
+		chmod 0440 ${GNUHEALTH_CONFFILE}
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)




More information about the debian-med-commit mailing list