From owner-svn-src-head@FreeBSD.ORG Thu May 5 02:00:54 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DC5B1065670; Thu, 5 May 2011 02:00:54 +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 EEF4D8FC0A; Thu, 5 May 2011 02:00:53 +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 p4520rIO076634; Thu, 5 May 2011 02:00:53 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4520rvf076632; Thu, 5 May 2011 02:00:53 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105050200.p4520rvf076632@svn.freebsd.org> From: Rick Macklem Date: Thu, 5 May 2011 02:00:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221473 - head/sys/nfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 02:00:54 -0000 Author: rmacklem Date: Thu May 5 02:00:53 2011 New Revision: 221473 URL: http://svn.freebsd.org/changeset/base/221473 Log: Modify the NFS nfssvc(2) syscall so that it allows anyone to get the statistics for the new NFS subsystem. MFC after: 2 weeks Modified: head/sys/nfs/nfs_nfssvc.c Modified: head/sys/nfs/nfs_nfssvc.c ============================================================================== --- head/sys/nfs/nfs_nfssvc.c Thu May 5 01:16:06 2011 (r221472) +++ head/sys/nfs/nfs_nfssvc.c Thu May 5 02:00:53 2011 (r221473) @@ -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)