From 0c23e645aaece3cac4273d307f5415bb00dfc430 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Oct 19 2009 16:56:23 +0000 Subject: Make sure stack variables are are initialized correctly (bz 528776) --- diff --git a/nfs-utils-1.2.0-mount-sizeof.patch b/nfs-utils-1.2.0-mount-sizeof.patch new file mode 100644 index 0000000..a077769 --- /dev/null +++ b/nfs-utils-1.2.0-mount-sizeof.patch @@ -0,0 +1,38 @@ +diff -up nfs-utils-1.2.0/utils/mount/stropts.c.orig nfs-utils-1.2.0/utils/mount/stropts.c +--- nfs-utils-1.2.0/utils/mount/stropts.c.orig 2009-10-19 11:14:41.000000000 -0400 ++++ nfs-utils-1.2.0/utils/mount/stropts.c 2009-10-19 12:25:38.000000000 -0400 +@@ -431,11 +431,11 @@ static struct mount_options *nfs_rewrite + struct mount_options *options; + struct sockaddr_storage nfs_address; + struct sockaddr *nfs_saddr = (struct sockaddr *)&nfs_address; +- socklen_t nfs_salen; ++ socklen_t nfs_salen = sizeof(nfs_address); + struct pmap nfs_pmap; + struct sockaddr_storage mnt_address; + struct sockaddr *mnt_saddr = (struct sockaddr *)&mnt_address; +- socklen_t mnt_salen; ++ socklen_t mnt_salen = sizeof(mnt_address); + struct pmap mnt_pmap; + + options = po_split(str); +@@ -573,7 +573,12 @@ static int nfs_try_nfs23mount(struct nfs + if (nfs_sys_mount(mi, "nfs", *extra_opts)) + return 1; + ++ /* ++ * The kernel returns EOPNOTSUPP if the RPC bind failed, ++ * and EPROTONOSUPPORT if the version isn't supported. + if (nfs_is_permanent_error(errno)) ++ */ ++ if (errno != EOPNOTSUPP && errno != EPROTONOSUPPORT) + return 0; + + return nfs_retry_nfs23mount(mi); +@@ -639,7 +644,6 @@ static int nfsmount_fg(struct nfsmount_i + for (;;) { + if (nfs_try_mount(mi)) + return EX_SUCCESS; +- + if (nfs_is_permanent_error(errno)) + break; + diff --git a/nfs-utils.spec b/nfs-utils.spec index 3a0ee2d..7bc4775 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser Name: nfs-utils URL: http://sourceforge.net/projects/nfs Version: 1.2.0 -Release: 5%{?dist} +Release: 6%{?dist} Epoch: 1 # group all 32bit related archs @@ -24,6 +24,7 @@ Patch02: nfs-utils-1.1.0-exp-subtree-warn-off.patch Patch100: nfs-utils-1.2.0-nfsd-41vers.patch Patch101: nfs-utils-1.2.0-permerrors.patch +Patch102: nfs-utils-1.2.0-mount-sizeof.patch Group: System Environment/Daemons Provides: exportfs = %{epoch}:%{version}-%{release} @@ -78,6 +79,8 @@ This package also contains the mount.nfs and umount.nfs program. %patch100 -p1 # 521638 - Bogus error when mounting stopped server %patch101 -p1 +# 528776 - NFS to remote non-root volume fails as of latest F-11 update +%patch102 -p1 # Remove .orig files find . -name "*.orig" | xargs rm -f @@ -244,6 +247,10 @@ fi %attr(4755,root,root) /sbin/umount.nfs4 %changelog +* Mon Oct 19 2009 Steve Dickson 1.2.0-6 +- Rolled back the 1.2.0-5 fix +- Make sure stack variables are are initialized correctly (bz 528776) + * Wed Sep 9 2009 1.2.0-5 - Fixed incorrect error given when server is down (bz 521638)