Change in vdsm[ovirt-3.1]: setup: configure selinux for sanlock on nfs
fsimonce at redhat.com
fsimonce at redhat.com
Wed Oct 24 03:28:48 UTC 2012
Hello Douglas Schilling Landgraf, Ayal Baron,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/8755
to review the following change.
Change subject: setup: configure selinux for sanlock on nfs
......................................................................
setup: configure selinux for sanlock on nfs
Signed-off-by: Federico Simoncelli <fsimonce at redhat.com>
Change-Id: Id9005d23d009c65770b7836feb81ab97206e9a8a
Reviewed-on: http://gerrit.ovirt.org/8255
Reviewed-by: Douglas Schilling Landgraf <dougsland at redhat.com>
Reviewed-by: Ayal Baron <abaron at redhat.com>
---
M vdsm.spec.in
1 file changed, 7 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/55/8755/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 6be7da4..5f5f989 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -380,17 +380,21 @@
# The next lines will collect the default selinux behaviour for the booleans
virtNFS=$(/usr/sbin/semanage boolean -l | /bin/grep virt_use_nfs | cut -d ',' -f 2)
virtSANLOCK=$(/usr/sbin/semanage boolean -l | /bin/grep virt_use_sanlock | cut -d ',' -f 2)
+snlkNFS=$(/usr/sbin/semanage boolean -l | /bin/grep sanlock_use_nfs | cut -d ',' -f 2)
-if [[ "${virtNFS}" == *off* || "${virtSANLOCK}" == *off* ]]; then
+if [[ "${virtNFS}" == *off* || "${virtSANLOCK}" == *off* || \
+ "${snlkNFS}" == *off* ]]; then
/usr/sbin/semanage boolean -m -S targeted -F /dev/stdin << _EOF
virt_use_nfs=1
virt_use_sanlock=1
+sanlock_use_nfs=1
_EOF
fi
if /usr/sbin/selinuxenabled; then
/usr/sbin/setsebool virt_use_nfs on
/usr/sbin/setsebool virt_use_sanlock on
+ /usr/sbin/setsebool sanlock_use_nfs on
fi
%post
@@ -434,11 +438,13 @@
/usr/sbin/semanage boolean -m -S targeted -F /dev/stdin << _EOF
virt_use_nfs=0
virt_use_sanlock=0
+sanlock_use_nfs=0
_EOF
if /usr/sbin/selinuxenabled; then
/usr/sbin/setsebool virt_use_nfs off
/usr/sbin/setsebool virt_use_sanlock off
+ /usr/sbin/setsebool sanlock_use_nfs off
fi
/usr/sbin/saslpasswd2 -p -a libvirt -d vdsm at rhevh
--
To view, visit http://gerrit.ovirt.org/8755
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id9005d23d009c65770b7836feb81ab97206e9a8a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.1
Gerrit-Owner: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
More information about the vdsm-patches
mailing list