diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2011-05-05 02:00:53 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2011-05-05 02:00:53 +0000 |
commit | a23ee88c7e883a9f49c0feaf28647b0879c4486d (patch) | |
tree | 0472951e3e5435ec0b5d0c9d5f3ac2a9f82e2406 /sys/nfs | |
parent | 205c21e4af42644628c759967231c9df7e732e4e (diff) | |
download | FreeBSD-src-a23ee88c7e883a9f49c0feaf28647b0879c4486d.zip FreeBSD-src-a23ee88c7e883a9f49c0feaf28647b0879c4486d.tar.gz |
Modify the NFS nfssvc(2) syscall so that it allows
anyone to get the statistics for the new NFS subsystem.
MFC after: 2 weeks
Diffstat (limited to 'sys/nfs')
-rw-r--r-- | sys/nfs/nfs_nfssvc.c | 9 |
1 files changed, 6 insertions, 3 deletions
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) |