File tree Expand file tree Collapse file tree 5 files changed +14
-1
lines changed
Expand file tree Collapse file tree 5 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ All notable changes to this project will be documented in this file.
6060- Added robots.txt for roundcube webmail to prevent search bot crawling.
6161- Re-Enable force ssl function on let's encrypt certification renew.
6262- Added official postgresql repository to be up to date.
63+ - Hardening MySQL configuration, prevent local infile.
6364
6465## [ 1.0.6] - 2019-09-24 - Hotfix
6566### Bugfixes
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ lc-messages-dir=/usr/share/mysql
1717log_error =/var/log/mysql/error.log
1818
1919symbolic-links =0
20+ local-infile =0
2021
2122skip-external-locking
2223key_buffer_size = 256M
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ lc-messages-dir=/usr/share/mysql
1717log_error =/var/log/mysql/error.log
1818
1919symbolic-links =0
20+ local-infile =0
2021
2122skip-external-locking
2223key_buffer_size = 16M
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ lc-messages-dir=/usr/share/mysql
1717log_error =/var/log/mysql/error.log
1818
1919symbolic-links =0
20+ local-infile =0
2021
2122skip-external-locking
2223key_buffer_size = 16K
Original file line number Diff line number Diff line change @@ -140,4 +140,13 @@ if [ -e "/etc/postgresql" ]; then
140140 wget --quiet https://www.postgresql.org/media/keys/ACCC4CF8.asc -O /tmp/psql_signing.key
141141 APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/psql_signing.key > /dev/null 2>&1
142142 rm /tmp/psql_signing.key
143- fi
143+ fi
144+
145+ # Hardening MySQL configuration, prevent local infile.
146+ if [ -e " /etc/mysql/my.cnf" ]; then
147+ mysql_local_infile_check=$( grep local-infile /etc/mysql/my.cnf)
148+ if [ -z " $mysql_local_infile_check " ]; then
149+ echo " (*) Hardening MySQL configuration..."
150+ sed -i ' /symbolic-links\=0/a\local-infile=0' /etc/mysql/my.cnf
151+ fi
152+ fi
You can’t perform that action at this time.
0 commit comments