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: da...@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++;
                        }
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to