diff options
author | steve <steve@FreeBSD.org> | 1998-05-25 07:19:07 +0000 |
---|---|---|
committer | steve <steve@FreeBSD.org> | 1998-05-25 07:19:07 +0000 |
commit | 538a48501430532406b95c8fba07528f2db29998 (patch) | |
tree | 183664b90356957247e2389ab26cf0467f6cbecc /usr.bin | |
parent | 759ba2f9e3d68cdd1a885ce5ed0e3338364e5a29 (diff) | |
download | FreeBSD-src-538a48501430532406b95c8fba07528f2db29998.zip FreeBSD-src-538a48501430532406b95c8fba07528f2db29998.tar.gz |
Only allow 'who' and 'who am i' as valid usages.
PR: 6294
Submitted by: Ruslan Ermilov <ru@ucb.crimea.ua>
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/who/who.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/who/who.c b/usr.bin/who/who.c index 90cde1a..10bd580 100644 --- a/usr.bin/who/who.c +++ b/usr.bin/who/who.c @@ -45,7 +45,7 @@ static const char copyright[] = static char sccsid[] = "@(#)who.c 8.1 (Berkeley) 6/6/93"; #endif static const char rcsid[] = - "$Id: who.c,v 1.5 1997/08/26 11:14:57 charnier Exp $"; + "$Id: who.c,v 1.6 1998/04/26 19:10:51 des Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -54,6 +54,7 @@ static const char rcsid[] = #include <locale.h> #include <pwd.h> #include <stdio.h> +#include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> @@ -73,6 +74,9 @@ main(argc, argv) FILE *ufp, *file(); char *t; + if (getopt(argc, argv, "") != -1) + usage(); + (void) setlocale(LC_TIME, ""); switch (argc) { |