From 3767b9266f46789c9cc4b3b758aa0cafcdb5fc77 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 10 Jan 2006 19:13:15 +0000 Subject: [PATCH] * Tue Jan 10 2006 Dan Walsh 1.29.5-3 - Fixes for mls policy --- policycoreutils-rhat.patch | 34 +++++++++++++++------------------- policycoreutils.spec | 5 ++++- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/policycoreutils-rhat.patch b/policycoreutils-rhat.patch index 10c9884..83dd5ab 100644 --- a/policycoreutils-rhat.patch +++ b/policycoreutils-rhat.patch @@ -1,6 +1,6 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon policycoreutils-1.29.5/scripts/genhomedircon --- nsapolicycoreutils/scripts/genhomedircon 2006-01-05 10:35:49.000000000 -0500 -+++ policycoreutils-1.29.5/scripts/genhomedircon 2006-01-10 12:11:48.000000000 -0500 ++++ policycoreutils-1.29.5/scripts/genhomedircon 2006-01-10 14:10:21.000000000 -0500 @@ -144,7 +144,7 @@ for i in fd.read().split('\n'): if i.find("HOME_ROOT") == 0: @@ -10,24 +10,20 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon po fd.close() if ret=="": errorExit("No Home Root Context Found") -@@ -240,7 +240,7 @@ - i=i.replace("HOME_DIR", home) - i=i.replace("ROLE", role) - i=i.replace("system_u", user) -- ret = ret+i+"\n" -+ ret += i+"\n" - fd.close() - return ret - -@@ -252,7 +252,7 @@ - i=i.replace("USER", user) - i=i.replace("ROLE", role) - i=i.replace("system_u", sel_user) -- ret=ret+i+"\n" -+ ret = i+"\n" - fd.close() - return ret - +@@ -162,9 +162,10 @@ + for idx in range(self.usize): + user = semanage_user_by_idx(self.ulist, idx) + if semanage_user_get_name(user) == name: +- #role=semanage_user_get_defrole(user) +- #return role +- return "user_r" ++ if name == "staff_u" or name == "root" and self.type != "targeted": ++ return "staff_r" ++ else: ++ return "user_r" + return name + def getOldRole(self, role): + rc=findval(self.selinuxdir+self.type+"/users/system.users", 'grep "^user %s"' % role, "=") diff --exclude-from=exclude -N -u -r nsapolicycoreutils/semanage/Makefile policycoreutils-1.29.5/semanage/Makefile --- nsapolicycoreutils/semanage/Makefile 2005-11-29 10:55:01.000000000 -0500 +++ policycoreutils-1.29.5/semanage/Makefile 2006-01-06 14:34:47.000000000 -0500 diff --git a/policycoreutils.spec b/policycoreutils.spec index 53fa658..25211d0 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -4,7 +4,7 @@ Summary: SELinux policy core utilities. Name: policycoreutils Version: 1.29.5 -Release: 2 +Release: 3 License: GPL Group: System Environment/Base Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz @@ -97,6 +97,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_libdir}/python2.4/site-packages/seobject.py* %changelog +* Tue Jan 10 2006 Dan Walsh 1.29.5-3 +- Fixes for mls policy + * Tue Jan 10 2006 Dan Walsh 1.29.5-2 - Update semanage and split out seobject - Fix labeleing of home_root