3909785
am-utils-6.2 - fix nfsv3 fh length in NFS_FH_DREF()
3909785
3909785
From: Ian Kent <ikent@redhat.com>
3909785
3909785
The NFS_FH_DREF() macro for linux uses sizeof(struct nfs_fh) for the
3909785
length of the file handle copy regardless of the version of NFS used.
3909785
3909785
But NFSv3 file handles are 64 bytes and not copying the whole file
3909785
handle can cause automounts to fail.
3909785
3909785
Changing this to use the size of the passed nfs file handle fixes
3909785
the problem.
3909785
3909785
Signed-off-by: Ian Kent <ikent@redhat.com>
3909785
---
3909785
 conf/fh_dref/fh_dref_linux.h |    2 +-
3909785
 1 file changed, 1 insertion(+), 1 deletion(-)
3909785
3909785
diff --git a/conf/fh_dref/fh_dref_linux.h b/conf/fh_dref/fh_dref_linux.h
3909785
index 7ffa5b50..f8fb1a89 100644
3909785
--- a/conf/fh_dref/fh_dref_linux.h
3909785
+++ b/conf/fh_dref/fh_dref_linux.h
3909785
@@ -1,2 +1,2 @@
3909785
 /* $srcdir/conf/fh_dref/fh_dref_linux.h */
3909785
-#define	NFS_FH_DREF(dst, src) memcpy((char *) &(dst.data), (char *) src, sizeof(struct nfs_fh))
3909785
+#define	NFS_FH_DREF(dst, src) memcpy((char *) &(dst.data), (char *) src, sizeof(*src))