Bugzilla – Attachment 79372 Details for
Bug 17237
Stop koha-create from creating MySQL users without host restriction
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17237: Remove CREATE USER 'user'@'%' line
Bug-17237-Remove-CREATE-USER-user-line.patch (text/plain), 1.46 KB, created by
Martin Renvoize (ashimema)
on 2018-09-25 13:21:56 UTC
(
hide
)
Description:
Bug 17237: Remove CREATE USER 'user'@'%' line
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2018-09-25 13:21:56 UTC
Size:
1.46 KB
patch
obsolete
>From 41bc540d7ad34fa1ec54e24b24ed6b267eccdc22 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Wed, 25 Apr 2018 16:44:03 +0000 >Subject: [PATCH] Bug 17237: Remove CREATE USER 'user'@'%' line > >Having a 'user'@'%' line decreases database security. >Bug 16690 closes the need for such a line, and this >bug removes the use of it. > >TEST PLAN >--------- >While this depends on 16690, it is not required for testing. > >On a kohadev box: >sudo koha-create --create-db test_17237_a >git bz apply 17237 >sudo perl ~/misc4dev/cp_debian_files.pl >restart_all >sudo systemctl daemon-reload >sudo koha-create --create_db test_17237_b >sudo mysql -u root >SELECT user,host from mysql.user; >-- test_17237_a will have two entries, one being '%' >-- test_17237_b will only have one entry, not '%' > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > debian/scripts/koha-create | 2 -- > 1 file changed, 2 deletions(-) > >diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create >index 874c7d1c79..74c8cf92e6 100755 >--- a/debian/scripts/koha-create >+++ b/debian/scripts/koha-create >@@ -617,8 +617,6 @@ then > mysql $MYSQL_OPTIONS <<eof > CREATE DATABASE \`$mysqldb\`; > CREATE USER \`$mysqluser\`@'$mysql_hostname' IDENTIFIED BY '$mysqlpwd'; >-CREATE USER \`$mysqluser\`@'%' IDENTIFIED BY '$mysqlpwd'; >-GRANT ALL PRIVILEGES ON \`$mysqldb\`.* TO \`$mysqluser\`; > GRANT ALL PRIVILEGES ON \`$mysqldb\`.* TO \`$mysqluser\`@'$mysql_hostname'; > FLUSH PRIVILEGES; > eof >-- >2.18.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 17237
:
74850
|
79372
|
79848