[node-patches] Change in ovirt-node[ovirt-3.5]: security: Encode filename before restoring it's label

dougsland at redhat.com dougsland at redhat.com
Mon Aug 17 14:50:54 UTC 2015


Douglas Schilling Landgraf has uploaded a new change for review.

Change subject: security: Encode filename before restoring it's label
......................................................................

security: Encode filename before restoring it's label

selinux.restorecon() is very picky.

Change-Id: If18a1b17507e194d3fee5973d421ef6e0b67e0b8
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1252268
Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
---
M src/ovirt/node/utils/security.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/41/44941/1

diff --git a/src/ovirt/node/utils/security.py b/src/ovirt/node/utils/security.py
index 007cabc..1556433 100644
--- a/src/ovirt/node/utils/security.py
+++ b/src/ovirt/node/utils/security.py
@@ -102,7 +102,7 @@
 class Selinux(base.Base):
     def restorecon(self, abspath):
         try:
-            selinux.restorecon(abspath)
+            selinux.restorecon(abspath.encode("utf-8"))
         except OSError:
             self._logger.warning('No default label: "%s"', abspath)
 


-- 
To view, visit https://gerrit.ovirt.org/44941
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If18a1b17507e194d3fee5973d421ef6e0b67e0b8
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Douglas Schilling Landgraf <dougsland at redhat.com>



More information about the node-patches mailing list