Date: Thu, 5 May 2011 02:00:53 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r221473 - head/sys/nfs Message-ID: <201105050200.p4520rvf076632@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105050200.p4520rvf076632>