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