]>
Commit | Line | Data |
---|---|---|
f20ea110 | 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. | |
5 | ||
8fec49de JR |
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 | |
9 | @@ -238,15 +238,14 @@ | |
f20ea110 | 10 | * traverse the list of possible login names and check the login name |
11 | * and real name against the name specified by the user. | |
12 | */ | |
13 | - if (mflag) { | |
14 | - for (i = 0; i < argc; i++) | |
15 | - if (used[i] >= 0 && (pw = getpwnam(argv[i]))) { | |
8fec49de JR |
16 | - if (!check_nofinger(pw)) { |
17 | - enter_person(pw); | |
18 | - used[i] = 1; | |
19 | - } | |
f20ea110 | 20 | + for (i = 0; i < argc; i++) |
21 | + if (used[i] >= 0 && (pw = getpwnam(argv[i]))) { | |
8fec49de JR |
22 | + if (!check_nofinger(pw)) { |
23 | + enter_person(pw); | |
24 | + used[i] = 1; | |
25 | } | |
26 | - } else for (pw = getpwent(); pw; pw = getpwent()) | |
f20ea110 | 27 | + } |
28 | + if (!mflag) for (pw = getpwent(); pw; pw = getpwent()) | |
29 | for (i = 0; i < argc; i++) | |
30 | if (used[i] >= 0 && | |
31 | (!strcasecmp(pw->pw_name, argv[i]) || |