diff options
author | Rick Macklem <rmacklem@FreeBSD.org> | 2011-05-05 02:00:53 +0000 |
---|---|---|
committer | Rick Macklem <rmacklem@FreeBSD.org> | 2011-05-05 02:00:53 +0000 |
commit | 3cea29603d31f10775f8663c21a857bf34f55211 (patch) | |
tree | 0472951e3e5435ec0b5d0c9d5f3ac2a9f82e2406 | |
parent | 9980697a44609f2c70fd6eb03a8d3b3cb36b09fa (diff) | |
download | src-3cea29603d31f10775f8663c21a857bf34f55211.tar.gz src-3cea29603d31f10775f8663c21a857bf34f55211.zip |
Modify the NFS nfssvc(2) syscall so that it allows
anyone to get the statistics for the new NFS subsystem.
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=221473
-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 cb1f37aa6add..4296349f04cb 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) |