Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Jun 2013 13:27:37 +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-9@freebsd.org
Subject:   svn commit: r252114 - stable/9/usr.bin/nfsstat
Message-ID:  <201306231327.r5NDRboQ047848@svn.freebsd.org>

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



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