From 34bfcb5e7e76eabb02eab9a025256cd01b9d9ae5 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 19 Aug 2013 11:19:34 -0400 Subject: [PATCH] add lines to change the ZM_DB_USER and ZM_DB_PASS when the user and password are supplied on the command line. This is neccessary when the regular zm user does not have alter privileges. --- scripts/zmupdate.pl.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/zmupdate.pl.in b/scripts/zmupdate.pl.in index cebbc424e..11b922d53 100644 --- a/scripts/zmupdate.pl.in +++ b/scripts/zmupdate.pl.in @@ -98,6 +98,11 @@ if ( !GetOptions( 'check'=>\$check, 'freshen'=>\$freshen, 'rename'=>\$rename, 'z Usage(); } +my $dbh = zmDbConnect(); +*ZM_DB_USER = sub { $dbUser } if ZM_DB_USER ne $dbUser; +*ZM_DB_PASS = sub { $dbPass } if ZM_DB_PASS ne $dbPass; +zmDbDisconnect(); + if ( ! ($check || $freshen || $rename || $zoneFix || $migrateEvents || $version) ) { if ( ZM_DYN_DB_VERSION )