From 6107292b7c01da883a5c8af5d0d2c90e186d4322 Mon Sep 17 00:00:00 2001
From: HideoYamauchi <renayama19661014@ybb.ne.jp>
Date: Thu, 8 Dec 2016 13:25:54 +0900
Subject: [PATCH] Low: mcp: Correction of the difference in access permission
setting.
---
configure.ac | 4 ++++
mcp/pacemaker.c | 12 ++++++++----
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index a7f9158..e51a15b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1113,6 +1113,10 @@ CRM_STATE_DIR=${localstatedir}/run/crm
AC_DEFINE_UNQUOTED(CRM_STATE_DIR,"$CRM_STATE_DIR", Where to keep state files and sockets)
AC_SUBST(CRM_STATE_DIR)
+CRM_PACEMAKER_DIR=${localstatedir}/lib/pacemaker
+AC_DEFINE_UNQUOTED(CRM_PACEMAKER_DIR,"$CRM_PACEMAKER_DIR", Location to store directory produced by Pacemaker daemons)
+AC_SUBST(CRM_PACEMAKER_DIR)
+
CRM_BLACKBOX_DIR=${localstatedir}/lib/pacemaker/blackbox
AC_DEFINE_UNQUOTED(CRM_BLACKBOX_DIR,"$CRM_BLACKBOX_DIR", Where to keep blackbox dumps)
AC_SUBST(CRM_BLACKBOX_DIR)
diff --git a/mcp/pacemaker.c b/mcp/pacemaker.c
index 292e28c..95c1370 100644
--- a/mcp/pacemaker.c
+++ b/mcp/pacemaker.c
@@ -1058,20 +1058,24 @@ main(int argc, char **argv)
mkdir(CRM_STATE_DIR, 0750);
mcp_chown(CRM_STATE_DIR, pcmk_uid, pcmk_gid);
+ /* Used to store core/blackbox/pengine/cib files in */
+ crm_build_path(CRM_PACEMAKER_DIR, 0750);
+ mcp_chown(CRM_PACEMAKER_DIR, pcmk_uid, pcmk_gid);
+
/* Used to store core files in */
- crm_build_path(CRM_CORE_DIR, 0775);
+ crm_build_path(CRM_CORE_DIR, 0750);
mcp_chown(CRM_CORE_DIR, pcmk_uid, pcmk_gid);
/* Used to store blackbox dumps in */
- crm_build_path(CRM_BLACKBOX_DIR, 0755);
+ crm_build_path(CRM_BLACKBOX_DIR, 0750);
mcp_chown(CRM_BLACKBOX_DIR, pcmk_uid, pcmk_gid);
/* Used to store policy engine inputs in */
- crm_build_path(PE_STATE_DIR, 0755);
+ crm_build_path(PE_STATE_DIR, 0750);
mcp_chown(PE_STATE_DIR, pcmk_uid, pcmk_gid);
/* Used to store the cluster configuration */
- crm_build_path(CRM_CONFIG_DIR, 0755);
+ crm_build_path(CRM_CONFIG_DIR, 0750);
mcp_chown(CRM_CONFIG_DIR, pcmk_uid, pcmk_gid);
/* Resource agent paths are constructed by the lrmd */
--
1.8.3.1