From owner-svn-src-stable-8@FreeBSD.ORG Mon Jun 6 21:51:36 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34990106566C; Mon, 6 Jun 2011 21:51:36 +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 243648FC08; Mon, 6 Jun 2011 21:51:36 +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 p56LpaNA050555; Mon, 6 Jun 2011 21:51:36 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p56Lpak1050553; Mon, 6 Jun 2011 21:51:36 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201106062151.p56Lpak1050553@svn.freebsd.org> From: Rick Macklem Date: Mon, 6 Jun 2011 21:51:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222789 - stable/8/sys/fs/nfsclient X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jun 2011 21:51:36 -0000 Author: rmacklem Date: Mon Jun 6 21:51:35 2011 New Revision: 222789 URL: http://svn.freebsd.org/changeset/base/222789 Log: MFC: r222233 Set the MNT_NFS4ACLS flag for an NFSv4 client mount if the NFSv4 server supports it. Modified: stable/8/sys/fs/nfsclient/nfs_clvfsops.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/nfsclient/nfs_clvfsops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clvfsops.c Mon Jun 6 21:48:51 2011 (r222788) +++ stable/8/sys/fs/nfsclient/nfs_clvfsops.c Mon Jun 6 21:51:35 2011 (r222789) @@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$"); extern int nfscl_ticks; extern struct timeval nfsboottime; extern struct nfsstats newnfsstats; +extern int nfsrv_useacl; MALLOC_DEFINE(M_NEWNFSREQ, "newnfsclient_req", "New NFS request header"); MALLOC_DEFINE(M_NEWNFSMNT, "newnfsmnt", "New NFS mount struct"); @@ -1327,6 +1328,15 @@ mountnfs(struct nfs_args *argp, struct m if (argp->flags & NFSMNT_NFSV3) ncl_fsinfo(nmp, *vpp, cred, td); + /* Mark if the mount point supports NFSv4 ACLs. */ + if ((argp->flags & NFSMNT_NFSV4) != 0 && nfsrv_useacl != 0 && + ret == 0 && + NFSISSET_ATTRBIT(&nfsva.na_suppattr, NFSATTRBIT_ACL)) { + MNT_ILOCK(mp); + mp->mnt_flag |= MNT_NFS4ACLS; + MNT_IUNLOCK(mp); + } + /* * Lose the lock but keep the ref. */