svn commit: r251585 - head/usr.bin/nfsstat
Rick Macklem
rmacklem at FreeBSD.org
Sun Jun 9 21:54:20 UTC 2013
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 at 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++;
}
More information about the svn-src-head
mailing list