rpms/autofs/devel autofs-5.0.2-fix-nfs-version-in-get-supported-ver-and-cost.patch, NONE, 1.1 autofs.spec, 1.212, 1.213
Ian Kent (iankent)
fedora-extras-commits at redhat.com
Fri Jul 27 08:13:24 UTC 2007
Author: iankent
Update of /cvs/pkgs/rpms/autofs/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3314
Modified Files:
autofs.spec
Added Files:
autofs-5.0.2-fix-nfs-version-in-get-supported-ver-and-cost.patch
Log Message:
* Fri Jul 27 2007 Ian Kent <ikent at redhat.com> - 5.0.2-9
- fix version passed to get_supported_ver_and_cost (bz 249574).
autofs-5.0.2-fix-nfs-version-in-get-supported-ver-and-cost.patch:
--- NEW FILE autofs-5.0.2-fix-nfs-version-in-get-supported-ver-and-cost.patch ---
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);
Index: autofs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/autofs/devel/autofs.spec,v
retrieving revision 1.212
retrieving revision 1.213
diff -u -r1.212 -r1.213
--- autofs.spec 24 Jul 2007 14:47:41 -0000 1.212
+++ autofs.spec 27 Jul 2007 08:12:52 -0000 1.213
@@ -4,7 +4,7 @@
Summary: A tool for automatically mounting and unmounting filesystems
Name: autofs
Version: 5.0.2
-Release: 8
+Release: 9
Epoch: 1
License: GPL
Group: System Environment/Daemons
@@ -19,6 +19,7 @@
Patch6: autofs-5.0.2-hi-res-time.patch
Patch7: autofs-5.0.2-quoted-slash-alone.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)
BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, libxml2-devel, cyrus-sasl-devel, openssl-devel
Conflicts: kernel < 2.6.17
@@ -69,6 +70,7 @@
%patch6 -p1
%patch7 -p1
%patch8 -p1
+%patch9 -p1
%build
#CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
@@ -121,6 +123,9 @@
%{_libdir}/autofs/
%changelog
+* Fri Jul 27 2007 Ian Kent <ikent at redhat.com> - 5.0.2-9
+- fix version passed to get_supported_ver_and_cost (bz 249574).
+
* Tue Jul 24 2007 Ian Kent <ikent at redhat.com> - 5.0.2-8
- fix parse confusion between attribute and attribute value.
More information about the fedora-extras-commits
mailing list