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
This commit is contained in:
Rick Macklem 2013-06-09 21:54:19 +00:00
parent ed45ea12ca
commit 7c44c1146b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=251585

View File

@ -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++;
}