policycoreutils/policycoreutils-rhat.patch

30 lines
995 B
Diff
Raw Normal View History

--- policycoreutils-1.11/scripts/fixfiles.rhat 2004-05-05 09:36:40.000000000 -0400
+++ policycoreutils-1.11/scripts/fixfiles 2004-05-07 10:41:27.721773064 -0400
@@ -21,20 +21,22 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
auto-import changelog data from policycoreutils-1.9-12.src.rpm * Tue Mar 23 2004 Dan Walsh <dwalsh@redhat.com> 1.9-12 - Remove setfiles-assoc patch - Fix restorecon to not crash on missing dir * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-11 - Eliminate trailing / in restorecon * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-10 - Add Verbosity check * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-9 - Change restorecon to not follow symlinks. It is too difficult and confusing - to figure out the file context for the file pointed to by a symlink. * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-8 - Fix restorecon * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-7 - Read restorecon patch * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-6 - Change genhomedircon to take POLICYSOURCEDIR from command line * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-5 - Add checkselinux - move fixfiles and restorecon to /sbin * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-4 - Restore patch of genhomedircon * Mon Mar 15 2004 Dan Walsh <dwalsh@redhat.com> 1.9-3 - Add setfiles-assoc patch to try to freeup memory use * Mon Mar 15 2004 Dan Walsh <dwalsh@redhat.com> 1.9-2 - Add fixlabels * Mon Mar 15 2004 Dan Walsh <dwalsh@redhat.com> 1.9-1 - Update to latest from NSA * Wed Mar 10 2004 Dan Walsh <dwalsh@redhat.com> 1.6-8 - Increase the size of buffer accepted by setfiles to BUFSIZ. * Tue Mar 09 2004 Dan Walsh <dwalsh@redhat.com> 1.6-7 - genhomedircon should complete even if it can't read /etc/default/useradd * Tue Mar 09 2004 Dan Walsh <dwalsh@redhat.com> 1.6-6 - fix restorecon to relabel unlabled files. * Fri Mar 05 2004 Dan Walsh <dwalsh@redhat.com> 1.6-5 - Add genhomedircon from tresys - Fixed patch for restorecon * Thu Feb 26 2004 Dan Walsh <dwalsh@redhat.com> 1.6-4 - exit out when selinux is not enabled * Thu Feb 26 2004 Dan Walsh <dwalsh@redhat.com> 1.6-3 - Fix minor bugs in restorecon * Thu Feb 26 2004 Dan Walsh <dwalsh@redhat.com> 1.6-2 - Add restorecon c program * Tue Feb 24 2004 Dan Walsh <dwalsh@redhat.com> 1.6-1 - Update to latest tarball from NSA * Thu Feb 19 2004 Dan Walsh <dwalsh@redhat.com> 1.4-9 - Add sort patch * Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com> - rebuilt
2004-09-09 10:34:14 +00:00
FC=/etc/security/selinux/file_contexts
+LOGFILE=`mktemp /tmp/fixfiles.XXXXXXXXXX` || exit 1
+echo "logging to $LOGFILE"
SETFILES=/usr/sbin/setfiles
-FILESYSTEMS=`mount | awk '/(ext[23]| xfs).*rw/{print $3}';`
+FILESYSTEMS=`mount | grep -v "context=" | grep -v bind | awk '/(ext[23]| xfs).*rw/{print $3}';`
checkLabels () {
-${SETFILES} -v -n ${FC} ${FILESYSTEMS}
+${SETFILES} -v -n ${FC} ${FILESYSTEMS} 2>&1 | tee $LOGFILE
auto-import changelog data from policycoreutils-1.9-12.src.rpm * Tue Mar 23 2004 Dan Walsh <dwalsh@redhat.com> 1.9-12 - Remove setfiles-assoc patch - Fix restorecon to not crash on missing dir * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-11 - Eliminate trailing / in restorecon * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-10 - Add Verbosity check * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-9 - Change restorecon to not follow symlinks. It is too difficult and confusing - to figure out the file context for the file pointed to by a symlink. * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-8 - Fix restorecon * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-7 - Read restorecon patch * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-6 - Change genhomedircon to take POLICYSOURCEDIR from command line * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-5 - Add checkselinux - move fixfiles and restorecon to /sbin * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-4 - Restore patch of genhomedircon * Mon Mar 15 2004 Dan Walsh <dwalsh@redhat.com> 1.9-3 - Add setfiles-assoc patch to try to freeup memory use * Mon Mar 15 2004 Dan Walsh <dwalsh@redhat.com> 1.9-2 - Add fixlabels * Mon Mar 15 2004 Dan Walsh <dwalsh@redhat.com> 1.9-1 - Update to latest from NSA * Wed Mar 10 2004 Dan Walsh <dwalsh@redhat.com> 1.6-8 - Increase the size of buffer accepted by setfiles to BUFSIZ. * Tue Mar 09 2004 Dan Walsh <dwalsh@redhat.com> 1.6-7 - genhomedircon should complete even if it can't read /etc/default/useradd * Tue Mar 09 2004 Dan Walsh <dwalsh@redhat.com> 1.6-6 - fix restorecon to relabel unlabled files. * Fri Mar 05 2004 Dan Walsh <dwalsh@redhat.com> 1.6-5 - Add genhomedircon from tresys - Fixed patch for restorecon * Thu Feb 26 2004 Dan Walsh <dwalsh@redhat.com> 1.6-4 - exit out when selinux is not enabled * Thu Feb 26 2004 Dan Walsh <dwalsh@redhat.com> 1.6-3 - Fix minor bugs in restorecon * Thu Feb 26 2004 Dan Walsh <dwalsh@redhat.com> 1.6-2 - Add restorecon c program * Tue Feb 24 2004 Dan Walsh <dwalsh@redhat.com> 1.6-1 - Update to latest tarball from NSA * Thu Feb 19 2004 Dan Walsh <dwalsh@redhat.com> 1.4-9 - Add sort patch * Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com> - rebuilt
2004-09-09 10:34:14 +00:00
}
restoreLabels () {
-${SETFILES} -v ${FC} ${FILESYSTEMS}
+${SETFILES} -v ${FC} ${FILESYSTEMS} 2>&1 | tee $LOGFILE
auto-import changelog data from policycoreutils-1.9-12.src.rpm * Tue Mar 23 2004 Dan Walsh <dwalsh@redhat.com> 1.9-12 - Remove setfiles-assoc patch - Fix restorecon to not crash on missing dir * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-11 - Eliminate trailing / in restorecon * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-10 - Add Verbosity check * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-9 - Change restorecon to not follow symlinks. It is too difficult and confusing - to figure out the file context for the file pointed to by a symlink. * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-8 - Fix restorecon * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-7 - Read restorecon patch * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-6 - Change genhomedircon to take POLICYSOURCEDIR from command line * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-5 - Add checkselinux - move fixfiles and restorecon to /sbin * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-4 - Restore patch of genhomedircon * Mon Mar 15 2004 Dan Walsh <dwalsh@redhat.com> 1.9-3 - Add setfiles-assoc patch to try to freeup memory use * Mon Mar 15 2004 Dan Walsh <dwalsh@redhat.com> 1.9-2 - Add fixlabels * Mon Mar 15 2004 Dan Walsh <dwalsh@redhat.com> 1.9-1 - Update to latest from NSA * Wed Mar 10 2004 Dan Walsh <dwalsh@redhat.com> 1.6-8 - Increase the size of buffer accepted by setfiles to BUFSIZ. * Tue Mar 09 2004 Dan Walsh <dwalsh@redhat.com> 1.6-7 - genhomedircon should complete even if it can't read /etc/default/useradd * Tue Mar 09 2004 Dan Walsh <dwalsh@redhat.com> 1.6-6 - fix restorecon to relabel unlabled files. * Fri Mar 05 2004 Dan Walsh <dwalsh@redhat.com> 1.6-5 - Add genhomedircon from tresys - Fixed patch for restorecon * Thu Feb 26 2004 Dan Walsh <dwalsh@redhat.com> 1.6-4 - exit out when selinux is not enabled * Thu Feb 26 2004 Dan Walsh <dwalsh@redhat.com> 1.6-3 - Fix minor bugs in restorecon * Thu Feb 26 2004 Dan Walsh <dwalsh@redhat.com> 1.6-2 - Add restorecon c program * Tue Feb 24 2004 Dan Walsh <dwalsh@redhat.com> 1.6-1 - Update to latest tarball from NSA * Thu Feb 19 2004 Dan Walsh <dwalsh@redhat.com> 1.4-9 - Add sort patch * Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com> - rebuilt
2004-09-09 10:34:14 +00:00
}
relabel() {
echo "Cleaning out /tmp"
rm -rf /tmp/.??* /tmp/*
-${SETFILES} ${FC} ${FILESYSTEMS}
+${SETFILES} ${FC} ${FILESYSTEMS} 2>&1 | tee $LOGFILE
}
auto-import changelog data from policycoreutils-1.9-12.src.rpm * Tue Mar 23 2004 Dan Walsh <dwalsh@redhat.com> 1.9-12 - Remove setfiles-assoc patch - Fix restorecon to not crash on missing dir * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-11 - Eliminate trailing / in restorecon * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-10 - Add Verbosity check * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-9 - Change restorecon to not follow symlinks. It is too difficult and confusing - to figure out the file context for the file pointed to by a symlink. * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-8 - Fix restorecon * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-7 - Read restorecon patch * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-6 - Change genhomedircon to take POLICYSOURCEDIR from command line * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-5 - Add checkselinux - move fixfiles and restorecon to /sbin * Wed Mar 17 2004 Dan Walsh <dwalsh@redhat.com> 1.9-4 - Restore patch of genhomedircon * Mon Mar 15 2004 Dan Walsh <dwalsh@redhat.com> 1.9-3 - Add setfiles-assoc patch to try to freeup memory use * Mon Mar 15 2004 Dan Walsh <dwalsh@redhat.com> 1.9-2 - Add fixlabels * Mon Mar 15 2004 Dan Walsh <dwalsh@redhat.com> 1.9-1 - Update to latest from NSA * Wed Mar 10 2004 Dan Walsh <dwalsh@redhat.com> 1.6-8 - Increase the size of buffer accepted by setfiles to BUFSIZ. * Tue Mar 09 2004 Dan Walsh <dwalsh@redhat.com> 1.6-7 - genhomedircon should complete even if it can't read /etc/default/useradd * Tue Mar 09 2004 Dan Walsh <dwalsh@redhat.com> 1.6-6 - fix restorecon to relabel unlabled files. * Fri Mar 05 2004 Dan Walsh <dwalsh@redhat.com> 1.6-5 - Add genhomedircon from tresys - Fixed patch for restorecon * Thu Feb 26 2004 Dan Walsh <dwalsh@redhat.com> 1.6-4 - exit out when selinux is not enabled * Thu Feb 26 2004 Dan Walsh <dwalsh@redhat.com> 1.6-3 - Fix minor bugs in restorecon * Thu Feb 26 2004 Dan Walsh <dwalsh@redhat.com> 1.6-2 - Add restorecon c program * Tue Feb 24 2004 Dan Walsh <dwalsh@redhat.com> 1.6-1 - Update to latest tarball from NSA * Thu Feb 19 2004 Dan Walsh <dwalsh@redhat.com> 1.4-9 - Add sort patch * Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com> - rebuilt
2004-09-09 10:34:14 +00:00
# See how we were called.