14f8ab
From 662c94f3b3173bf78465644e2e42e03efd9ea493 Mon Sep 17 00:00:00 2001
14f8ab
From: "Kaleb S. KEITHLEY" <kkeithle@redhat.com>
14f8ab
Date: Mon, 17 Jul 2017 11:07:40 -0400
14f8ab
Subject: [PATCH 071/124] common-ha: enable and disable selinux
14f8ab
 gluster_use_execmem
14f8ab
14f8ab
Starting in Fedora 26 and RHEL 7.4 there are new targeted policies in
14f8ab
selinux which include a tuneable to allow glusterd->ganesha-ha.sh->pcs
14f8ab
to access the pcs config, i.e. gluster-use-execmem.
14f8ab
14f8ab
Note. rpm doesn't have a way to distinguish between RHEL 7.3 or 7.4
14f8ab
or between 3.13.1-X and 3.13.1-Y so it can't be enabled for RHEL at
14f8ab
this time.
14f8ab
14f8ab
/usr/sbin/semanage is in policycoreutils-python in RHEL (versus
14f8ab
policycoreutils-python-utils in Fedora.)
14f8ab
14f8ab
Requires selinux-policy >= 3.13.1-160 in RHEL7. The corresponding
14f8ab
version in Fedora 26 seems to be selinux-policy-3.13.1-259 or so. (Maybe
14f8ab
earlier versions, but that's what was in F26 when I checked.)
14f8ab
14f8ab
Label: DOWNSTREAM ONLY
14f8ab
14f8ab
Change-Id: Ic474b3f7739ff5be1e99d94d00b55caae4ceb5a0
14f8ab
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
14f8ab
Reviewed-on: https://review.gluster.org/17806
14f8ab
Smoke: Gluster Build System <jenkins@build.gluster.org>
14f8ab
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
14f8ab
Reviewed-by: soumya k <skoduri@redhat.com>
14f8ab
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
14f8ab
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
14f8ab
Reviewed-on: https://code.engineering.redhat.com/gerrit/167156
14f8ab
Reviewed-by: Soumya Koduri <skoduri@redhat.com>
14f8ab
Tested-by: RHGS Build Bot <nigelb@redhat.com>
14f8ab
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
14f8ab
---
14f8ab
 extras/ganesha/scripts/ganesha-ha.sh | 6 ++++++
14f8ab
 1 file changed, 6 insertions(+)
14f8ab
14f8ab
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
14f8ab
index 537c965..f4400af 100644
14f8ab
--- a/extras/ganesha/scripts/ganesha-ha.sh
14f8ab
+++ b/extras/ganesha/scripts/ganesha-ha.sh
14f8ab
@@ -984,6 +984,9 @@ main()
14f8ab
         usage
14f8ab
         exit 0
14f8ab
     fi
14f8ab
+
14f8ab
+    semanage boolean -m gluster_use_execmem --on
14f8ab
+
14f8ab
     HA_CONFDIR=${1%/}; shift
14f8ab
     local ha_conf=${HA_CONFDIR}/ganesha-ha.conf
14f8ab
     local node=""
14f8ab
@@ -1129,6 +1132,9 @@ $HA_CONFDIR/ganesha-ha.conf
14f8ab
         ;;
14f8ab
 
14f8ab
     esac
14f8ab
+
14f8ab
+    semanage boolean -m gluster_use_execmem --off
14f8ab
+
14f8ab
 }
14f8ab
 
14f8ab
 main $*
14f8ab
-- 
14f8ab
1.8.3.1
14f8ab