changeset 2718:17c511718258

6426980 lx zones can't mount nfsv3 filesystems on linux servers
author edp
date Tue, 12 Sep 2006 20:10:35 -0700
parents ed589a32259d
children 836fea220612
files usr/src/lib/brand/lx/lx_brand/common/mount.c
diffstat 1 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/lib/brand/lx/lx_brand/common/mount.c	Tue Sep 12 19:44:44 2006 -0700
+++ b/usr/src/lib/brand/lx/lx_brand/common/mount.c	Tue Sep 12 20:10:35 2006 -0700
@@ -305,12 +305,6 @@
 		    lx_nmd->nmd_addr.sin_family);
 		return (-ENOTSUP);
 	}
-	if (lx_nmd->nmd_root.lx_fh3_length != 0x20) {
-		lx_unsupported("unsupported nfs mount request, "
-		    "nfs file handle length: 0x%x\n",
-		    lx_nmd->nmd_root.lx_fh3_length);
-		return (-ENOTSUP);
-	}
 	for (i = 0; i < LX_NMD_MAXHOSTNAMELEN; i++) {
 		if (lx_nmd->nmd_hostname[i] == '\0')
 			break;
@@ -372,11 +366,19 @@
 			    options, options_size)) != 0)
 			return (rv);
 
+		if (lx_nmd->nmd_root.lx_fh3_length >
+		    sizeof (nfs_args_fh->fh3.fh3_u.data)) {
+			lx_unsupported("unsupported nfs mount request, "
+			    "nfs file handle length: 0x%x\n",
+			    lx_nmd->nmd_root.lx_fh3_length);
+			return (-ENOTSUP);
+		}
+
 		/* Set the v3 file handle info. */
 		nfs_args_fh->fh3.fh3_length = lx_nmd->nmd_root.lx_fh3_length;
 		bcopy(&lx_nmd->nmd_root.lx_fh3_data,
 		    nfs_args_fh->fh3.fh3_u.data,
-		    sizeof (nfs_args_fh->fh3.fh3_u.data));
+		    lx_nmd->nmd_root.lx_fh3_length);
 	} else {
 		/*
 		 * Assume nfs v2.  Note that this could also be a v1