[Pkg-nagios-changes] [SCM] Debian packaging of icinga-web branch, master, updated. debian/1.7.0-2-3-gf5f08e9

Markus Frosch markus at lazyfrosch.de
Sun Jun 17 15:24:51 UTC 2012


The following commit has been merged in the master branch:
commit f5f08e90554fe088011f1598c5ac480ca65077f3
Author: Markus Frosch <markus at lazyfrosch.de>
Date:   Sun Jun 17 17:24:46 2012 +0200

    now updating user_modified when setting user password

diff --git a/debian/icinga-web.postinst b/debian/icinga-web.postinst
index 508c461..b4e9c78 100644
--- a/debian/icinga-web.postinst
+++ b/debian/icinga-web.postinst
@@ -127,7 +127,7 @@ setpassword() {
         pwhash_e=${pwhash/\'/\\\'}
         
         export MYSQL_PWD="$dbc_dbpass"
-        echo "UPDATE nsm_user SET user_password='""$pwhash_e""', user_salt = '""$salt_e""' WHERE user_name = 'root';" \
+        echo "UPDATE nsm_user SET user_password='""$pwhash_e""', user_salt = '""$salt_e""', user_modified = NOW() WHERE user_name = 'root';" \
            | mysql -h "${dbc_dbhost:=localhost}" -u "$dbc_dbuser" "$dbc_dbname"
         echo "root password updated in database!"
     elif [ "$dbc_dbtype" = "pgsql" ]; then
@@ -135,7 +135,7 @@ setpassword() {
         salt_e=${salt/\'/\\\'}
         pwhash_e=${pwhash/\'/\\\'}
         
-        su -c "echo \"UPDATE nsm_user SET user_password='""$pwhash_e""', user_salt = '""$salt_e""' WHERE user_name = 'root';\" | psql '$dbc_dbname'" postgres >/dev/null
+        su -c "echo \"UPDATE nsm_user SET user_password='""$pwhash_e""', user_salt = '""$salt_e""', user_modified = NOW() WHERE user_name = 'root';\" | psql '$dbc_dbname'" postgres >/dev/null
         echo "root password updated in database!"
     else
         echo "db type '$dbc_dbtype' not implemented for setting root password!" >&2

-- 
Debian packaging of icinga-web



More information about the Pkg-nagios-changes mailing list