From e332cf241117f53471066a64abf64e533be8f0d2 Mon Sep 17 00:00:00 2001 From: Ian Kent Date: Mar 20 2009 08:49:00 +0000 Subject: - fix call restorecon when misc device file doesn't exist. --- diff --git a/autofs-5.0.4-fix-restorecon.patch b/autofs-5.0.4-fix-restorecon.patch new file mode 100644 index 0000000..a651300 --- /dev/null +++ b/autofs-5.0.4-fix-restorecon.patch @@ -0,0 +1,51 @@ +autofs-5.0.4 - fix restorecon + +From: Ian Kent + +If the misc device node doesn't exist don't try to run restorecon on it. +--- + + CHANGELOG | 1 + + redhat/autofs.init.in | 2 +- + samples/rc.autofs.in | 2 +- + 3 files changed, 3 insertions(+), 2 deletions(-) + + +diff --git a/CHANGELOG b/CHANGELOG +index 96a4617..00b455e 100644 +--- a/CHANGELOG ++++ b/CHANGELOG +@@ -33,6 +33,7 @@ + - add LSB init script parameter block. + - fix file map lookup when reading included or nsswitch sources. + - use misc device ioctl interface by default, if available. ++- fix call restorecon when misc device file doesn't exist. + + 4/11/2008 autofs-5.0.4 + ----------------------- +diff --git a/redhat/autofs.init.in b/redhat/autofs.init.in +index 0fd1777..a9a33c8 100644 +--- a/redhat/autofs.init.in ++++ b/redhat/autofs.init.in +@@ -76,7 +76,7 @@ function start() { + mknod -m 0600 /dev/$DEVICE c 10 $MINOR + fi + fi +- if [ -x /sbin/restorecon ]; then ++ if [ -x /sbin/restorecon -a -c /dev/$DEVICE ]; then + /sbin/restorecon /dev/$DEVICE + fi + else +diff --git a/samples/rc.autofs.in b/samples/rc.autofs.in +index 63a0c5d..78cbec2 100644 +--- a/samples/rc.autofs.in ++++ b/samples/rc.autofs.in +@@ -66,7 +66,7 @@ function start() { + mknod -m 0600 /dev/$DEVICE c 10 $MINOR + fi + fi +- if [ -x /sbin/restorecon ]; then ++ if [ -x /sbin/restorecon -a -c /dev/$DEVICE ]; then + /sbin/restorecon /dev/$DEVICE + fi + else diff --git a/autofs.spec b/autofs.spec index 775b0ad..5d3ac77 100644 --- a/autofs.spec +++ b/autofs.spec @@ -4,7 +4,7 @@ Summary: A tool for automatically mounting and unmounting filesystems Name: autofs Version: 5.0.4 -Release: 22 +Release: 23 Epoch: 1 License: GPLv2+ Group: System Environment/Daemons @@ -43,6 +43,7 @@ Patch30: autofs-5.0.4-another-easy-alloca-replacements-fix.patch Patch31: autofs-5.0.4-add-lsb-init-script-parameter-block.patch Patch32: autofs-5.0.4-always-read-file-maps-fix.patch Patch33: autofs-5.0.4-use-misc-device.patch +Patch34: autofs-5.0.4-fix-restorecon.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, libxml2-devel, cyrus-sasl-devel, openssl-devel module-init-tools util-linux nfs-utils e2fsprogs libtirpc-devel Requires: kernel >= 2.6.17 @@ -117,6 +118,7 @@ echo %{version}-%{release} > .version %patch31 -p1 %patch32 -p1 %patch33 -p1 +%patch34 -p1 %build #CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir} @@ -169,6 +171,9 @@ fi %{_libdir}/autofs/ %changelog +* Fri Mar 20 2009 Ian Kent - 1:5.0.4-23 +- fix call restorecon when misc device file doesn't exist. + * Wed Mar 18 2009 Ian Kent - 1:5.0.4-22 - use misc device ioctl interface by default, if available.