Bugzilla – Attachment 64847 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: SHOW GRANTS fails to detect proper permissions
Bug-16690-SHOW-GRANTS-fails-to-detect-proper-permi.patch (text/plain), 2.39 KB, created by
Mark Tompsett
on 2017-07-06 13:31:35 UTC
(
hide
)
Description:
Bug 16690: SHOW GRANTS fails to detect proper permissions
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2017-07-06 13:31:35 UTC
Size:
2.39 KB
patch
obsolete
>From 0815271b4e2d2aa267521cbf248173a3f7fcbae0 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Tue, 7 Jun 2016 22:48:57 -0400 >Subject: [PATCH] Bug 16690: SHOW GRANTS fails to detect proper permissions > >If the DB is on a remote machine, the web server and the >db server are different, but the SHOW GRANTS code in >installer/install.pl is trying to use the SAME machine. >And even if the permissions were allowed accessing from >both the web and db servers, MySQL won't return the >SHOW GRANTS without access to the mysql.user table. To >install *.* permissions became easiest to get working. >This makes it so that you can specify the web and db server >separately, so the SHOW GRANT will match the machine the >user is connected from and return properly. >--- > debian/templates/koha-conf-site.xml.in | 3 +++ > installer/install.pl | 3 ++- > 2 files changed, 5 insertions(+), 1 deletion(-) > >diff --git a/debian/templates/koha-conf-site.xml.in b/debian/templates/koha-conf-site.xml.in >index 8e8204f1aa..8ca1ceca76 100644 >--- a/debian/templates/koha-conf-site.xml.in >+++ b/debian/templates/koha-conf-site.xml.in >@@ -250,7 +250,10 @@ __END_SRU_PUBLICSERVER__ > <config> > <db_scheme>mysql</db_scheme> > <database>__DB_NAME__</database> >+ <!-- basic installs have the DB on the same machine, >+ if not, tweak these next two entries --> > <hostname>__DB_HOST__</hostname> >+ <webserver>__DB_HOST__</webserver> > <port>3306</port> > <user>__DB_USER__</user> > <pass>__DB_PASS__</pass> >diff --git a/installer/install.pl b/installer/install.pl >index ac432148ed..0f7e6d470f 100755 >--- a/installer/install.pl >+++ b/installer/install.pl >@@ -63,6 +63,7 @@ $info{'dbms'} = ( > : "mysql" > ); > $info{'hostname'} = C4::Context->config("hostname"); >+$info{'webserver'} = C4::Context->config("webserver"); > $info{'port'} = C4::Context->config("port"); > $info{'user'} = C4::Context->config("user"); > $info{'password'} = C4::Context->config("pass"); >@@ -147,7 +148,7 @@ elsif ( $step && $step == 2 ) { > #Check if user have all necessary grants on this database. > my $rq = > $dbh->prepare( >- "SHOW GRANTS FOR \'$info{user}\'\@'$info{hostname}'"); >+ "SHOW GRANTS FOR \'$info{user}\'\@'$info{webserver}'"); > $rq->execute; > my $grantaccess; > while ( my ($line) = $rq->fetchrow ) { >-- >2.11.0
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