[yocto] [meta-selinux][PATCH 4/4] policycoreutils: fix TypeError for seobject.py
wenzong.fan at windriver.com
wenzong.fan at windriver.com
Wed Apr 23 00:42:07 PDT 2014
From: Wenzong Fan <wenzong.fan at windriver.com>
Fix python error about:
File "/usr/lib64/python2.7/site-packages/seobject.py", line 109, in log
message += " sename=" + sename
TypeError: cannot concatenate 'str' and 'NoneType' objects
Signed-off-by: Wenzong Fan <wenzong.fan at windriver.com>
---
...cycoreutils-fix-TypeError-for-seobject.py.patch | 32 ++++++++++++++++++++
recipes-security/selinux/policycoreutils_2.2.5.bb | 1 +
2 files changed, 33 insertions(+)
create mode 100644 recipes-security/selinux/policycoreutils/policycoreutils-fix-TypeError-for-seobject.py.patch
diff --git a/recipes-security/selinux/policycoreutils/policycoreutils-fix-TypeError-for-seobject.py.patch b/recipes-security/selinux/policycoreutils/policycoreutils-fix-TypeError-for-seobject.py.patch
new file mode 100644
index 0000000..dd6ca6d
--- /dev/null
+++ b/recipes-security/selinux/policycoreutils/policycoreutils-fix-TypeError-for-seobject.py.patch
@@ -0,0 +1,32 @@
+From a66c50c0e8cd3799fc2819835b872ab62419f684 Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan at windriver.com>
+Date: Tue, 1 Apr 2014 02:53:36 -0400
+Subject: [PATCH] policycoreutils: fix TypeError for seobject.py
+
+File "/usr/lib64/python2.7/site-packages/seobject.py", line 109, in log
+ message += " sename=" + sename
+TypeError: cannot concatenate 'str' and 'NoneType' objects
+
+Uptream-Status: pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan at windriver.com>
+---
+ semanage/seobject.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/semanage/seobject.py b/semanage/seobject.py
+index f8d2243..66653e6 100644
+--- a/semanage/seobject.py
++++ b/semanage/seobject.py
+@@ -105,7 +105,7 @@ except:
+
+ def log(self, msg, name = "", sename = "", serole = "", serange = "", oldsename = "", oldserole = "", oldserange = ""):
+ message = " %s name=%s" % (msg, name)
+- if sename != "":
++ if sename != "" and sename != None:
+ message += " sename=" + sename
+ if oldsename != "":
+ message += " oldsename=" + oldsename
+--
+1.7.9.5
+
diff --git a/recipes-security/selinux/policycoreutils_2.2.5.bb b/recipes-security/selinux/policycoreutils_2.2.5.bb
index 7c32064..560cee6 100644
--- a/recipes-security/selinux/policycoreutils_2.2.5.bb
+++ b/recipes-security/selinux/policycoreutils_2.2.5.bb
@@ -14,4 +14,5 @@ SRC_URI += "\
file://policycoreutils-loadpolicy-symlink.patch \
file://policycoreutils-semanage-edit-user.patch \
file://policycoreutils-process-ValueError-for-sepolicy-seobject.patch \
+ file://policycoreutils-fix-TypeError-for-seobject.py.patch \
"
--
1.7.9.5
More information about the yocto
mailing list