Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 May 2011 01:56:46 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r222089 - stable/8/sys/nfs
Message-ID:  <201105190156.p4J1uk84017583@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105190156.p4J1uk84017583>