From ca7a726862d97e2be592291c4280c12615fa928d Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 31 Jan 2006 00:21:56 +0000 Subject: [PATCH] *** empty log message *** --- .cvsignore | 1 + policycoreutils-rhat.patch | 47 ++++++++++++++++++++++++++++++++++---- policycoreutils.spec | 22 ++++++++++++------ sources | 2 +- 4 files changed, 60 insertions(+), 12 deletions(-) diff --git a/.cvsignore b/.cvsignore index 43aa5fb..c022483 100644 --- a/.cvsignore +++ b/.cvsignore @@ -86,3 +86,4 @@ policycoreutils-1.29.10.tgz policycoreutils-1.29.11.tgz policycoreutils-1.29.12.tgz policycoreutils-1.29.15.tgz +policycoreutils-1.29.17.tgz diff --git a/policycoreutils-rhat.patch b/policycoreutils-rhat.patch index f46bc3f..1f055f2 100644 --- a/policycoreutils-rhat.patch +++ b/policycoreutils-rhat.patch @@ -1,7 +1,25 @@ -diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon policycoreutils-1.29.11/scripts/genhomedircon ---- nsapolicycoreutils/scripts/genhomedircon 2006-01-20 10:37:37.000000000 -0500 -+++ policycoreutils-1.29.11/scripts/genhomedircon 2006-01-27 01:22:00.000000000 -0500 -@@ -87,6 +87,12 @@ +diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon policycoreutils-1.29.15/scripts/genhomedircon +--- nsapolicycoreutils/scripts/genhomedircon 2006-01-27 20:35:37.000000000 -0500 ++++ policycoreutils-1.29.15/scripts/genhomedircon 2006-01-30 11:49:16.000000000 -0500 +@@ -38,6 +38,17 @@ + except: + VALID_SHELLS = ['/bin/sh', '/bin/bash', '/bin/ash', '/bin/bsh', '/bin/ksh', '/usr/bin/ksh', '/usr/bin/pdksh', '/bin/tcsh', '/bin/csh', '/bin/zsh'] + ++def grep(file, var): ++ ret="" ++ fd=open(file, 'r') ++ ++ for i in fd.read().split('\n'): ++ if re.search(var, i, 0) != None: ++ ret=i ++ break ++ fd.close() ++ return ret ++ + def findval(file, var, delim=""): + val="" + try: +@@ -87,6 +98,12 @@ if ret == []: ret.append("/home") @@ -14,3 +32,24 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/genhomedircon po return ret def getSELinuxType(directory): +@@ -168,9 +185,9 @@ + return "user_r" + return name + def getOldRole(self, role): +- rc=findval(self.selinuxdir+self.type+"/users/system.users", 'grep "^user %s"' % role, "=") ++ rc=grep(self.selinuxdir+self.type+"/users/system.users", "^user %s" % role) + if rc == "": +- rc=findval(self.selinuxdir+self.type+"/users/local.users", 'grep "^user %s"' % role, "=") ++ rc=grep(self.selinuxdir+self.type+"/users/local.users", "^user %s" % role) + if rc != "": + user=rc.split() + role = user[3] +@@ -259,7 +276,7 @@ + return ret + + def genHomeDirContext(self): +- if self.semanaged and findval(self.getHomeDirTemplate(), "ROLE", "=") != "": ++ if self.semanaged and grep(self.getHomeDirTemplate(), "ROLE") != "": + warning("genhomedircon: Warning! No support yet for expanding ROLE macros in the %s file when using libsemanage." % self.getHomeDirTemplate()); + warning("genhomedircon: You must manually update file_contexts.homedirs for any non-user_r users (including root)."); + users = self.getUsers() diff --git a/policycoreutils.spec b/policycoreutils.spec index 9b1903f..ff3f3d3 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -1,14 +1,14 @@ -%define libsepolver 1.11.9-1 -%define libsemanagever 1.5.18-1 +%define libsepolver 1.11.10-1 +%define libsemanagever 1.5.19-1 %define libselinuxver 1.29.6-1 Summary: SELinux policy core utilities. Name: policycoreutils -Version: 1.29.15 +Version: 1.29.17 Release: 1 License: GPL Group: System Environment/Base Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz -Patch: policycoreutils-rhat.patch +#Patch: policycoreutils-rhat.patch BuildRequires: pam-devel libsepol-devel >= %{libsepolver} libsemanage-devel >= %{libsemanagever} libselinux-devel >= %{libselinuxver} PreReq: /bin/mount /bin/egrep /bin/awk /usr/bin/diff @@ -34,10 +34,10 @@ context. %prep %setup -q -%patch -p1 -b .rhat +#%patch -p1 -b .rhat %build -make LIBDIR="%{_libdir}" CFLAGS="%{optflags}" all +make LOG_AUDIT_PRIV=y LIBDIR="%{_libdir}" CFLAGS="%{optflags}" all %install rm -rf ${RPM_BUILD_ROOT} @@ -47,7 +47,7 @@ mkdir -p ${RPM_BUILD_ROOT}/sbin mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man1 mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8 mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/pam.d -make DESTDIR="${RPM_BUILD_ROOT}" LIBDIR="${RPM_BUILD_ROOT}%{_libdir}" install +make LOG_AUDIT_PRIV=y DESTDIR="${RPM_BUILD_ROOT}" LIBDIR="${RPM_BUILD_ROOT}%{_libdir}" install %find_lang %{name} @@ -97,6 +97,14 @@ rm -rf ${RPM_BUILD_ROOT} %{_libdir}/python2.4/site-packages/seobject.py* %changelog + +* Mon Jan 30 2006 Dan Walsh 1.29.17-1 +- Update from upstream + * Merged genhomedircon fix from Dan Walsh. + * Merged seusers.system patch from Ivan Gyurdiev. + * Merged improve port/fcontext API patch from Ivan Gyurdiev. + * Merged genhomedircon patch from Dan Walsh. + * Fri Jan 27 2006 Dan Walsh 1.29.15-1 - Update from upstream * Merged newrole audit patch from Steve Grubb. diff --git a/sources b/sources index 4e4041a..a9109ec 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4630f6f9b6ce13585a58e6d1dc10fff7 policycoreutils-1.29.15.tgz +a89902ab7e9d4feadc48f06c5fb9be30 policycoreutils-1.29.17.tgz