aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/finger
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2000-10-05 15:56:13 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2000-10-05 15:56:13 +0000
commit0272ef9b3ebcbef923da25f616487b43b3660980 (patch)
tree9886f6e384687a46c893f66faca24b6846eeb38b /usr.bin/finger
parent253315a5a30d5e5d33bc6a98659df0ebfe5d4b93 (diff)
downloadsrc-0272ef9b3ebcbef923da25f616487b43b3660980.tar.gz
src-0272ef9b3ebcbef923da25f616487b43b3660980.zip
Do not allow `finger -m /somefile' as well.
Notes
Notes: svn path=/head/; revision=66675
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 3ad3a3f84689..be5413138885 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);
}
}