Change in vdsm[ovirt-3.5]: tool: bugfix function called as attribute.

mtayer at redhat.com mtayer at redhat.com
Tue Nov 11 15:43:34 UTC 2014


mooli tayer has uploaded a new change for review.

Change subject: tool: bugfix function called as attribute.
......................................................................

tool: bugfix function called as attribute.

to fix bug, introduced in commit 8f87f21, instead of using
selinux.is_selinux_enabled I suggest using the recently added
utils.get_selinux_enforce_mode().

In both cases the code means to check if selinux != disabled
(permissive | enforcing).

Change-Id: Id7c52e6f409b808c79653e40255cf62743b1fd0c
Signed-off-by: Mooli Tayer <mtayer at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/34487
Reviewed-by: Yaniv Bronhaim <ybronhei at redhat.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
(cherry picked from commit 975bcacbea064f8a54e3bea0af701176cc3da1b9)
---
M lib/vdsm/tool/configurators/configfile.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/49/35049/1

diff --git a/lib/vdsm/tool/configurators/configfile.py b/lib/vdsm/tool/configurators/configfile.py
index 62b99b1..bc4c467 100644
--- a/lib/vdsm/tool/configurators/configfile.py
+++ b/lib/vdsm/tool/configurators/configfile.py
@@ -187,7 +187,7 @@
                 if self._oldmod != os.stat(self._filename).st_mode:
                     os.chmod(self._filename, self._oldmod)
 
-                if selinux.is_selinux_enabled:
+                if utils.get_selinux_enforce_mode() > -1:
                     try:
                         selinux.restorecon(self._filename)
                     except OSError:


-- 
To view, visit http://gerrit.ovirt.org/35049
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id7c52e6f409b808c79653e40255cf62743b1fd0c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: mooli tayer <mtayer at redhat.com>


More information about the vdsm-patches mailing list