svn commit: r229799 - stable/9/sys/fs/nfsserver
Rick Macklem
rmacklem at FreeBSD.org
Sun Jan 8 00:42:08 UTC 2012
Author: rmacklem
Date: Sun Jan 8 00:42:07 2012
New Revision: 229799
URL: http://svn.freebsd.org/changeset/base/229799
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/9/sys/fs/nfsserver/nfs_nfsdsubs.c
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/amd64/include/xen/ (props changed)
stable/9/sys/boot/ (props changed)
stable/9/sys/boot/i386/efi/ (props changed)
stable/9/sys/boot/ia64/efi/ (props changed)
stable/9/sys/boot/ia64/ski/ (props changed)
stable/9/sys/boot/powerpc/boot1.chrp/ (props changed)
stable/9/sys/boot/powerpc/ofw/ (props changed)
stable/9/sys/cddl/contrib/opensolaris/ (props changed)
stable/9/sys/conf/ (props changed)
stable/9/sys/contrib/dev/acpica/ (props changed)
stable/9/sys/contrib/octeon-sdk/ (props changed)
stable/9/sys/contrib/pf/ (props changed)
stable/9/sys/contrib/x86emu/ (props changed)
Modified: stable/9/sys/fs/nfsserver/nfs_nfsdsubs.c
==============================================================================
--- stable/9/sys/fs/nfsserver/nfs_nfsdsubs.c Sun Jan 8 00:34:39 2012 (r229798)
+++ stable/9/sys/fs/nfsserver/nfs_nfsdsubs.c Sun Jan 8 00:42:07 2012 (r229799)
@@ -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;
More information about the svn-src-stable-9
mailing list