1 This patch ensures that an exact match will always be checked for,
2 which is necessary for finger to work at all if info about your
3 users is stored in a database for which the nsswitch module doesn't
4 provide the (deprecated) getpwent() functions.
6 --- bsd-finger-0.10/finger/finger.c Sun Apr 11 00:55:54 1999
7 +++ bsd-finger-0.10/finger/finger.c Sun Apr 11 00:57:25 1999
9 * traverse the list of possible login names and check the login name
10 * and real name against the name specified by the user.
13 - for (i = 0; i < argc; i++)
14 - if (used[i] >= 0 && (pw = getpwnam(argv[i]))) {
18 - } else for (pw = getpwent(); pw; pw = getpwent())
19 + for (i = 0; i < argc; i++)
20 + if (used[i] >= 0 && (pw = getpwnam(argv[i]))) {
24 + if (!mflag) for (pw = getpwent(); pw; pw = getpwent())
25 for (i = 0; i < argc; i++)
27 (!strcasecmp(pw->pw_name, argv[i]) ||