* Fri Feb 5 2010 Dan Walsh <dwalsh@redhat.com> 2.0.78-20

- Catch OSError in semanage
This commit is contained in:
Daniel J Walsh 2010-02-10 19:30:27 +00:00
parent 250c43373f
commit b4c2280d90
2 changed files with 28 additions and 20 deletions

View File

@ -2780,18 +2780,19 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.19 --exclude=gui --exclude=po
+} +}
diff --exclude-from=exclude --exclude=sepolgen-1.0.19 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/fixfiles policycoreutils-2.0.78/scripts/fixfiles diff --exclude-from=exclude --exclude=sepolgen-1.0.19 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/fixfiles policycoreutils-2.0.78/scripts/fixfiles
--- nsapolicycoreutils/scripts/fixfiles 2009-12-01 15:46:50.000000000 -0500 --- nsapolicycoreutils/scripts/fixfiles 2009-12-01 15:46:50.000000000 -0500
+++ policycoreutils-2.0.78/scripts/fixfiles 2010-01-29 16:40:10.000000000 -0500 +++ policycoreutils-2.0.78/scripts/fixfiles 2010-02-03 15:22:51.000000000 -0500
@@ -75,7 +75,8 @@ @@ -35,8 +35,8 @@
-e 's|\(.*|*|g' \ LOGGER=/usr/sbin/logger
-e 's|\[.*|*|g' \ SETFILES=/sbin/setfiles
-e 's|\.\*.*|*|g' \ RESTORECON=/sbin/restorecon
- -e 's|\.\+.*|*|g' | \ -FILESYSTEMSRW=`mount | grep -v "context=" | egrep -v '\((|.*,)bind(,.*|)\)' | awk '/(ext[234]| ext4dev | gfs2 | xfs | jfs | btrfs ).*\(rw/{print $3}';`
+ -e 's|\.\+.*|*|g' \ -FILESYSTEMSRO=`mount | grep -v "context=" | egrep -v '\((|.*,)bind(,.*|)\)' | awk '/(ext[234]| ext4dev | gfs2 | xfs | jfs | btrfs ).*\(ro/{print $3}';`
+ -e 's,/\*$,,g'| \ +FILESYSTEMSRW=`grep rw,seclabel /proc/self/mounts | awk '{ print $2 }'`
# These two sorts need to be separate commands \ +FILESYSTEMSRO=`grep -v 'rw\|seclabel' /proc/self/mounts | awk '{ print $2 }'`
sort -u | \ FILESYSTEMS="$FILESYSTEMSRW $FILESYSTEMSRO"
sort -d | \ SELINUXTYPE="targeted"
@@ -87,11 +88,9 @@ if [ -e /etc/selinux/config ]; then
@@ -87,11 +87,7 @@
esac; \ esac; \
fi; \ fi; \
done | \ done | \
@ -2800,13 +2801,11 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.19 --exclude=gui --exclude=po
- \( -wholename /home -o -wholename /root -o -wholename /tmp -wholename /dev \) -prune -o -print0"; \ - \( -wholename /home -o -wholename /root -o -wholename /tmp -wholename /dev \) -prune -o -print0"; \
- done 2> /dev/null | \ - done 2> /dev/null | \
- ${RESTORECON} $* -0 -f - - ${RESTORECON} $* -0 -f -
+ xargs -r echo + ${RESTORECON} -f - -R -p -e /home -e /tmp -r /dev; \
+#${RESTORECON} -F -R -p -e /home -e /tmp -e /dev
+
rm -f ${TEMPFILE} ${PREFCTEMPFILE} rm -f ${TEMPFILE} ${PREFCTEMPFILE}
fi fi
} }
@@ -126,13 +125,7 @@ @@ -126,13 +122,7 @@
exit $? exit $?
fi fi
if [ ! -z "$FILEPATH" ]; then if [ ! -z "$FILEPATH" ]; then
@ -2821,7 +2820,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.19 --exclude=gui --exclude=po
return return
fi fi
[ -x /usr/sbin/genhomedircon ] && /usr/sbin/genhomedircon [ -x /usr/sbin/genhomedircon ] && /usr/sbin/genhomedircon
@@ -146,7 +139,7 @@ @@ -146,7 +136,7 @@
fullrelabel() { fullrelabel() {
logit "Cleaning out /tmp" logit "Cleaning out /tmp"
@ -2832,7 +2831,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.19 --exclude=gui --exclude=po
} }
diff --exclude-from=exclude --exclude=sepolgen-1.0.19 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/semanage policycoreutils-2.0.78/semanage/semanage diff --exclude-from=exclude --exclude=sepolgen-1.0.19 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/semanage policycoreutils-2.0.78/semanage/semanage
--- nsapolicycoreutils/semanage/semanage 2009-11-18 17:06:03.000000000 -0500 --- nsapolicycoreutils/semanage/semanage 2009-11-18 17:06:03.000000000 -0500
+++ policycoreutils-2.0.78/semanage/semanage 2010-01-08 09:24:07.000000000 -0500 +++ policycoreutils-2.0.78/semanage/semanage 2010-02-05 15:04:10.000000000 -0500
@@ -32,25 +32,34 @@ @@ -32,25 +32,34 @@
try: try:
gettext.install(PROGNAME, gettext.install(PROGNAME,
@ -3164,6 +3163,12 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.19 --exclude=gui --exclude=po
process_args(mkargv(l)) process_args(mkargv(l))
trans.finish() trans.finish()
else: else:
@@ -467,3 +549,5 @@
errorExit(_("Invalid value %s") % error.args[0])
except IOError, error:
errorExit(error.args[1])
+ except OSError, error:
+ errorExit(error.args[1])
diff --exclude-from=exclude --exclude=sepolgen-1.0.19 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/semanage.8 policycoreutils-2.0.78/semanage/semanage.8 diff --exclude-from=exclude --exclude=sepolgen-1.0.19 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/semanage.8 policycoreutils-2.0.78/semanage/semanage.8
--- nsapolicycoreutils/semanage/semanage.8 2009-11-18 17:06:03.000000000 -0500 --- nsapolicycoreutils/semanage/semanage.8 2009-11-18 17:06:03.000000000 -0500
+++ policycoreutils-2.0.78/semanage/semanage.8 2010-01-08 09:32:28.000000000 -0500 +++ policycoreutils-2.0.78/semanage/semanage.8 2010-01-08 09:32:28.000000000 -0500

View File

@ -6,10 +6,10 @@
Summary: SELinux policy core utilities Summary: SELinux policy core utilities
Name: policycoreutils Name: policycoreutils
Version: 2.0.78 Version: 2.0.78
Release: 19%{?dist} Release: 20%{?dist}
License: GPLv2+ License: GPLv2+
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
Source1: http://www.nsa.gov/selinux/archives/sepolgen-%{sepolgenver}.tgz Source1: http://www.nsa.gov/selinux/archives/sepolgen-%{sepolgenver}.tgz
URL: http://www.selinuxproject.org URL: http://www.selinuxproject.org
Source2: system-config-selinux.png Source2: system-config-selinux.png
@ -298,6 +298,9 @@ fi
exit 0 exit 0
%changelog %changelog
* Fri Feb 5 2010 Dan Walsh <dwalsh@redhat.com> 2.0.78-20
- Catch OSError in semanage
* Wed Feb 3 2010 Dan Walsh <dwalsh@redhat.com> 2.0.78-19 * Wed Feb 3 2010 Dan Walsh <dwalsh@redhat.com> 2.0.78-19
- Fix seobject and fixfiles - Fix seobject and fixfiles