apply steve grub patch
This commit is contained in:
parent
a2883704f9
commit
bb92ed9cdc
@ -1,15 +1,15 @@
|
|||||||
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/fixfiles policycoreutils-1.17.3/scripts/fixfiles
|
--- policycoreutils-1.17.5/scripts/fixfiles.rhat 2004-08-30 11:46:47.000000000 -0400
|
||||||
--- nsapolicycoreutils/scripts/fixfiles 2004-08-10 15:45:13.000000000 -0400
|
+++ policycoreutils-1.17.5/scripts/fixfiles 2004-09-09 13:15:06.671123616 -0400
|
||||||
+++ policycoreutils-1.17.3/scripts/fixfiles 2004-08-26 11:39:22.000000000 -0400
|
@@ -36,6 +36,8 @@
|
||||||
@@ -36,6 +36,7 @@
|
|
||||||
FILESYSTEMSRO=`mount | grep -v "context=" | egrep -v '\((|.*,)bind(,.*|)\)' | awk '/(ext[23]| xfs | reiserfs ).*\(ro/{print $3}';`
|
FILESYSTEMSRO=`mount | grep -v "context=" | egrep -v '\((|.*,)bind(,.*|)\)' | awk '/(ext[23]| xfs | reiserfs ).*\(ro/{print $3}';`
|
||||||
FILESYSTEMS="$FILESYSTEMSRW $FILESYSTEMSRO"
|
FILESYSTEMS="$FILESYSTEMSRW $FILESYSTEMSRO"
|
||||||
SELINUXTYPE="targeted"
|
SELINUXTYPE="targeted"
|
||||||
+FCFILE=`mktemp /var/tmp/file_contexts.XXXXXXXXXX`
|
+FCFILE=`mktemp /var/tmp/file_contexts.XXXXXXXXXX`
|
||||||
|
+trap "rm -f $FCFILE; exit 2" 1 2 3 5 15
|
||||||
|
|
||||||
if [ -e /etc/selinux/config ]; then
|
if [ -e /etc/selinux/config ]; then
|
||||||
. /etc/selinux/config
|
. /etc/selinux/config
|
||||||
@@ -55,7 +56,7 @@
|
@@ -55,7 +57,7 @@
|
||||||
echo "Warning: Skipping the following R/O filesystems:"
|
echo "Warning: Skipping the following R/O filesystems:"
|
||||||
echo "$FILESYSTEMSRO"
|
echo "$FILESYSTEMSRO"
|
||||||
fi
|
fi
|
||||||
@ -18,7 +18,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/fixfiles policyc
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,7 +71,7 @@
|
@@ -70,7 +72,7 @@
|
||||||
echo "Warning: Skipping the following R/O filesystems:"
|
echo "Warning: Skipping the following R/O filesystems:"
|
||||||
echo "$FILESYSTEMSRO"
|
echo "$FILESYSTEMSRO"
|
||||||
fi
|
fi
|
||||||
@ -27,7 +27,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/fixfiles policyc
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,22 +88,22 @@
|
@@ -87,22 +89,22 @@
|
||||||
echo "Warning: Skipping the following R/O filesystems:"
|
echo "Warning: Skipping the following R/O filesystems:"
|
||||||
echo "$FILESYSTEMSRO"
|
echo "$FILESYSTEMSRO"
|
||||||
fi
|
fi
|
||||||
@ -63,19 +63,20 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/fixfiles policyc
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,6 +111,11 @@
|
@@ -110,6 +112,12 @@
|
||||||
echo $"Usage: $0 {-R rpmpackage[,rpmpackage...] [-l logfile ] [-o outputfile ] |check|restore|[-F] relabel}"
|
echo $"Usage: $0 {-R rpmpackage[,rpmpackage...] [-l logfile ] [-o outputfile ] |check|restore|[-F] relabel}"
|
||||||
}
|
}
|
||||||
|
|
||||||
+if [ $# = 0 ]; then
|
+if [ $# = 0 ]; then
|
||||||
+ usage
|
+ usage
|
||||||
|
+ rm -f $FCFILE
|
||||||
+ exit 1
|
+ exit 1
|
||||||
+fi
|
+fi
|
||||||
+
|
+
|
||||||
# See how we were called.
|
# See how we were called.
|
||||||
for i in $@; do
|
for i in $@; do
|
||||||
if [ $rpmFlag = 2 ]; then
|
if [ $rpmFlag = 2 ]; then
|
||||||
@@ -127,6 +133,7 @@
|
@@ -127,6 +135,7 @@
|
||||||
logfileFlag=1
|
logfileFlag=1
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
@ -83,8 +84,17 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/fixfiles policyc
|
|||||||
case "$i" in
|
case "$i" in
|
||||||
check)
|
check)
|
||||||
checkFlag=1
|
checkFlag=1
|
||||||
@@ -158,15 +165,25 @@
|
@@ -151,22 +160,38 @@
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
usage
|
||||||
|
+ rm -f $FCFILE
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
if [ `expr $checkFlag + $restoreFlag + $relabelFlag` -gt 1 ]; then
|
||||||
usage
|
usage
|
||||||
|
+ rm -f $FCFILE
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
+
|
+
|
||||||
@ -97,7 +107,11 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/fixfiles policyc
|
|||||||
+done
|
+done
|
||||||
+
|
+
|
||||||
+if [ $logfileFlag = 0 ]; then
|
+if [ $logfileFlag = 0 ]; then
|
||||||
+ LOGFILE=`mktemp /var/tmp/fixfiles.XXXXXXXXXX` || exit 1
|
+ LOGFILE="/dev/null"
|
||||||
|
+ if [ ! -w $LOGFILE ] ; then
|
||||||
|
+ rm -f $FCFILE
|
||||||
|
+ exit 1
|
||||||
|
+ fi
|
||||||
+fi
|
+fi
|
||||||
+
|
+
|
||||||
if [ $checkFlag = 1 ]; then
|
if [ $checkFlag = 1 ]; then
|
||||||
@ -112,11 +126,12 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/fixfiles policyc
|
|||||||
if [ $relabelFlag = 1 ]; then
|
if [ $relabelFlag = 1 ]; then
|
||||||
if [ $fullFlag = 1 ]; then
|
if [ $fullFlag = 1 ]; then
|
||||||
relabel $rpmFiles
|
relabel $rpmFiles
|
||||||
@@ -174,6 +191,8 @@
|
@@ -174,6 +199,6 @@
|
||||||
relabelCheck $rpmFiles
|
relabelCheck $rpmFiles
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
+
|
-exit $?
|
||||||
+rm $FCFILE
|
-
|
||||||
exit $?
|
|
||||||
|
|
||||||
|
+rm $FCFILE
|
||||||
|
+exit $?
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
Summary: SELinux policy core utilities.
|
Summary: SELinux policy core utilities.
|
||||||
Name: policycoreutils
|
Name: policycoreutils
|
||||||
Version: 1.17.5
|
Version: 1.17.5
|
||||||
Release: 1
|
Release: 2
|
||||||
License: GPL
|
License: GPL
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
|
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
|
||||||
Patch: policycoreutils-rhat.patch
|
Patch: policycoreutils-rhat.patch
|
||||||
|
|
||||||
Prefix: %{_prefix}
|
Prefix: %{_prefix}
|
||||||
BuildRequires: libselinux-devel >= 1.15.3 pam-devel libsepol-devel >= 1.1.1
|
BuildRequires: libselinux-devel >= 1.15.3 pam-devel libsepol-devel >= 1.1.1
|
||||||
Requires: libselinux >= 1.15.3 libsepol >= 1.1.1
|
Requires: libselinux >= 1.15.3 libsepol >= 1.1.1
|
||||||
@ -76,6 +77,9 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Sep 9 2004 Dan Walsh <dwalsh@redhat.com> 1.17.5-2
|
||||||
|
- Add Steve Grubb patch to cleanup log files.
|
||||||
|
|
||||||
* Mon Aug 30 2004 Dan Walsh <dwalsh@redhat.com> 1.17.5-1
|
* Mon Aug 30 2004 Dan Walsh <dwalsh@redhat.com> 1.17.5-1
|
||||||
- Add optargs
|
- Add optargs
|
||||||
- Update to match NSA
|
- Update to match NSA
|
||||||
|
Loading…
Reference in New Issue
Block a user