summaryrefslogtreecommitdiffstats
path: root/usr.bin/finger
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2000-10-05 15:56:13 +0000
committerru <ru@FreeBSD.org>2000-10-05 15:56:13 +0000
commit8f500e6616e65e10ba62ab2b3efe66e981296f45 (patch)
tree0cf52c35f95c37986989277b7f6f784b9567f481 /usr.bin/finger
parentc58e848e281fd52840d1d701eccb7ee3821ddfc9 (diff)
downloadFreeBSD-src-8f500e6616e65e10ba62ab2b3efe66e981296f45.zip
FreeBSD-src-8f500e6616e65e10ba62ab2b3efe66e981296f45.tar.gz
Do not allow `finger -m /somefile' as well.
Diffstat (limited to 'usr.bin/finger')
-rw-r--r--usr.bin/finger/finger.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/finger/finger.c b/usr.bin/finger/finger.c
index 3ad3a3f..be54131 100644
--- a/usr.bin/finger/finger.c
+++ b/usr.bin/finger/finger.c
@@ -333,11 +333,11 @@ userlist(argc, argv)
* gathering the traditional finger information.
*/
if (mflag)
- for (p = argv; *p; ++p) {
- if (**p != '/' || !show_text("", *p, "")) {
+ for (p = argv, ip = used; *p; ++p, ++ip) {
+ if (**p != '/' || *ip == 1 || !show_text("", *p, "")) {
if (((pw = getpwnam(*p)) != NULL) && !hide(pw))
enter_person(pw);
- else
+ else if (!*ip)
warnx("%s: no such user", *p);
}
}
OpenPOWER on IntegriCloud