From 0bfa56ba197b7a804c9d4f1de1028b82fc10927e Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 9 Nov 2005 22:43:40 +0000 Subject: [PATCH] * Wed Nov 9 2005 Dan Walsh 1.27.26-4 - Fix genhomedircon to use seusers file, temporary fix until swigified semanage --- policycoreutils-rhat.patch | 15 +++++++++++++-- policycoreutils.spec | 6 ++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/policycoreutils-rhat.patch b/policycoreutils-rhat.patch index 41dbeb3..9124850 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.27.26/scripts/genhomedircon --- nsapolicycoreutils/scripts/genhomedircon 2005-09-12 16:33:30.000000000 -0400 -+++ policycoreutils-1.27.26/scripts/genhomedircon 2005-11-09 16:08:15.000000000 -0500 ++++ policycoreutils-1.27.26/scripts/genhomedircon 2005-11-09 17:42:11.000000000 -0500 @@ -15,30 +15,16 @@ # The file CONTEXTDIR/files/homedir_template exists. This file is used to # set up the home directory context for each real user. @@ -267,7 +267,18 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon po return udict def getHomeDirContext(self, user, home, role): -@@ -478,10 +298,6 @@ +@@ -362,9 +182,8 @@ + return ret + rc[1] + "\n" + + def getUserContext(self, user, sel_user, role): +- ret="\n\n#\n# Other Context for user %s\n#\n\n" % user + rc=commands.getstatusoutput("grep 'USER' %s | sed -e 's/USER/%s/' -e 's/ROLE/%s/' -e 's/system_u/%s/'" % (self.getHomeDirTemplate(), user, role, sel_user)) +- return ret + rc[1] + "\n" ++ return rc[1] + "\n" + + def genHomeDirContext(self): + users = self.getUsers() +@@ -478,10 +297,6 @@ if type==None: type=getSELinuxType(directory) diff --git a/policycoreutils.spec b/policycoreutils.spec index 38f10ea..cd87ca4 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -3,10 +3,11 @@ Summary: SELinux policy core utilities. Name: policycoreutils Version: 1.27.26 -Release: 3 +Release: 4 License: GPL Group: System Environment/Base Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz +Patch: policycoreutils-rhat.patch BuildRequires: pam-devel libsepol-devel >= %{libsepolver} libsemanage-devel >= %{libsemanagever} @@ -33,6 +34,7 @@ context. %prep %setup -q +%patch -p1 -b .rhat %build make LIBDIR="%{_libdir}" CFLAGS="%{optflags}" all @@ -86,7 +88,7 @@ rm -rf ${RPM_BUILD_ROOT} %config(noreplace) %{_sysconfdir}/sestatus.conf %changelog -* Wed Nov 9 2005 Dan Walsh 1.27.26-3 +* Wed Nov 9 2005 Dan Walsh 1.27.26-4 - Fix genhomedircon to use seusers file, temporary fix until swigified semanage * Tue Nov 8 2005 Dan Walsh 1.27.26-1