From 4865913fb4be5781126057d946693c96ddf01bbc Mon Sep 17 00:00:00 2001 From: Ian Kent Date: Feb 29 2012 03:12:21 +0000 Subject: * Wed Feb 29 2012 Ian Kent - 1:5.0.6-14 - fix function to check mount.nfs version. --- diff --git a/autofs-5.0.6-fix-function-to-check-mount_nfs-version.patch b/autofs-5.0.6-fix-function-to-check-mount_nfs-version.patch new file mode 100644 index 0000000..4246df3 --- /dev/null +++ b/autofs-5.0.6-fix-function-to-check-mount_nfs-version.patch @@ -0,0 +1,52 @@ +autofs-5.0.6 - fix function to check mount.nfs version + +From: Leonardo Chiquitto + +The function check_nfs_mount_version() compares the version +of mount.nfs to decide whether a feature is available or not. + +There's a bug in the version comparison code that causes +1.3.0 to be considered less than 1.1.1. This patch fixes it. +--- + + CHANGELOG | 1 + + lib/mounts.c | 17 +++++------------ + 2 files changed, 6 insertions(+), 12 deletions(-) + + +--- autofs-5.0.6.orig/CHANGELOG ++++ autofs-5.0.6/CHANGELOG +@@ -31,6 +31,7 @@ + - catch EHOSTUNREACH and bail out early. + - systemd support fixes. + - check scandir() return value. ++- fix function to check mount.nfs version. + + 28/06/2011 autofs-5.0.6 + ----------------------- +--- autofs-5.0.6.orig/lib/mounts.c ++++ autofs-5.0.6/lib/mounts.c +@@ -249,18 +249,11 @@ int check_nfs_mount_version(struct nfs_m + } + + if (ret) { +- if (vers->major == check->major && +- vers->minor == check->minor && +- vers->fix == check->fix) +- ; +- else { +- if (vers->major < check->major) +- ret = 0; +- else if (vers->minor < check->minor) +- ret = 0; +- else if (vers->fix < check->fix) +- ret = 0; +- } ++ if ((vers->major < check->major) || ++ ((vers->major == check->major) && (vers->minor < check->minor)) || ++ ((vers->major == check->major) && (vers->minor == check->minor) && ++ (vers->fix < check->fix))) ++ ret = 0; + } + + if (waitpid(f, &status, 0) != f) ; diff --git a/autofs.spec b/autofs.spec index 7d671fa..b6a80f4 100644 --- a/autofs.spec +++ b/autofs.spec @@ -8,7 +8,7 @@ Summary: A tool for automatically mounting and unmounting filesystems Name: autofs Version: 5.0.6 -Release: 13%{?dist} +Release: 14%{?dist} Epoch: 1 License: GPLv2+ Group: System Environment/Daemons @@ -47,6 +47,7 @@ Patch31: autofs-5.0.6-rework-error-return-handling-in-rpc-code.patch Patch32: autofs-5.0.6-catch-EHOSTUNREACH-and-bail-out-early.patch Patch33: autofs-5.0.6-systemd-support-fixes.patch Patch34: autofs-5.0.6-fix-segmentation-fault-in-do-remount-indirect.patch +Patch35: autofs-5.0.6-fix-function-to-check-mount_nfs-version.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %if %{with_systemd} BuildRequires: systemd-units @@ -136,6 +137,7 @@ echo %{version}-%{release} > .version %patch32 -p1 %patch33 -p1 %patch34 -p1 +%patch35 -p1 %build #CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir} @@ -238,10 +240,13 @@ fi %dir /etc/auto.master.d %changelog -* Sun Feb 26 2012 Ian Kent - 1:5.0.6-13 +* Wed Feb 29 2012 Ian Kent - 1:5.0.6-14 +- fix function to check mount.nfs version. + +* Sun Feb 26 2012 Ian Kent - 1:5.0.6-13 - fix error in %post scriplet. -* Fri Feb 24 2012 Ian Kent - 1:5.0.6-12 +* Fri Feb 24 2012 Ian Kent - 1:5.0.6-12 - ignore duplicate exports in auto.net. - add kernel verion check function. - add function to check mount.nfs version. @@ -251,19 +256,19 @@ fi - systemd support fixes. - fix segmentation fault in do_remount_indirect(). -* Thu Feb 9 2012 Ian Kent - 1:5.0.6-11 +* Thu Feb 9 2012 Ian Kent - 1:5.0.6-11 - fix fuzz in CHANGELOG hunk when applying patch26. -* Tue Feb 7 2012 Ian Kent - 1:5.0.6-10 +* Tue Feb 7 2012 Ian Kent - 1:5.0.6-10 - fix rpc build error. - add sss lookup module. - teach automount about sss source. -* Mon Jan 23 2012 Ian Kent - 1:5.0.6-9 +* Mon Jan 23 2012 Ian Kent - 1:5.0.6-9 - add correct patch for "fix improve mount location error reporting". - add correct patch for "fix fix wait for master source mutex". -* Mon Jan 23 2012 Ian Kent - 1:5.0.6-8 +* Mon Jan 23 2012 Ian Kent - 1:5.0.6-8 - fix fix wait for master source mutex. - fix improve mount location error reporting (bz783496).