From 7500758a95bc1e0eee76a8d229460b201462c3f6 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Fri, 11 Feb 2005 05:56:10 +0000 Subject: [PATCH] * Thu Feb 10 2005 Dan Walsh 1.21.15-5 - Trap failure on write - Rewrite genhomedircon to generate file_context.homedirs - several passes --- policycoreutils-rhat.patch | 6 +++--- policycoreutils.spec | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/policycoreutils-rhat.patch b/policycoreutils-rhat.patch index 6129b01..fe0ec37 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.21.15/scripts/genhomedircon --- nsapolicycoreutils/scripts/genhomedircon 2005-01-28 11:16:36.000000000 -0500 -+++ policycoreutils-1.21.15/scripts/genhomedircon 2005-02-10 20:10:15.000000000 -0500 ++++ policycoreutils-1.21.15/scripts/genhomedircon 2005-02-11 00:54:56.000000000 -0500 @@ -13,38 +13,109 @@ # # ASSUMPTIONS: @@ -200,7 +200,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon po + def getHomeDirContext(self, user, home, role): + ret="\n\n#\n# Context for user %s\n#\n\n" % user + rc=commands.getstatusoutput("grep -e '^HOME_DIR' %s | sed -e 's|HOME_DIR|%s|' -e 's/ROLE/%s/' -e 's/system_u/%s/'" % (self.getHomeDirTemplate(), home, role, user)) -+ return ret + rc[1] ++ return ret + rc[1] + "\n" + + + def genHomeDirContext(self): @@ -235,7 +235,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon po + ret= self.heading() + ret += self.getHomeRootContext() + for h in self.getHomeDirs(): -+ ret += self.getHomeDirContext ("user_u" , h, "user") ++ ret += self.getHomeDirContext ("user_u" , h+'/[A-z0-9]*', "user") + ret += self.genHomeDirContext() + return ret + diff --git a/policycoreutils.spec b/policycoreutils.spec index 38100de..d180f05 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -2,7 +2,7 @@ Summary: SELinux policy core utilities. Name: policycoreutils Version: 1.21.15 -Release: 4 +Release: 5 License: GPL Group: System Environment/Base Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz @@ -81,9 +81,10 @@ rm -rf ${RPM_BUILD_ROOT} %config(noreplace) %{_sysconfdir}/sestatus.conf %changelog -* Thu Feb 10 2005 Dan Walsh 1.21.15-4 +* Thu Feb 10 2005 Dan Walsh 1.21.15-5 - Trap failure on write - Rewrite genhomedircon to generate file_context.homedirs +- several passes * Thu Feb 10 2005 Dan Walsh 1.21.15-1 - Update from NSA