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