diff --git a/nfs-utils-1.1.2-rmtab-fqdn.patch b/nfs-utils-1.1.2-rmtab-fqdn.patch new file mode 100644 index 0000000..23e85e0 --- /dev/null +++ b/nfs-utils-1.1.2-rmtab-fqdn.patch @@ -0,0 +1,28 @@ +commit 710765a87d599d95de51b79202ba3d82fd03ed95 +Author: Steve Dickson +Date: Wed Jun 25 09:23:45 2008 -0400 + + When a FQDN exists in /var/lib/nfs/rmtab it causes + the exportfs command to seg fault due to the nfs_export pointer + not being allocated. Reworking the parentheses in rmtab_read() + so the htype variable is evaluated correctly fix the problem. + + Signed-off-by: Steve Dickson + +diff --git a/support/export/rmtab.c b/support/export/rmtab.c +index 0ce3682..e11a22a 100644 +--- a/support/export/rmtab.c ++++ b/support/export/rmtab.c +@@ -31,10 +31,10 @@ rmtab_read(void) + int htype; + + htype = client_gettype(rep->r_client); +- if (htype == MCL_FQDN || (htype == MCL_SUBNETWORK ++ if ((htype == MCL_FQDN || htype == MCL_SUBNETWORK) + && (hp = gethostbyname (rep->r_client)) + && (hp = hostent_dup (hp), +- (exp = export_allowed (hp, rep->r_path))))) { ++ exp = export_allowed (hp, rep->r_path))) { + /* see if the entry already exists, otherwise this was an instantiated + * wild card, and we must add it + */ diff --git a/nfs-utils.spec b/nfs-utils.spec index 130888d..efcd9d4 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.1.2 -Release: 6%{?dist} +Release: 8%{?dist} Epoch: 1 # group all 32bit related archs @@ -52,6 +52,7 @@ Patch117: nfs-utils-1.1.2-mountstats.patch Patch118: nfs-utils-1.1.2-mountstats-rdma.patch Patch119: nfs-utils-1.1.2-nfs-iostat.patch Patch120: nfs-utils-1.1.2-nfs-iostat-rdma.patch +Patch121: nfs-utils-1.1.2-rmtab-fqdn.patch %if %{enablefscache} Patch90: nfs-utils-1.1.0-mount-fsc.patch @@ -132,6 +133,7 @@ This package also contains the mount.nfs and umount.nfs program. %patch118 -p1 %patch119 -p1 %patch120 -p1 +%patch121 -p1 %if %{enablefscache} %patch90 -p1 @@ -299,6 +301,9 @@ fi %attr(4755,root,root) /sbin/umount.nfs4 %changelog +* Wed Jun 25 2008 Steve Dickson 1.1.2-8 +- FQDNs in the rmtab causes exportfs to seg fault (bz 444275) + * Mon Jun 23 2008 Steve Dickson 1.1.2-7 - Added -D_FILE_OFFSET_BITS=64 to CFLAGS - make nfsstat read and print stats as unsigned integers