From e62adc8eb187037e2e3b8de66fe24308c58f3724 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Mon, 23 Jun 2014 14:38:55 +0100 Subject: [mysql] make sure db credentials are not part of dump file name Since we pass --user and --password on the mysqldump command line we need to use suggest_filename to prevent those values appearing in report paths. Signed-off-by: Bryn M. Reeves --- sos/plugins/mysql.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sos/plugins/mysql.py b/sos/plugins/mysql.py index 02eb3b7a..8c1603ba 100644 --- a/sos/plugins/mysql.py +++ b/sos/plugins/mysql.py @@ -39,7 +39,8 @@ class Mysql(Plugin): dbuser = self.get_option("dbuser") dbpass = self.get_option("dbpass") opts = "--user=%s --password=%s --all-databases" % (dbuser, dbpass) - self.add_cmd_output("mysqldump %s" % opts) + name = "mysqldump_--all-databases" + self.add_cmd_output("mysqldump %s" % opts, suggest_filename=name) class RedHatMysql(Mysql, RedHatPlugin): -- cgit