diff --git a/policycoreutils-rhat.patch b/policycoreutils-rhat.patch index e6898d8..06349fb 100644 --- a/policycoreutils-rhat.patch +++ b/policycoreutils-rhat.patch @@ -1,6 +1,6 @@ -diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/chcat.8 policycoreutils-1.29.8/scripts/chcat.8 +diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/chcat.8 policycoreutils-1.29.9/scripts/chcat.8 --- nsapolicycoreutils/scripts/chcat.8 2006-01-18 11:12:43.000000000 -0500 -+++ policycoreutils-1.29.8/scripts/chcat.8 2006-01-19 10:48:59.000000000 -0500 ++++ policycoreutils-1.29.9/scripts/chcat.8 2006-01-19 17:23:42.000000000 -0500 @@ -27,6 +27,11 @@ Change/Remove the security CATEGORY for each FILE/USER. .PP @@ -13,3 +13,57 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/chcat.8 policyco .TP \fB\-d\fR delete the category from each FILE/USER. +diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon policycoreutils-1.29.9/scripts/genhomedircon +--- nsapolicycoreutils/scripts/genhomedircon 2006-01-18 11:12:43.000000000 -0500 ++++ policycoreutils-1.29.9/scripts/genhomedircon 2006-01-19 17:23:54.000000000 -0500 +@@ -199,10 +199,11 @@ + sys.stderr.write("The user \"%s\" is not present in the passwd file, skipping...\n" % user) + return + prefs = {} ++ prefs["seuser"] = seuser + prefs["role"] = role + prefs["home"] = home +- udict[seuser] = prefs +- ++ udict[user] = prefs ++ + def getUsers(self): + udict = {} + if self.semanaged: +@@ -233,14 +234,14 @@ + + return udict + +- def getHomeDirContext(self, user, home, role): ++ def getHomeDirContext(self, user, seuser, home, role): + ret="\n\n#\n# Home Context for user %s\n#\n\n" % user + fd=open(self.getHomeDirTemplate(), 'r') + for i in fd.read().split('\n'): + if i.startswith("HOME_DIR") == 1: + i=i.replace("HOME_DIR", home) + i=i.replace("ROLE", role) +- i=i.replace("system_u", user) ++ i=i.replace("system_u", seuser) + ret = ret+i+"\n" + fd.close() + return ret +@@ -265,8 +266,8 @@ + ret="" + # Fill in HOME and ROLE for users that are defined + for u in users.keys(): +- ret += self.getHomeDirContext (u, users[u]["home"], users[u]["role"]) +- ret += self.getUserContext (u, u, users[u]["role"]) ++ ret += self.getHomeDirContext (u, users[u]["seuser"], users[u]["home"], users[u]["role"]) ++ ret += self.getUserContext (u, users[u]["seuser"], users[u]["role"]) + return ret+"\n" + + def checkExists(self, home): +@@ -309,7 +310,7 @@ + def genoutput(self): + ret= self.heading() + for h in self.getHomeDirs(): +- ret += self.getHomeDirContext ("user_u" , h+'/[^/]*', "user") ++ ret += self.getHomeDirContext ("user_u", "user_u" , h+'/[^/]*', "user") + ret += self.getHomeRootContext(h) + ret += self.getUserContext(".*", "user_u", "user") + "\n" + ret += self.genHomeDirContext() diff --git a/policycoreutils.spec b/policycoreutils.spec index 87aa1cc..6c3a10e 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -4,7 +4,7 @@ Summary: SELinux policy core utilities. Name: policycoreutils Version: 1.29.9 -Release: 1 +Release: 2 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 +* Thu Jan 19 2006 Dan Walsh 1.29.9-2 +- Fix genhomedircon to work on MLS policy + * Thu Jan 19 2006 Dan Walsh 1.29.9-1 - Update to match NSA * Merged chcat, semanage, and setsebool patches from Dan Walsh.