diff options
author | sachin <sachin.setiya@mariadb.com> | 2017-09-11 17:46:56 +0530 |
---|---|---|
committer | sachin <sachin.setiya@mariadb.com> | 2017-09-21 12:37:40 +0530 |
commit | bb7a70c9551c1756b1d1736ca4f6a0a965795873 (patch) | |
tree | 7432b24e6a2b2e6dc5b9c65158c349d15d54d1d4 /scripts/mysqld_safe.sh | |
parent | c9e111202efce8c61184d49062ec2e1d2d129a57 (diff) | |
download | mariadb-git-bb7a70c9551c1756b1d1736ca4f6a0a965795873.tar.gz |
MDEV-10767 /tmp/wsrep_recovery.${RANDOM} file created in unallowed SELinux context
Problem:- To create file in /tmp dir mysqld require permission initrc_tmp_t.
And mysqld does not have his permission.
Solution:- Instead of giving mysqld permission of initrc_tmp_t , we redirected
log to file in /tmp dir through shell. I also removed a earlier workarround
in mysqld_safe.sh , which create tmp log file in datadir.
Diffstat (limited to 'scripts/mysqld_safe.sh')
-rw-r--r-- | scripts/mysqld_safe.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index e5708b51be5..5564f92a27c 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -246,7 +246,7 @@ wsrep_recover_position() { local euid=$(id -u) local ret=0 - local wr_logfile=$(mktemp $DATADIR/wsrep_recovery.XXXXXX) + local wr_logfile=$(mktemp wsrep_recovery.XXXXXX) # safety checks if [ -z $wr_logfile ]; then @@ -264,11 +264,11 @@ wsrep_recover_position() { local wr_pidfile="$DATADIR/"`@HOSTNAME@`"-recover.pid" - local wr_options="--log_error='$wr_logfile' --pid-file='$wr_pidfile'" + local wr_options="--disable-log-error --pid-file='$wr_pidfile'" log_notice "WSREP: Running position recovery with $wr_options" - eval_log_error "$mysqld_cmd --wsrep_recover $wr_options" + eval_log_error "$mysqld_cmd --wsrep_recover $wr_options 2> $wr_logfile" local rp="$(grep 'WSREP: Recovered position:' $wr_logfile)" if [ -z "$rp" ]; then |