Modify the NFS nfssvc(2) syscall so that it allows

anyone to get the statistics for the new NFS subsystem.

MFC after:	2 weeks
This commit is contained in:
Rick Macklem 2011-05-05 02:00:53 +00:00
parent 9980697a44
commit 3cea29603d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=221473

View file

@ -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)