Bugzilla – Attachment 74511 Details for
Bug 16690
Improve security of remote database installations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16690: Make DB_HOST environment variable override.
Bug-16690-Make-DBHOST-environment-variable-overrid.patch (text/plain), 2.67 KB, created by
Mark Tompsett
on 2018-04-19 01:21:04 UTC
(
hide
)
Description:
Bug 16690: Make DB_HOST environment variable override.
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2018-04-19 01:21:04 UTC
Size:
2.67 KB
patch
obsolete
>From 6ef0aec20eb2da7862f95c16ae47056c0d787d4d Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Thu, 19 Apr 2018 01:19:53 +0000 >Subject: [PATCH] Bug 16690: Make DB_HOST environment variable override. > >Actually use __WEBSERVER_HOST__ in rewrite-config.PL >--- > debian/templates/koha-conf-site.xml.in | 2 +- > etc/koha-conf.xml | 2 +- > rewrite-config.PL | 8 +++++--- > 3 files changed, 7 insertions(+), 5 deletions(-) > >diff --git a/debian/templates/koha-conf-site.xml.in b/debian/templates/koha-conf-site.xml.in >index 3a66cc4..1ff0524 100644 >--- a/debian/templates/koha-conf-site.xml.in >+++ b/debian/templates/koha-conf-site.xml.in >@@ -253,7 +253,7 @@ __END_SRU_PUBLICSERVER__ > <!-- basic installs have the DB on the same machine, > if not, tweak these next two entries --> > <hostname>__DB_HOST__</hostname> >- <webserver>__DB_HOST__</webserver> >+ <webserver>__WEBSERVER_HOST__</webserver> > <port>3306</port> > <user>__DB_USER__</user> > <pass>__DB_PASS__</pass> >diff --git a/etc/koha-conf.xml b/etc/koha-conf.xml >index cb008b08..2fef44c 100644 >--- a/etc/koha-conf.xml >+++ b/etc/koha-conf.xml >@@ -81,7 +81,7 @@ __PAZPAR2_TOGGLE_XML_POST__ > <!-- basic installs have the DB on the same machine, > if not, tweak these next two entries --> > <hostname>__DB_HOST__</hostname> >- <webserver>__DB_HOST__</webserver> >+ <webserver>__WEBSERVER_HOST__</webserver> > <port>__DB_PORT__</port> > <user>__DB_USER__</user> > <pass>__DB_PASS__</pass> >diff --git a/rewrite-config.PL b/rewrite-config.PL >index 5366493..cf46206 100644 >--- a/rewrite-config.PL >+++ b/rewrite-config.PL >@@ -49,13 +49,14 @@ WEBSERVER_HOST, WEBSERVER_IP, WEBSERVER_PORT, WEBSERVER_PORT_LIBRARIAN, ZEBRA_PA > > =head1 EXAMPLES > >-To override the guessed hostname and email address, run: >+To override the guessed hostnames and email address, run: > >+ DB_HOST=mysecrethostname.com.invalid \ > WEBSERVER_HOST=mysecrethostname.com.invalid \ > WEBMASTER_EMAIL=webmaster@publichost.com make install > > Note that if WEBSERVER_HOST does not resolve to an IP address, you will >-also need to override WEBSERVER_IP. >+also need to override WEBSERVER_IP. DB_HOST defaults to the WEBSERVER_HOST value. > > =cut > >@@ -73,6 +74,7 @@ unless ( $myip = $ENV{WEBSERVER_IP} ) { > or die "can't inet_ntoa ($!)"; > } > >+$mydbhost = $ENV{DB_HOST} || $myhost; > > $prefix = $ENV{'INSTALL_BASE'} || "/usr"; > >@@ -85,7 +87,7 @@ $prefix = $ENV{'INSTALL_BASE'} || "/usr"; > "__PLUGINS_DIR__" => "/var/lib/koha/plugins", > "__DB_TYPE__" => "mysql", > "__DB_NAME__" => "koha", >- "__DB_HOST__" => $myhost, >+ "__DB_HOST__" => $mydbhost, > "__DB_PORT__" => "3306", > "__DB_USER__" => "kohaadmin", > "__DB_PASS__" => "katikoan", >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16690
:
52174
|
53162
|
64847
|
64848
|
74510
|
74511
|
74849
|
79325
|
79662