diff options
author | Alexey Yurchenko <ayurchen@gmail.com> | 2015-06-06 01:08:41 +0300 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-09-09 17:02:26 -0400 |
commit | d78110e7fae1588afcb6bc5ea08be0d84ee18857 (patch) | |
tree | 470b8791eddc944fd2408de44ccf80546452fba1 /scripts/wsrep_sst_xtrabackup.sh | |
parent | 4f4f3a5e328524bf1b467a1885b0a21a4e995d9b (diff) | |
download | mariadb-git-d78110e7fae1588afcb6bc5ea08be0d84ee18857.tar.gz |
Refs codership/mysql-wsrep#141: this commit
1. Passes wsrep_sst_auth_value to SST scripts via WSREP_SST_OPT_AUTH envronmental variable, so it never appears on the command line
2. In mysqldump and xtrabackup* SST scripts which rely on MySQL authentication, instead of passing password on the command line, SST script sets MYSQL_PWD environment variable, so that password also never appears on the mysqldump/innobackupex command line.
Diffstat (limited to 'scripts/wsrep_sst_xtrabackup.sh')
-rw-r--r-- | scripts/wsrep_sst_xtrabackup.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/wsrep_sst_xtrabackup.sh b/scripts/wsrep_sst_xtrabackup.sh index 044f9995580..9c264586149 100644 --- a/scripts/wsrep_sst_xtrabackup.sh +++ b/scripts/wsrep_sst_xtrabackup.sh @@ -61,7 +61,6 @@ pcmd="pv $pvopts" declare -a RC INNOBACKUPEX_BIN=innobackupex -readonly AUTH=(${WSREP_SST_OPT_AUTH//:/ }) DATA="${WSREP_SST_OPT_DATA}" INFO_FILE="xtrabackup_galera_info" IST_FILE="xtrabackup_ist" @@ -435,13 +434,14 @@ then then TMPDIR="${TMPDIR:-/tmp}" - if [ "${AUTH[0]}" != "(null)" ]; then - INNOEXTRA+=" --user=${AUTH[0]}" - fi + if [ "$WSREP_SST_OPT_USER" != "(null)" ]; then + INNOEXTRA+=" --user=$WSREP_SST_OPT_USER" + fi - if [ ${#AUTH[*]} -eq 2 ]; then - INNOEXTRA+=" --password=${AUTH[1]}" - elif [ "${AUTH[0]}" != "(null)" ]; then + if [ -n "$WSREP_SST_OPT_PSWD" ]; then +# INNOEXTRA+=" --password=$WSREP_SST_OPT_PSWD" + export MYSQL_PWD="$WSREP_SST_OPT_PSWD" + else # Empty password, used for testing, debugging etc. INNOEXTRA+=" --password=" fi |