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 diff -urN bsd-finger-0.17/finger/finger.c bsd-finger-0.17.new/finger/finger.c
7 --- bsd-finger-0.17/finger/finger.c Sat Dec 18 17:41:51 1999
8 +++ bsd-finger-0.17.new/finger/finger.c Thu Oct 26 02:05:22 2000
10 * traverse the list of possible login names and check the login name
11 * and real name against the name specified by the user.
14 - for (i = 0; i < argc; i++)
15 - if (used[i] >= 0 && (pw = getpwnam(argv[i]))) {
16 - if (!check_nofinger(pw)) {
20 + for (i = 0; i < argc; i++)
21 + if (used[i] >= 0 && (pw = getpwnam(argv[i]))) {
22 + if (!check_nofinger(pw)) {
26 - } else for (pw = getpwent(); pw; pw = getpwent())
28 + if (!mflag) for (pw = getpwent(); pw; pw = getpwent())
29 for (i = 0; i < argc; i++)
31 (!strcasecmp(pw->pw_name, argv[i]) ||