diff options
author | Israel Madueme <purelogiq@gmail.com> | 2018-03-21 22:00:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-21 22:00:33 +0100 |
commit | 9356ed8882760e0b724db963a0dff8f8d1943450 (patch) | |
tree | 05fe383b3acae5e3d7f9ffcd6e380c8691726195 | |
parent | 24eeb9e547d9a49838dea6c796ede1ce2bcbd5f3 (diff) | |
download | bugzilla-9356ed8882760e0b724db963a0dff8f8d1943450.tar.gz bugzilla-9356ed8882760e0b724db963a0dff8f8d1943450.tar.xz |
Bug 1447669 - Add localconfig parameter for changing shadowdb user and pass
-rw-r--r-- | Bugzilla/DB.pm | 9 | ||||
-rw-r--r-- | Bugzilla/Install/Localconfig.pm | 8 | ||||
-rw-r--r-- | template/en/default/setup/strings.txt.pl | 6 |
3 files changed, 21 insertions, 2 deletions
diff --git a/Bugzilla/DB.pm b/Bugzilla/DB.pm index ff75aa2cf..0dfa47c23 100644 --- a/Bugzilla/DB.pm +++ b/Bugzilla/DB.pm @@ -111,8 +111,13 @@ sub connect_shadow { my $connect_params = dclone(Bugzilla->localconfig); $connect_params->{db_host} = Bugzilla->get_param_with_override('shadowdbhost'); $connect_params->{db_name} = Bugzilla->get_param_with_override('shadowdb'); - $connect_params->{db_port} = Bugzilla->get_param_with_override('shadowport'); - $connect_params->{db_sock} = Bugzilla->get_param_with_override('shadowsock'); + $connect_params->{db_port} = Bugzilla->get_param_with_override('shadowdbport'); + $connect_params->{db_sock} = Bugzilla->get_param_with_override('shadowdbsock'); + + if ( Bugzilla->localconfig->{'shadowdb_user'} && Bugzilla->localconfig->{'shadowdb_pass'} ) { + $connect_params->{db_user} = Bugzilla->localconfig->{'shadowdb_user'}; + $connect_params->{db_pass} = Bugzilla->localconfig->{'shadowdb_pass'}; + } return _connect($connect_params); } diff --git a/Bugzilla/Install/Localconfig.pm b/Bugzilla/Install/Localconfig.pm index de2219f16..7a913358c 100644 --- a/Bugzilla/Install/Localconfig.pm +++ b/Bugzilla/Install/Localconfig.pm @@ -175,6 +175,14 @@ use constant LOCALCONFIG_VARS => ( name => 'inbound_proxies', default => _migrate_param( 'inbound_proxies', '' ), }, + { + name => 'shadowdb_user', + default => '', + }, + { + name => 'shadowdb_pass', + default => '', + } ); diff --git a/template/en/default/setup/strings.txt.pl b/template/en/default/setup/strings.txt.pl index 9de426972..5fc860519 100644 --- a/template/en/default/setup/strings.txt.pl +++ b/template/en/default/setup/strings.txt.pl @@ -269,6 +269,12 @@ END This is the max amount of unshared memory the apache process is allowed to use before Apache::SizeLimit kills it. This is only applicable when run under mod_perl. EOT + localconfig_shadowdb_user => <<EOT, +The username used to authenticate to the shadow db. +EOT + localconfig_shadowdb_pass => <<EOT, +The password used to authenticate to the shadow db. +EOT max_allowed_packet => <<EOT, WARNING: You need to set the max_allowed_packet parameter in your MySQL configuration to at least ##needed##. Currently it is set to ##current##. |