From owner-svn-src-stable-8@FreeBSD.ORG Thu May 19 01:56:46 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 E4691106566B; Thu, 19 May 2011 01:56:46 +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 D345A8FC1A; Thu, 19 May 2011 01:56:46 +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 p4J1ukWs017585; Thu, 19 May 2011 01:56:46 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4J1uk84017583; Thu, 19 May 2011 01:56:46 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105190156.p4J1uk84017583@svn.freebsd.org> From: Rick Macklem Date: Thu, 19 May 2011 01:56:46 +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: r222089 - stable/8/sys/nfs 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: Thu, 19 May 2011 01:56:47 -0000 Author: rmacklem Date: Thu May 19 01:56:46 2011 New Revision: 222089 URL: http://svn.freebsd.org/changeset/base/222089 Log: MFC: r221473 Modify the NFS nfssvc(2) syscall so that it allows anyone to get the statistics for the new NFS subsystem. Modified: stable/8/sys/nfs/nfs_nfssvc.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/nfs/nfs_nfssvc.c ============================================================================== --- stable/8/sys/nfs/nfs_nfssvc.c Thu May 19 01:35:52 2011 (r222088) +++ stable/8/sys/nfs/nfs_nfssvc.c Thu May 19 01:56:46 2011 (r222089) @@ -81,9 +81,12 @@ nfssvc(struct thread *td, struct nfssvc_ AUDIT_ARG_CMD(uap->flag); - error = priv_check(td, PRIV_NFS_DAEMON); - if (error) - return (error); + /* Allow anyone to get the stats. */ + if ((uap->flag & ~NFSSVC_GETSTATS) != 0) { + error = priv_check(td, PRIV_NFS_DAEMON); + if (error != 0) + return (error); + } error = EINVAL; if ((uap->flag & (NFSSVC_ADDSOCK | NFSSVC_OLDNFSD | NFSSVC_NFSD)) && nfsd_call_nfsserver != NULL)