28 lines
1.0 KiB
Diff
28 lines
1.0 KiB
Diff
|
commit 52ec1b5fceece8f63b97afc6d6b78bfabff12669
|
||
|
Author: Steve Dickson <steved@redhat.com>
|
||
|
Date: Tue Feb 17 15:33:58 2009 -0500
|
||
|
|
||
|
The mount sockaddr len (mnt_salen) is not be set in
|
||
|
nfs_extract_server_addresses() which causes the mount.nfs
|
||
|
command to segmentation fault when a NFS server only
|
||
|
supports UDP mounts.
|
||
|
|
||
|
Signed-off-by: Steve Dickson <steved@redhat.com>
|
||
|
|
||
|
diff -up nfs-utils-1.1.4/utils/mount/stropts.c.orig nfs-utils-1.1.4/utils/mount/stropts.c
|
||
|
--- nfs-utils-1.1.4/utils/mount/stropts.c.orig 2009-02-17 15:55:53.000000000 -0500
|
||
|
+++ nfs-utils-1.1.4/utils/mount/stropts.c 2009-02-17 15:58:15.000000000 -0500
|
||
|
@@ -331,9 +331,10 @@ static int nfs_extract_server_addresses(
|
||
|
return 0;
|
||
|
|
||
|
option = po_get(options, "mountaddr");
|
||
|
- if (option == NULL)
|
||
|
+ if (option == NULL) {
|
||
|
memcpy(mnt_saddr, nfs_saddr, *nfs_salen);
|
||
|
- else if (!nfs_string_to_sockaddr(option, strlen(option),
|
||
|
+ *mnt_salen = *nfs_salen;
|
||
|
+ } else if (!nfs_string_to_sockaddr(option, strlen(option),
|
||
|
mnt_saddr, mnt_salen))
|
||
|
return 0;
|
||
|
|