e3c68b
From c147bbec10fc72b85301ab6a7580f15713b8a974 Mon Sep 17 00:00:00 2001
e3c68b
From: Ambarish <asoman@redhat.com>
e3c68b
Date: Tue, 12 Sep 2017 18:34:29 +0530
e3c68b
Subject: [PATCH 072/124] ganesha-ha: don't set SELinux booleans if SELinux is
e3c68b
 disabled
e3c68b
e3c68b
semanage commands inside ganesha-ha.sh script will fail if selinux is
e3c68b
Disabled. This patch introduces a check if selinux is enabled or not,
e3c68b
and subsequently run semange commands only on selinux enabled systems.
e3c68b
e3c68b
Label: DOWNSTREAM ONLY
e3c68b
e3c68b
Change-Id: Ibee61cbb1d51a73e6c326b49bac5c7ce06feb310
e3c68b
Signed-off-by: Ambarish <asoman@redhat.com>
e3c68b
Reviewed-on: https://review.gluster.org/18264
e3c68b
Reviewed-by: Niels de Vos <ndevos@redhat.com>
e3c68b
Smoke: Gluster Build System <jenkins@build.gluster.org>
e3c68b
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
e3c68b
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
e3c68b
Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
e3c68b
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
e3c68b
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
e3c68b
Reviewed-on: https://code.engineering.redhat.com/gerrit/167157
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 | 9 ++++++---
e3c68b
 1 file changed, 6 insertions(+), 3 deletions(-)
e3c68b
e3c68b
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
e3c68b
index f4400af..e1d3ea0 100644
e3c68b
--- a/extras/ganesha/scripts/ganesha-ha.sh
e3c68b
+++ b/extras/ganesha/scripts/ganesha-ha.sh
e3c68b
@@ -985,7 +985,9 @@ main()
e3c68b
         exit 0
e3c68b
     fi
e3c68b
 
e3c68b
-    semanage boolean -m gluster_use_execmem --on
e3c68b
+    if (selinuxenabled) ;then
e3c68b
+     semanage boolean -m gluster_use_execmem --on
e3c68b
+    fi
e3c68b
 
e3c68b
     HA_CONFDIR=${1%/}; shift
e3c68b
     local ha_conf=${HA_CONFDIR}/ganesha-ha.conf
e3c68b
@@ -1133,8 +1135,9 @@ $HA_CONFDIR/ganesha-ha.conf
e3c68b
 
e3c68b
     esac
e3c68b
 
e3c68b
-    semanage boolean -m gluster_use_execmem --off
e3c68b
-
e3c68b
+    if (selinuxenabled) ;then
e3c68b
+     semanage boolean -m gluster_use_execmem --off
e3c68b
+    fi
e3c68b
 }
e3c68b
 
e3c68b
 main $*
e3c68b
-- 
e3c68b
1.8.3.1
e3c68b