From dcf3e52fa09e6328ef5133aa80819628a7ca1fa2 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Sep 16 2006 11:50:44 +0000 Subject: * Thu Sep 14 2006 Dan Walsh 1.30.29-2 - Rebuild --- diff --git a/policycoreutils-rhat.patch b/policycoreutils-rhat.patch index 5dc552b..2a9b288 100644 --- a/policycoreutils-rhat.patch +++ b/policycoreutils-rhat.patch @@ -1,6 +1,6 @@ diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/restorecon/restorecon.8 policycoreutils-1.30.29/restorecon/restorecon.8 --- nsapolicycoreutils/restorecon/restorecon.8 2006-08-28 16:58:19.000000000 -0400 -+++ policycoreutils-1.30.29/restorecon/restorecon.8 2006-09-14 08:12:16.000000000 -0400 ++++ policycoreutils-1.30.29/restorecon/restorecon.8 2006-09-15 09:19:49.000000000 -0400 @@ -23,6 +23,9 @@ .SH "OPTIONS" @@ -13,7 +13,7 @@ diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/restore .TP diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/restorecon/restorecon.c policycoreutils-1.30.29/restorecon/restorecon.c --- nsapolicycoreutils/restorecon/restorecon.c 2006-09-01 22:32:11.000000000 -0400 -+++ policycoreutils-1.30.29/restorecon/restorecon.c 2006-09-14 08:17:23.000000000 -0400 ++++ policycoreutils-1.30.29/restorecon/restorecon.c 2006-09-15 09:19:49.000000000 -0400 @@ -11,9 +11,10 @@ * restorecon [-Rnv] pathname... * @@ -22,7 +22,7 @@ diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/restore * -n Do not change any file labels. * -v Show changes in file labels. - * -o filename save list of files with incorrect context -+ * -o filename save list of files with incorrect context ++ * -o filename save list of files with incorrect context * -F Force reset of context to match file_context for customizable files * * pathname... The file(s) to label @@ -46,22 +46,20 @@ diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/restore { fprintf(stderr, - "usage: %s [-FnrRv] [-e excludedir ] [-o filename ] [-f filename | pathname... ]\n", -+ "usage: %s [-iFonrRv] [-e excludedir ] [-o filename ] [-f filename | pathname... ]\n", ++ "usage: %s [-iFnrRv] [-e excludedir ] [-o filename ] [-f filename | pathname... ]\n", name); exit(1); } -@@ -160,7 +163,9 @@ +@@ -160,6 +163,8 @@ } if (lstat(filename, &st) != 0) { -- fprintf(stderr, "lstat(%s) failed: %s\n", filename, + if (!file_exist && errno == ENOENT) + return 0; -+ fprintf(outfile, "lstat(%s) failed: %s\n", filename, + fprintf(stderr, "lstat(%s) failed: %s\n", filename, strerror(errno)); return 1; - } -@@ -249,9 +251,12 @@ +@@ -249,7 +254,10 @@ freecon(scontext); return 1; } @@ -71,21 +69,9 @@ diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/restore + change_ctr++; + if (verbose) -- printf("%s reset %s context %s->%s\n", -+ fprintf(stderr, "%s reset %s context %s->%s\n", + printf("%s reset %s context %s->%s\n", progname, filename, - (retcontext >= - 0 ? prev_context : ""), -@@ -259,7 +264,7 @@ - } - } - if (verbose > 1 && !force && customizable > 0) { -- printf("%s: %s not reset customized by admin to %s\n", -+ fprintf(stderr, "%s: %s not reset customized by admin to %s\n", - progname, filename, prev_context); - } - -@@ -322,6 +327,8 @@ +@@ -322,6 +330,8 @@ close(pipe_fds[1]); if (rc == -1 || rc > 0) { if (nftw(buf, apply_spec, 1024, FTW_PHYS)) { @@ -94,7 +80,7 @@ diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/restore fprintf(stderr, "%s: error while labeling files under %s\n", progname, buf); -@@ -353,11 +360,14 @@ +@@ -353,11 +363,14 @@ exit(0); set_matchpathcon_flags(MATCHPATHCON_NOTRANS); @@ -110,7 +96,7 @@ diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/restore case 'r': case 'R': recurse = 1; -@@ -370,13 +380,17 @@ +@@ -370,13 +383,17 @@ exit(1); break; case 'o': @@ -134,11 +120,7 @@ diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/restore break; case 'v': if (progress) { -@@ -425,8 +439,11 @@ - process(argv[i]); - } - } -+ +@@ -428,5 +445,7 @@ if (outfile) fclose(outfile); @@ -148,31 +130,16 @@ diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/restore } diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/scripts/fixfiles policycoreutils-1.30.29/scripts/fixfiles --- nsapolicycoreutils/scripts/fixfiles 2006-09-01 22:32:11.000000000 -0400 -+++ policycoreutils-1.30.29/scripts/fixfiles 2006-09-14 08:12:16.000000000 -0400 -@@ -117,8 +117,8 @@ ++++ policycoreutils-1.30.29/scripts/fixfiles 2006-09-15 09:20:06.000000000 -0400 +@@ -117,7 +117,7 @@ exit $? fi if [ ! -z "$RPMFILES" ]; then - for i in `echo $RPMFILES | sed 's/,/ /g'`; do -- rpmlist $i | ${RESTORECON} ${OUTFILES} ${FORCEFLAG} -R $* -f - 2>&1 >> $LOGFILE + for i in `echo "$RPMFILES" | sed 's/,/ /g'`; do -+ rpmlist $i | ${RESTORECON} ${OUTFILES} ${FORCEFLAG} -i $* -f - 2>> $LOGFILE + rpmlist $i | ${RESTORECON} ${OUTFILES} ${FORCEFLAG} -R $* -f - 2>&1 >> $LOGFILE done exit $? - fi -@@ -126,10 +126,10 @@ - if [ -x /usr/bin/find ]; then - for d in ${DIRS} ; do find $d \ - ! \( -fstype ext2 -o -fstype ext3 -o -fstype jfs -o -fstype xfs \) -prune -o -print | \ -- ${RESTORECON} ${OUTFILES} ${FORCEFLAG} $* -f - 2>&1 >> $LOGFILE -+ ${RESTORECON} ${OUTFILES} ${FORCEFLAG} $* -f - 2>> $LOGFILE - done - else -- ${RESTORECON} ${OUTFILES} ${FORCEFLAG} -R $* $DIRS 2>&1 >> $LOGFILE -+ ${RESTORECON} ${OUTFILES} ${FORCEFLAG} -R $* $DIRS 2>> $LOGFILE - fi - - exit $? @@ -219,7 +219,7 @@ # check if they specified both DIRS and RPMFILES # @@ -182,3 +149,11 @@ diff --exclude-from=exclude --exclude='*.po' -N -u -r nsapolicycoreutils/scripts if [ $OPTIND -le $# ]; then usage fi +@@ -236,6 +236,7 @@ + case "$command" in + restore) restore -p ;; + check) restore -n -v ;; ++ verify) restore -n -o -;; + relabel) relabel;; + *) + usage diff --git a/policycoreutils.spec b/policycoreutils.spec index b2c1e1a..5edac0c 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -5,7 +5,7 @@ Summary: SELinux policy core utilities. Name: policycoreutils Version: 1.30.29 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz @@ -122,6 +122,9 @@ fi [ -x /sbin/service ] && /sbin/service restorecond condrestart %changelog +* Thu Sep 14 2006 Dan Walsh 1.30.29-2 +- Rebuild + * Thu Sep 14 2006 Dan Walsh 1.30.29-1 - Update to upstream - Change -o to take "-" for stdout