From f8fdb548ab5c0848e5499a80b9c680124ab3e071 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 23 Jan 2008 19:44:15 +0000 Subject: [PATCH] * Wed Jan 23 2008 Dan Walsh 2.0.36-1 - Update to upstream * Merged update to chcat, fixfiles, and semanage scripts from Dan Walsh. --- .cvsignore | 1 + policycoreutils-rhat.patch | 137 +++---------------------------------- policycoreutils.spec | 8 ++- sources | 2 +- 4 files changed, 19 insertions(+), 129 deletions(-) diff --git a/.cvsignore b/.cvsignore index 3186d9a..e180741 100644 --- a/.cvsignore +++ b/.cvsignore @@ -167,3 +167,4 @@ policycoreutils-2.0.32.tgz policycoreutils-2.0.33.tgz policycoreutils-2.0.34.tgz policycoreutils-2.0.35.tgz +policycoreutils-2.0.36.tgz diff --git a/policycoreutils-rhat.patch b/policycoreutils-rhat.patch index 5d88550..c1b717d 100644 --- a/policycoreutils-rhat.patch +++ b/policycoreutils-rhat.patch @@ -172,21 +172,6 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.10 --exclude=gui --exclude=po .B "\-v" | "\-\-verbose" Turn on verbose output -diff --exclude-from=exclude --exclude=sepolgen-1.0.10 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/audit2allow/sepolgen-ifgen policycoreutils-2.0.35/audit2allow/sepolgen-ifgen ---- nsapolicycoreutils/audit2allow/sepolgen-ifgen 2007-07-16 14:20:41.000000000 -0400 -+++ policycoreutils-2.0.35/audit2allow/sepolgen-ifgen 2008-01-11 11:17:46.000000000 -0500 -@@ -80,7 +80,10 @@ - if_set.to_file(f) - f.close() - -- return 0 -+ if refparser.success: -+ return 0 -+ else: -+ return 1 - - if __name__ == "__main__": - sys.exit(main()) diff --exclude-from=exclude --exclude=sepolgen-1.0.10 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/audit2why/audit2why policycoreutils-2.0.35/audit2why/audit2why --- nsapolicycoreutils/audit2why/audit2why 1969-12-31 19:00:00.000000000 -0500 +++ policycoreutils-2.0.35/audit2why/audit2why 2008-01-11 11:26:34.000000000 -0500 @@ -671,22 +656,8 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.10 --exclude=gui --exclude=po } free(scontext); close(fd); -diff --exclude-from=exclude --exclude=sepolgen-1.0.10 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/chcat policycoreutils-2.0.35/scripts/chcat ---- nsapolicycoreutils/scripts/chcat 2007-08-23 16:52:26.000000000 -0400 -+++ policycoreutils-2.0.35/scripts/chcat 2008-01-11 11:17:46.000000000 -0500 -@@ -25,10 +25,6 @@ - import commands, sys, os, pwd, string, getopt, selinux - import seobject - import gettext --import codecs --import locale --sys.stderr = codecs.getwriter(locale.getpreferredencoding())(sys.__stderr__, 'replace') --sys.stdout = codecs.getwriter(locale.getpreferredencoding())(sys.__stdout__, 'replace') - - try: - gettext.install('policycoreutils') diff --exclude-from=exclude --exclude=sepolgen-1.0.10 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/fixfiles policycoreutils-2.0.35/scripts/fixfiles ---- nsapolicycoreutils/scripts/fixfiles 2007-12-10 21:42:28.000000000 -0500 +--- nsapolicycoreutils/scripts/fixfiles 2008-01-23 14:36:28.000000000 -0500 +++ policycoreutils-2.0.35/scripts/fixfiles 2008-01-23 13:32:53.000000000 -0500 @@ -36,8 +36,8 @@ LOGGER=/usr/sbin/logger @@ -715,107 +686,21 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.10 --exclude=gui --exclude=po rm -f ${TEMPFILE} ${PREFCTEMPFILE} fi } -@@ -126,17 +126,15 @@ - done - exit $? - fi --if [ ! -z "$DIRS" ]; then -+if [ ! -z "$FILEPATH" ]; then +@@ -129,8 +129,8 @@ + if [ ! -z "$FILEPATH" ]; then if [ -x /usr/bin/find ]; then -- for d in ${DIRS} ; do find $d \ + /usr/bin/find "$FILEPATH" \ - ! \( -fstype ext2 -o -fstype ext3 -o -fstype jfs -o -fstype xfs \) -prune -o -print | \ - ${RESTORECON} ${OUTFILES} ${FORCEFLAG} $* -f - 2>&1 >> $LOGFILE -- done -+ /usr/bin/find "$FILEPATH" \ + ! \( -fstype ext2 -o -fstype ext3 -o -fstype ext4 -o -fstype ext4dev -o -fstype gfs2 -o -fstype jfs -o -fstype xfs \) -prune -o -print0 | \ + ${RESTORECON} ${OUTFILES} ${FORCEFLAG} $* -0 -f - 2>&1 >> $LOGFILE else -- ${RESTORECON} ${OUTFILES} ${FORCEFLAG} -R $* $DIRS 2>&1 >> $LOGFILE -+ ${RESTORECON} ${OUTFILES} ${FORCEFLAG} -R $* $FILEPATH 2>&1 >> $LOGFILE + ${RESTORECON} ${OUTFILES} ${FORCEFLAG} -R $* $FILEPATH 2>&1 >> $LOGFILE fi -- -- exit $? -+ return - fi - LogReadOnly - ${SETFILES} -q ${OUTFILES} ${SYSLOGFLAG} ${FORCEFLAG} $* ${FC} ${FILESYSTEMSRW} 2>&1 >> $LOGFILE -@@ -173,6 +171,20 @@ - fi - } - -+process() { -+# -+# Make sure they specified one of the three valid commands -+# -+case "$1" in -+ restore) restore -p ;; -+ check) restore -n -v;; -+ verify) restore -n -o -;; -+ relabel) relabel;; -+ *) -+ usage -+ exit 1 -+esac -+} - usage() { - echo $"Usage: $0 [-l logfile ] [-o outputfile ] { check | restore|[-F] relabel } [[dir] ... ] " - echo or -@@ -229,22 +241,19 @@ - - shift 1 - if [ ! -z "$RPMFILES" ]; then -+ process $command - if [ $# -gt 0 ]; then - usage - fi - else -- DIRS=$* -+ if [ -z "$1" ]; then -+ process $command -+ else -+ while [ -n "$1" ]; do -+ FILEPATH=$1 -+ process $command -+ shift -+ done -+ fi - fi -- --# --# Make sure they specified one of the three valid commands --# --case "$command" in -- restore) restore -p ;; -- check) restore -n -v ;; -- verify) restore -n -o -;; -- relabel) relabel;; -- *) -- usage -- exit 1 --esac -+exit $? diff --exclude-from=exclude --exclude=sepolgen-1.0.10 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/semanage policycoreutils-2.0.35/semanage/semanage ---- nsapolicycoreutils/semanage/semanage 2007-10-05 13:09:53.000000000 -0400 +--- nsapolicycoreutils/semanage/semanage 2008-01-23 14:36:28.000000000 -0500 +++ policycoreutils-2.0.35/semanage/semanage 2008-01-11 11:17:46.000000000 -0500 -@@ -1,5 +1,5 @@ - #! /usr/bin/python -E --# Copyright (C) 2005 Red Hat -+# Copyright (C) 2005, 2006, 2007 Red Hat - # see file 'COPYING' for use and warranty information - # - # semanage is a tool for managing SELinux configuration files -@@ -28,10 +28,6 @@ - import gettext - gettext.bindtextdomain(PROGNAME, "/usr/share/locale") - gettext.textdomain(PROGNAME) --import codecs --import locale --sys.stderr = codecs.getwriter(locale.getpreferredencoding())(sys.__stderr__, 'replace') --sys.stdout = codecs.getwriter(locale.getpreferredencoding())(sys.__stdout__, 'replace') - - try: - gettext.install(PROGNAME, -@@ -115,7 +111,7 @@ +@@ -111,7 +111,7 @@ valid_option["translation"] = [] valid_option["translation"] += valid_everyone + [ '-T', '--trans' ] valid_option["boolean"] = [] @@ -824,7 +709,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.10 --exclude=gui --exclude=po return valid_option # -@@ -135,7 +131,7 @@ +@@ -131,7 +131,7 @@ seuser = "" prefix = "" heading=1 @@ -833,7 +718,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.10 --exclude=gui --exclude=po add = 0 modify = 0 delete = 0 -@@ -154,7 +150,7 @@ +@@ -150,7 +150,7 @@ args = sys.argv[2:] gopts, cmds = getopt.getopt(args, @@ -842,7 +727,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.10 --exclude=gui --exclude=po ['add', 'delete', 'deleteall', -@@ -164,6 +160,8 @@ +@@ -160,6 +160,8 @@ 'modify', 'noheading', 'localist', @@ -851,7 +736,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.10 --exclude=gui --exclude=po 'proto=', 'seuser=', 'store=', -@@ -242,6 +240,11 @@ +@@ -238,6 +240,11 @@ if o == "-T" or o == "--trans": setrans = a diff --git a/policycoreutils.spec b/policycoreutils.spec index 99d9fb9..80ac9e2 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -5,8 +5,8 @@ %define sepolgenver 1.0.10 Summary: SELinux policy core utilities Name: policycoreutils -Version: 2.0.35 -Release: 5%{?dist} +Version: 2.0.36 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Base Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz @@ -193,6 +193,10 @@ if [ "$1" -ge "1" ]; then fi %changelog +* Wed Jan 23 2008 Dan Walsh 2.0.36-1 +- Update to upstream + * Merged update to chcat, fixfiles, and semanage scripts from Dan Walsh. + * Tue Jan 22 2008 Dan Walsh 2.0.35-5 - handle files with spaces on upgrades diff --git a/sources b/sources index f97d8a2..bb82e64 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ eddb3e34fb982d752aa8cbed7b98f3d2 sepolgen-1.0.10.tgz -2827dc5b308950293130163cbbe01dd5 policycoreutils-2.0.35.tgz +58d63c40aab742f45be11e30e32c31c4 policycoreutils-2.0.36.tgz