svn commit: r221473 - head/sys/nfs
Rick Macklem
rmacklem at FreeBSD.org
Thu May 5 02:00:54 UTC 2011
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)
More information about the svn-src-all
mailing list