Skip to content

Commit 4142f13

Browse files
author
vogelor
committed
small improvement of the updater
1 parent 362a6b3 commit 4142f13

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

install/update.php

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,19 @@
124124

125125
//** Database update is a bit brute force and should be rebuild later ;)
126126

127+
/*
128+
* Try to read the DB-admin settings
129+
*/
130+
$clientdb_host = '';
131+
$clientdb_user = '';
132+
$clientdb_password = '';
133+
include_once("/usr/local/ispconfig/server/lib/mysql_clientdb.conf");
134+
$conf["mysql"]["admin_user"] = $clientdb_user;
135+
$conf["mysql"]["admin_password"] = $clientdb_password;
136+
$clientdb_host = '';
137+
$clientdb_user = '';
138+
$clientdb_password = '';
139+
127140
//** Ask user for mysql admin_password if empty
128141
if( empty($conf["mysql"]["admin_password"]) ) {
129142

@@ -219,12 +232,13 @@
219232
$inst->configure_database();
220233

221234
if($conf['mysql']['master_slave_setup'] == 'y') {
222-
//** Update master database rights
223-
$reconfigure_master_database_rights_answer = $inst->simple_query('Reconfigure Permissions in master database?', array('yes','no'),'no');
224-
225-
if($reconfigure_master_database_rights_answer == 'yes') {
226-
$inst->grant_master_database_rights();
227-
}
235+
/*
236+
* Because of security updates and because of new functions in den new Version it is
237+
* better to ALWAYS reconfigure the rights and never ask!
238+
* (for example if we add some new tables to the monitor and the old rights don't have the
239+
* permission to read this tables the monitor always returns a error)
240+
*/
241+
$inst->grant_master_database_rights();
228242
}
229243

230244
//** empty all databases

0 commit comments

Comments
 (0)