mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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:
parent
ed45ea12ca
commit
7c44c1146b
1 changed files with 3 additions and 0 deletions
|
|
@ -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++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue