svn commit: r252114 - stable/9/usr.bin/nfsstat

Rick Macklem rmacklem at FreeBSD.org
Sun Jun 23 13:27:38 UTC 2013


Author: rmacklem
Date: Sun Jun 23 13:27:37 2013
New Revision: 252114
URL: http://svnweb.freebsd.org/changeset/base/252114

Log:
  MFC: r251585
  Modify nfsstat.c so that it prints out an error when a non-root
  user attempts to use the "-m" option and it fails.

Modified:
  stable/9/usr.bin/nfsstat/nfsstat.c
Directory Properties:
  stable/9/usr.bin/nfsstat/   (props changed)

Modified: stable/9/usr.bin/nfsstat/nfsstat.c
==============================================================================
--- stable/9/usr.bin/nfsstat/nfsstat.c	Sun Jun 23 10:51:26 2013	(r252113)
+++ stable/9/usr.bin/nfsstat/nfsstat.c	Sun Jun 23 13:27:37 2013	(r252114)
@@ -133,6 +133,9 @@ main(int argc, char **argv)
 						printf("%s on %s\n%s\n",
 						    mntbuf->f_mntfromname,
 						    mntbuf->f_mntonname, buf);
+					else if (errno == EPERM)
+						errx(1, "Only priviledged users"
+						    " can use the -m option");
 				}
 				mntbuf++;
 			}


More information about the svn-src-stable mailing list