- fix version passed to get_supported_ver_and_cost (bz 249574).
This commit is contained in:
parent
a76cb5c9b1
commit
8e33339caa
@ -0,0 +1,39 @@
|
|||||||
|
diff --git a/modules/replicated.c b/modules/replicated.c
|
||||||
|
index de1b40c..0764d4a 100644
|
||||||
|
--- a/modules/replicated.c
|
||||||
|
+++ b/modules/replicated.c
|
||||||
|
@@ -607,12 +607,31 @@ static int get_supported_ver_and_cost(struct host *host, unsigned int version, c
|
||||||
|
|
||||||
|
parms.pm_prog = NFS_PROGRAM;
|
||||||
|
|
||||||
|
+ /*
|
||||||
|
+ * The version passed in is the version as defined in
|
||||||
|
+ * include/replicated.h. However, the version we want to send
|
||||||
|
+ * off to the rpc calls should match the program version of NFS.
|
||||||
|
+ * So, we do the conversion here.
|
||||||
|
+ */
|
||||||
|
if (version & UDP_SELECTED_MASK) {
|
||||||
|
proto = "udp";
|
||||||
|
- vers = (version << 8);
|
||||||
|
- } else {
|
||||||
|
+ version >>= 8;
|
||||||
|
+ } else
|
||||||
|
proto = "tcp";
|
||||||
|
- vers = version;
|
||||||
|
+
|
||||||
|
+ switch (version) {
|
||||||
|
+ case NFS2_SUPPORTED:
|
||||||
|
+ vers = NFS2_VERSION;
|
||||||
|
+ break;
|
||||||
|
+ case NFS3_SUPPORTED:
|
||||||
|
+ vers = NFS3_VERSION;
|
||||||
|
+ break;
|
||||||
|
+ case NFS4_SUPPORTED:
|
||||||
|
+ vers = NFS4_VERSION;
|
||||||
|
+ break;
|
||||||
|
+ default:
|
||||||
|
+ crit(LOGOPT_ANY, "called with invalid version: 0x%x\n", version);
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
rpc_info.proto = getprotobyname(proto);
|
@ -4,7 +4,7 @@
|
|||||||
Summary: A tool for automatically mounting and unmounting filesystems
|
Summary: A tool for automatically mounting and unmounting filesystems
|
||||||
Name: autofs
|
Name: autofs
|
||||||
Version: 5.0.2
|
Version: 5.0.2
|
||||||
Release: 8
|
Release: 9
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
License: GPL
|
License: GPL
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
@ -19,6 +19,7 @@ Patch5: autofs-5.0.2-quote-exports.patch
|
|||||||
Patch6: autofs-5.0.2-hi-res-time.patch
|
Patch6: autofs-5.0.2-hi-res-time.patch
|
||||||
Patch7: autofs-5.0.2-quoted-slash-alone.patch
|
Patch7: autofs-5.0.2-quoted-slash-alone.patch
|
||||||
Patch8: autofs-5.0.2-fix-dnattr-parse.patch
|
Patch8: autofs-5.0.2-fix-dnattr-parse.patch
|
||||||
|
Patch9: autofs-5.0.2-fix-nfs-version-in-get-supported-ver-and-cost.patch
|
||||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, libxml2-devel, cyrus-sasl-devel, openssl-devel
|
BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, libxml2-devel, cyrus-sasl-devel, openssl-devel
|
||||||
Conflicts: kernel < 2.6.17
|
Conflicts: kernel < 2.6.17
|
||||||
@ -69,6 +70,7 @@ echo %{version}-%{release} > .version
|
|||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
%patch7 -p1
|
%patch7 -p1
|
||||||
%patch8 -p1
|
%patch8 -p1
|
||||||
|
%patch9 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
#CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
|
#CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
|
||||||
@ -121,6 +123,9 @@ fi
|
|||||||
%{_libdir}/autofs/
|
%{_libdir}/autofs/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jul 27 2007 Ian Kent <ikent@redhat.com> - 5.0.2-9
|
||||||
|
- fix version passed to get_supported_ver_and_cost (bz 249574).
|
||||||
|
|
||||||
* Tue Jul 24 2007 Ian Kent <ikent@redhat.com> - 5.0.2-8
|
* Tue Jul 24 2007 Ian Kent <ikent@redhat.com> - 5.0.2-8
|
||||||
- fix parse confusion between attribute and attribute value.
|
- fix parse confusion between attribute and attribute value.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user