]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1447669 - Add localconfig parameter for changing shadowdb user and pass
authorIsrael Madueme <purelogiq@gmail.com>
Wed, 21 Mar 2018 21:00:33 +0000 (17:00 -0400)
committerGitHub <noreply@github.com>
Wed, 21 Mar 2018 21:00:33 +0000 (17:00 -0400)
Bugzilla/DB.pm
Bugzilla/Install/Localconfig.pm
template/en/default/setup/strings.txt.pl

index ff75aa2cf68b36e276b9b16f7e9e2eff4d4bffe7..0dfa47c236bcaa2d11d1d62c62d4f38b5b7608a7 100644 (file)
@@ -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);
 }
index de2219f1652ea30cdeed673f92b55ea3e614ca9f..7a913358c9c9032c16909f525f3a5a9ce9f17159 100644 (file)
@@ -175,6 +175,14 @@ use constant LOCALCONFIG_VARS => (
         name => 'inbound_proxies',
         default => _migrate_param( 'inbound_proxies', '' ),
     },
+    {
+        name => 'shadowdb_user',
+        default => '',
+    },
+    {
+        name => 'shadowdb_pass',
+        default => '',
+    }
 );
 
 
index 9de42697277362c93562d22c5007ff7095f194c6..5fc860519f93549aa95144dbf036af8404efd3d1 100644 (file)
@@ -268,6 +268,12 @@ END
     localconfig_apache_size_limit => <<EOT,
 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