Summary: | Stop koha-create from creating MySQL users without host restriction | ||
---|---|---|---|
Product: | Koha | Reporter: | Magnus Enger <magnus> |
Component: | Packaging | Assignee: | Magnus Enger <magnus> |
Status: | CLOSED FIXED | QA Contact: | Josef Moravec <josef.moravec> |
Severity: | minor | ||
Priority: | P5 - low | CC: | fridolin.somers, josef.moravec, martin.renvoize, mirko, mtompset, nick |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16690 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Bug Depends on: | 16690 | ||
Bug Blocks: | |||
Attachments: |
Bug 17237: Remove CREATE USER 'user'@'%' line
Bug 17237: Remove CREATE USER 'user'@'%' line Bug 17237: Remove CREATE USER 'user'@'%' line |
Description
Magnus Enger
2016-09-02 06:11:22 UTC
From IRC: <eythian> I think it's for when koha-create creates databases on remote servers, perhaps. <eythian> It probably should be off by default but configureable. (In reply to Magnus Enger from comment #1) > From IRC: > > <eythian> I think it's for when koha-create creates databases on remote > servers, perhaps. > <eythian> It probably should be off by default but configureable. If so, might I suggest looking at bug 16690? Bug 16690 will remove the requirement for it from the code. This bug will fix koha-create to not generate the '%'. Created attachment 74850 [details] [review] 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 '%' Created attachment 79372 [details] [review] 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> Does just what it says on the tin when applied with bug 16690, signing off. Created attachment 79848 [details] [review] 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> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Awesome work all! Pushed to master for 18.11 Pushed to 18.05.x for 18.05.05 Pushed to 17.11.x for 17.11.12 |