From tom@haven.uniserve.com  Wed Jun 21 15:48:55 1995
Received: from haven.uniserve.com (haven.uniserve.com [198.53.215.121])
          by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id PAA11605
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 21 Jun 1995 15:48:51 -0700
Received: by haven.uniserve.com id <30740>; Wed, 21 Jun 1995 15:49:40 +0100
Message-Id: <95Jun21.154940+0100_pdt.30740+2018@haven.uniserve.com>
Date: Wed, 21 Jun 1995 15:49:29 +0100
From: tom@haven.uniserve.com
Sender: Tom Samplonius <tom@haven.uniserve.com>
Reply-To: tom@haven.uniserve.com
To: FreeBSD-gnats-submit@freebsd.org
Subject:
X-Send-Pr-Version: 3.2

>Number:         539
>Category:       bin
>Synopsis:       
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs (FreeBSD bugs mailing list)
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 21 15:50:00 1995
>Closed-Date:    Wed Jun 21 16:55:00 PDT 1995
>Last-Modified:
>Originator:     Tom Samplonius
>Release:        FreeBSD 2.0.5-RELEASE
>Organization:
	UNIServe
>Environment:


>Description:

  finger scans every home direcotry for .nofinger rather than checking
home directories of the users that actually match.

>How-To-Repeat:

  Use finger with large number of users

>Fix:
	
	Only check home directories if they match.  The following patch
moves the hide() call just after the match() call so that only home directories
of matched users get checked.

*** finger.c.old	Wed Jun 21 14:19:50 1995
--- finger.c	Wed Jun 21 14:29:14 1995
***************
*** 261,270 ****
  				    "finger: %s: no such user\n", *p);
  	else {
  		while (pw = getpwent()) {
- 			if (hide (pw))
- 				continue;
  			for (p = argv, ip = used; *p; ++p, ++ip)
! 				if (match(pw, *p)) {
  					enter_person(pw);
  					*ip = 1;
  				}
--- 261,268 ----
  				    "finger: %s: no such user\n", *p);
  	else {
  		while (pw = getpwent()) {
  			for (p = argv, ip = used; *p; ++p, ++ip)
! 				if (match(pw, *p) && !hide(pw)) {
  					enter_person(pw);
  					*ip = 1;
  				}
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ache 
State-Changed-When: Wed Jun 21 16:55:00 PDT 1995 
State-Changed-Why:  
Fix applied in finger.c rev 1.6 
>Unformatted:



	finger checks every home directory for .nofinger
