From owner-svn-src-stable@FreeBSD.ORG Sun Jan 8 00:42:08 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D67A106566B; Sun, 8 Jan 2012 00:42:08 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 00B7E8FC0A; Sun, 8 Jan 2012 00:42:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q080g7sT063297; Sun, 8 Jan 2012 00:42:07 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q080g7nD063295; Sun, 8 Jan 2012 00:42:07 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201201080042.q080g7nD063295@svn.freebsd.org> From: Rick Macklem Date: Sun, 8 Jan 2012 00:42:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229799 - stable/9/sys/fs/nfsserver X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2012 00:42:08 -0000 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;