Merge lp:~akopytov/percona-xtrabackup/bug729843 into lp:percona-xtrabackup/1.6

Proposed by Alexey Kopytov
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 308
Proposed branch: lp:~akopytov/percona-xtrabackup/bug729843
Merge into: lp:percona-xtrabackup/1.6
Diff against target: 39 lines (+23/-1)
2 files modified
innobackupex (+2/-1)
test/t/bug729843.sh (+21/-0)
To merge this branch: bzr merge lp:~akopytov/percona-xtrabackup/bug729843
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Review via email: mp+83435@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote :
Revision history for this message
Stewart Smith (stewart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'innobackupex'
--- innobackupex 2011-10-21 17:06:33 +0000
+++ innobackupex 2011-11-25 19:00:29 +0000
@@ -990,7 +990,8 @@
990 my $options = get_mysql_options();990 my $options = get_mysql_options();
991 # run mysql as a child process with a pipe connection991 # run mysql as a child process with a pipe connection
992 $now = current_time();992 $now = current_time();
993 print STDERR "$now $prefix Starting mysql with options: $options\n";993 (my $prt_options = $options) =~ s/--password=[^ ]+ /--password=xxxxxxxx /g;
994 print STDERR "$now $prefix Starting mysql with options: $prt_options\n";
994 $mysql_pid = open(*MYSQL_WRITER, "| mysql $options >$mysql_stdout 2>$mysql_stderr ") or Die "Failed to spawn mysql child process: $!";995 $mysql_pid = open(*MYSQL_WRITER, "| mysql $options >$mysql_stdout 2>$mysql_stderr ") or Die "Failed to spawn mysql child process: $!";
995 MYSQL_WRITER->autoflush(1);996 MYSQL_WRITER->autoflush(1);
996 $now = current_time();997 $now = current_time();
997998
=== added file 'test/t/bug729843.sh'
--- test/t/bug729843.sh 1970-01-01 00:00:00 +0000
+++ test/t/bug729843.sh 2011-11-25 19:00:29 +0000
@@ -0,0 +1,21 @@
1########################################################################
2# Bug #729843: innobackupex logs plaintext password
3########################################################################
4
5. inc/common.sh
6
7init
8run_mysqld
9
10mkdir $topdir/backup
11logfile=$topdir/backup/innobackupex_log
12
13# Don't use run_cmd_* or innobackupex functions here to avoid logging
14# the full command line (including the password in plaintext)
15set +e
16$IB_BIN $IB_ARGS --password=secret $topdir/backup 2>&1 | tee $logfile
17set -e
18
19# Check that the password was not logged in plaintext
20run_cmd grep -- "--password=xxxxxxxx" $logfile
21run_cmd_expect_failure grep -- "--password=secret" $logfile

Subscribers

People subscribed via source and target branches