From a23ee88c7e883a9f49c0feaf28647b0879c4486d Mon Sep 17 00:00:00 2001 From: rmacklem Date: Thu, 5 May 2011 02:00:53 +0000 Subject: Modify the NFS nfssvc(2) syscall so that it allows anyone to get the statistics for the new NFS subsystem. MFC after: 2 weeks --- sys/nfs/nfs_nfssvc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sys/nfs') diff --git a/sys/nfs/nfs_nfssvc.c b/sys/nfs/nfs_nfssvc.c index cb1f37a..4296349 100644 --- a/sys/nfs/nfs_nfssvc.c +++ b/sys/nfs/nfs_nfssvc.c @@ -81,9 +81,12 @@ nfssvc(struct thread *td, struct nfssvc_args *uap) 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) -- cgit v1.1