Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Jan 2012 01:09:00 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r229801 - stable/8/sys/fs/nfsserver
Message-ID:  <201201080109.q08190J0064264@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Sun Jan  8 01:09:00 2012
New Revision: 229801
URL: http://svn.freebsd.org/changeset/base/229801

Log:
  MFC: r228260
  This patch adds a sysctl to the NFSv4 server which optionally disables the
  check for a UTF-8 compliant file name. Enabling this sysctl results in
  an NFSv4 server that is non-RFC3530 compliant, therefore it is not enabled
  by default. However, enabling this sysctl results in NFSv3 compatible
  behaviour and fixes the problem reported by "dan at sunsaturn.com"
  to freebsd-current@ on Nov. 14, 2011 under the subject "NFSV4 readlink_stat".

Modified:
  stable/8/sys/fs/nfsserver/nfs_nfsdsubs.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/fs/nfsserver/nfs_nfsdsubs.c
==============================================================================
--- stable/8/sys/fs/nfsserver/nfs_nfsdsubs.c	Sun Jan  8 00:55:22 2012	(r229800)
+++ stable/8/sys/fs/nfsserver/nfs_nfsdsubs.c	Sun Jan  8 01:09:00 2012	(r229801)
@@ -56,6 +56,13 @@ static nfstype newnfsv2_type[9] = { NFNO
 extern nfstype nfsv34_type[9];
 #endif	/* !APPLEKEXT */
 
+SYSCTL_DECL(_vfs_nfsd);
+
+static int	disable_checkutf8 = 0;
+SYSCTL_INT(_vfs_nfsd, OID_AUTO, disable_checkutf8, CTLFLAG_RW,
+    &disable_checkutf8, 0,
+    "Disable the NFSv4 check for a UTF8 compliant name");
+
 static char nfsrv_hexdigit(char, int *);
 
 /*
@@ -1963,7 +1970,8 @@ nfsrv_parsename(struct nfsrv_descript *n
 		    error = 0;
 		    goto nfsmout;
 		}
-		if (nfsrv_checkutf8((u_int8_t *)bufp, outlen)) {
+		if (disable_checkutf8 == 0 &&
+		    nfsrv_checkutf8((u_int8_t *)bufp, outlen)) {
 		    nd->nd_repstat = NFSERR_INVAL;
 		    error = 0;
 		    goto nfsmout;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201080109.q08190J0064264>