Author: rmacklem
Date: Thu May 19 01:56:46 2011
New Revision: 222089
URL: http://svn.freebsd.org/changeset/base/222089

Log:
  MFC: r221473
  Modify the NFS nfssvc(2) syscall so that it allows
  anyone to get the statistics for the new NFS subsystem.

Modified:
  stable/8/sys/nfs/nfs_nfssvc.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/nfs/nfs_nfssvc.c
==============================================================================
--- stable/8/sys/nfs/nfs_nfssvc.c       Thu May 19 01:35:52 2011        
(r222088)
+++ stable/8/sys/nfs/nfs_nfssvc.c       Thu May 19 01:56:46 2011        
(r222089)
@@ -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)
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to