Skip to contentSkip to conversation

policycoreutils (semanage)

PATCH Applied Joe Slater 2 participants 3 messages Mar 13, 2014 – Apr 3, 2014

lore
Share & tools
lore

Joe Slater

author
#0 lore raw

cover policycoreutils (semanage)

Fix a failure to modify records if we want to change the seuser for a login user. Just a log issue.

I incremented PR. I think we should either do that are get rid of it.

Joe Slater (1):
policycoreutils: semanage

 .../policycoreutils-semanage-edit-user.patch       |   21 ++++++++++++++++++++
 recipes-security/selinux/policycoreutils_2.2.5.bb  |    3 +-
 2 files changed, 23 insertions(+), 1 deletions(-)
 create mode 100644 recipes-security/selinux/policycoreutils/policycoreutils-semanage-edit-user.patch
Signature · 1 line
1.7.3.4
author
#1 lore raw

PATCH 1/1 policycoreutils: semanage

When modifying an selinux login record, seobject.py,
may try to log a value, self.sename, which has been preset to "None" and this will fail. So, we set it to something useful.

---
 .../policycoreutils-semanage-edit-user.patch       |   21 ++++++++++++++++++++
 recipes-security/selinux/policycoreutils_2.2.5.bb  |    3 +-
 2 files changed, 23 insertions(+), 1 deletions(-)
 create mode 100644 recipes-security/selinux/policycoreutils/policycoreutils-semanage-edit-user.patch
recipes-security/selinux/policycoreutils/policycoreutils-semanage-edit-user.patch new file +21 -0
new file mode 100644
index 0000000..f5aaa74
@@ -0,0 +1,21 @@
+policycoreutils: semanage
+
+When modifying selinux login records, self.sename might not be
+needed, but it IS passed to a log function, so it must be set
+to something or the log attempt will fail.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <[email protected]>
+
+
+--- a/semanage/seobject.py
++++ b/semanage/seobject.py
+@@ -576,6 +576,7 @@ class loginRecords(semanageRecords):
+ 
+ 		if sename != "":
+ 			semanage_seuser_set_sename(self.sh, u, sename)
++			self.sename = sename
+ 		else:
+ 			self.sename = self.oldsename
+ 			
recipes-security/selinux/policycoreutils_2.2.5.bb +2 -1
index d851f74..bd3a5dd 100644
@@ -1,4 +1,4 @@
-PR = "r0"
+PR = "r1"
 
 include selinux_20131030.inc
 include ${BPN}.inc
@@ -13,4 +13,5 @@ SRC_URI += "\
 	file://policycoreutils-fix-sepolicy-install-path.patch \
 	file://policycoreutils-make-O_CLOEXEC-optional.patch \
 	file://policycoreutils-loadpolicy-symlink.patch \
+	file://policycoreutils-semanage-edit-user.patch \
 	"
Signature · 1 line
1.7.3.4
#2 lore raw
In reply to Joe Slater

Merged, thanks.
-J.

Quoted 16 lines · [[yocto] [meta-selinux PATCH 0/1] policycoreutils (semanage)] On 14.03.13 (Thu…

Fix a failure to modify records if we want to change the seuser for a login user. Just a log issue.

I incremented PR. I think we should either do that are get rid of it.

Joe Slater (1):
policycoreutils: semanage

 .../policycoreutils-semanage-edit-user.patch       |   21 ++++++++++++++++++++
 recipes-security/selinux/policycoreutils_2.2.5.bb  |    3 +-
 2 files changed, 23 insertions(+), 1 deletions(-)
 create mode 100644 recipes-security/selinux/policycoreutils/policycoreutils-semanage-edit-user.patch
Signature · 1 line
1.7.3.4
Signature · 2 lines
-Joe MacDonald.
:wq