Commit graph

17 commits

Author SHA1 Message Date
Gabriel Filion
1522deafda mysql root password is leaked to the process list
Every time the root password reset is used we're leaking the password to
the process list. If we use the already present /root/.my.cnf for
credentials then it has the same effect for verification and we avoid
leaking the password.
2015-05-13 16:02:36 -04:00
Jerome Charaoui
a713d36aeb Merge branch 'master' of git://git.puppet.immerda.ch/module-mysql
Conflicts:
	files/scripts/optimize_tables.rb
	manifests/server/base.pp
2015-02-24 16:46:45 -05:00
mh
e1649647f3 fix issues for EL7 + simplify account security
* EL7 uses mariadb & systemd -> adjust setpasswd script to that
* move the security ensurance to the setpassword script, as it's
  easier to ensure that there
2015-01-24 18:05:08 +01:00
mh
fd71b9473f split on new line, which fixes an issue if no table is found 2015-01-12 23:29:41 +01:00
Gabriel Filion
0f817282af Merge branch 'mention_path' 2014-03-12 16:26:42 -04:00
Jerome Charaoui
8fbc1b33ee Fix command output capturing in optimize_tables.rb for Ruby 1.9 2014-03-11 17:57:03 -04:00
mh
cae3a3cbe8 fix #6638 - remove the unless check & improve script
To workaround a limitation of the exec provider within puppet, we
do the unless check no within the script itself and ensure that
we use the password there.

https://labs.riseup.net/code/issues/6638
2014-02-05 22:34:17 +01:00
mh
7bde4efe1e improve optimize script 2014-01-12 14:19:26 +01:00
mh
bad8721b44 also chown the data dir 2013-12-04 23:19:09 +01:00
Gabriel Filion
3c93ba2339 setmysqlpass: be more careful before plundering into action
Since this script is rooting the database, it'd be good to use a little
more precaution so that we don't let systems be in an inconsistent case
when crashing.

In cases where the PATH variable is not appropriately set (variable is
empty by default when script is invoked by puppet) the script shuts down
mysql and then is not able to call most commands.
2013-11-15 04:07:28 -05:00
Gabriel Filion
e894ddb718 Avoid root password leak to process list
The current procedure of setting the root MySQL password leaks the root
password by giving it to the setmysqlpass.sh script on the command line.
This means that during the couple of seconds that the script is
executing, the password is visible in the process list!

Since we're already writing the password in the /root/.my.cnf file, make
the setmysqlpass.sh script parse this file to retrieve the password
instead of receiving it from a command line argument.

Also, in some shells the 'echo' command might appear in the process
list. Use a heredoc notation to create the output without using a
command.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-12-18 12:50:17 +01:00
Micah Anderson
a3e7b031a3 Merge remote branch 'remotes/immerda/master'
Conflicts:
	manifests/server/base.pp
2010-09-22 13:12:51 -04:00
Micah Anderson
eaf52f77a3 increase timeout before killing to account for slower startup speed of larger databases 2010-09-22 12:55:10 -04:00
mh
828e93c72d as we are in ruby we need to double escape that 2010-04-04 12:27:12 +02:00
mh
d40e1130bc escape table and db names 2010-04-04 12:21:33 +02:00
mh
b296d7a710 improve optimize script to work as well on weird named tables 2010-04-02 17:52:44 +02:00
Jerome Charaoui
9ec0ef766c make backup and optimize cron jobs optional; introduce $mysql_backup_cron, $mysql_backup_dir and$mysql_optimize_cron; use a module_dir for scripts 2009-12-10 14:52:50 -05:00