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

fabiand at redhat.com fabiand at redhat.com
Mon Aug 17 12:55:16 UTC 2015


Fabian Deutsch 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#c17
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
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/24/44924/1

diff --git a/src/ovirt/node/utils/security.py b/src/ovirt/node/utils/security.py
index 14e0836..f4390b0 100644
--- a/src/ovirt/node/utils/security.py
+++ b/src/ovirt/node/utils/security.py
@@ -103,7 +103,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/44924
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If18a1b17507e194d3fee5973d421ef6e0b67e0b8
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at redhat.com>



More information about the node-patches mailing list