Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Jun 2013 21:54:20 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r251585 - head/usr.bin/nfsstat
Message-ID:  <201306092154.r59LsKeY087754@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Sun Jun  9 21:54:19 2013
New Revision: 251585
URL: http://svnweb.freebsd.org/changeset/base/251585

Log:
  Modify nfsstat.c so that it prints out an error when a non-root
  user attempts to use the "-m" option and it fails.
  
  Requested by:	danny@cs.huji.ac.il
  MFC after:	2 weeks

Modified:
  head/usr.bin/nfsstat/nfsstat.c

Modified: head/usr.bin/nfsstat/nfsstat.c
==============================================================================
--- head/usr.bin/nfsstat/nfsstat.c	Sun Jun  9 18:11:36 2013	(r251584)
+++ head/usr.bin/nfsstat/nfsstat.c	Sun Jun  9 21:54:19 2013	(r251585)
@@ -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++;
 			}



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