Blame SOURCES/bz1547142-galera-fix-temp-logfile-rights.patch

07f095
From 2754db9d03995e944a53e364f304bc7b0b24d75d Mon Sep 17 00:00:00 2001
07f095
From: Damien Ciabrini <dciabrin@redhat.com>
07f095
Date: Thu, 2 Mar 2017 18:41:50 +0100
07f095
Subject: [PATCH] galera: fix permission of temporary log file for mariadb
07f095
 10.1.21+
07f095
07f095
Since MariaDB/server@8fcdd6b0ecbb966f4479856efe93a963a7a422f7,
07f095
mysqld_safe relies on a helper subprocess to write into log files.
07f095
This new logging mechanism expects log file to be writable by the
07f095
user configured to run mysqld.
07f095
07f095
Fix the generation of temporary log file accordingly.
07f095
---
07f095
 heartbeat/galera | 1 +
07f095
 1 file changed, 1 insertion(+)
07f095
07f095
diff --git a/heartbeat/galera b/heartbeat/galera
07f095
index 0cab9a464..decbaa257 100755
07f095
--- a/heartbeat/galera
07f095
+++ b/heartbeat/galera
07f095
@@ -520,6 +520,7 @@ detect_last_commit()
07f095
     last_commit="$(cat ${OCF_RESKEY_datadir}/grastate.dat | sed -n 's/^seqno.\s*\(.*\)\s*$/\1/p')"
07f095
     if [ -z "$last_commit" ] || [ "$last_commit" = "-1" ]; then
07f095
         local tmp=$(mktemp)
07f095
+        chown $OCF_RESKEY_user:$OCF_RESKEY_group $tmp
07f095
 
07f095
         # if we pass here because grastate.dat doesn't exist,
07f095
         # try not to bootstrap from this node if possible