* Wed Feb 29 2012 Ian Kent <ikent@redhat.com> - 1:5.0.6-14
- fix function to check mount.nfs version.
This commit is contained in:
parent
a844a9d89f
commit
f6952bdcea
52
autofs-5.0.6-fix-function-to-check-mount_nfs-version.patch
Normal file
52
autofs-5.0.6-fix-function-to-check-mount_nfs-version.patch
Normal file
@ -0,0 +1,52 @@
|
||||
autofs-5.0.6 - fix function to check mount.nfs version
|
||||
|
||||
From: Leonardo Chiquitto <leonardo.lists@gmail.com>
|
||||
|
||||
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) ;
|
10
autofs.spec
10
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,6 +240,9 @@ fi
|
||||
%dir /etc/auto.master.d
|
||||
|
||||
%changelog
|
||||
* Wed Feb 29 2012 Ian Kent <ikent@redhat.com> - 1:5.0.6-14
|
||||
- fix function to check mount.nfs version.
|
||||
|
||||
* Sun Feb 26 2012 Ian Kent <ikent@redhat.com> - 1:5.0.6-13
|
||||
- fix error in %post scriplet.
|
||||
|
||||
@ -251,8 +256,7 @@ fi
|
||||
- systemd support fixes.
|
||||
- fix segmentation fault in do_remount_indirect().
|
||||
|
||||
|
||||
* Thu Feb 9 2012 Ian Kent <knt@redhat.com> - 1:5.0.6-11
|
||||
* Thu Feb 9 2012 Ian Kent <ikent@redhat.com> - 1:5.0.6-11
|
||||
- fix fuzz in CHANGELOG hunk when applying patch26.
|
||||
|
||||
* Tue Feb 7 2012 Ian Kent <knt@redhat.com> - 1:5.0.6-10
|
||||
|
Loading…
Reference in New Issue
Block a user