diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1999-12-22 22:30:21 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1999-12-22 22:30:21 +0000 |
commit | 4b8455d9a08427e138a1db3a540389143e5cabe1 (patch) | |
tree | 8296cdfa169350099a1a5af5a19ecd985b14df22 /usr.bin/finger/finger.c | |
parent | 68bcea50da3d19a35d62587234c3a7b6dde3d928 (diff) |
Add yet another case when user matching is disabled.
Diffstat (limited to 'usr.bin/finger/finger.c')
-rw-r--r-- | usr.bin/finger/finger.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/usr.bin/finger/finger.c b/usr.bin/finger/finger.c index 487aea33852..cee017d39a6 100644 --- a/usr.bin/finger/finger.c +++ b/usr.bin/finger/finger.c @@ -1,4 +1,4 @@ -/* $OpenBSD: finger.c,v 1.8 1998/07/10 15:45:15 mickey Exp $ */ +/* $OpenBSD: finger.c,v 1.9 1999/12/22 22:30:20 downsj Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -54,7 +54,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)finger.c 5.22 (Berkeley) 6/29/90";*/ -static char rcsid[] = "$OpenBSD: finger.c,v 1.8 1998/07/10 15:45:15 mickey Exp $"; +static char rcsid[] = "$OpenBSD: finger.c,v 1.9 1999/12/22 22:30:20 downsj Exp $"; #endif /* not lint */ /* @@ -73,6 +73,7 @@ static char rcsid[] = "$OpenBSD: finger.c,v 1.8 1998/07/10 15:45:15 mickey Exp $ #include <sys/param.h> #include <sys/file.h> +#include <sys/stat.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -94,6 +95,7 @@ main(argc, argv) extern char *__progname; int ch; char domain[256]; + struct stat sb; oflag = 1; /* default to old "office" behavior */ @@ -129,9 +131,14 @@ main(argc, argv) argc -= optind; argv += optind; - /* if a domainname is set, increment mflag. */ + /* If a domainname is set, increment mflag. */ if ((getdomainname(&domain, sizeof(domain)) == 0) && domain[0]) mflag++; + /* If _PATH_MP_DB is larger than 1MB, increment mflag. */ + if (stat(_PATH_MP_DB, &sb) == 0) { + if (sb.st_size > 1048576) + mflag++; + } (void)time(&now); setpassent(1); |