]> git.pld-linux.org Git - packages/bsd-finger.git/blame - bsd-finger-exact.patch
- fixed %post, %postun
[packages/bsd-finger.git] / bsd-finger-exact.patch
CommitLineData
f20ea110 1This patch ensures that an exact match will always be checked for,
2which is necessary for finger to work at all if info about your
3users is stored in a database for which the nsswitch module doesn't
4provide the (deprecated) getpwent() functions.
5
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
8@@ -191,13 +191,12 @@
9 * traverse the list of possible login names and check the login name
10 * and real name against the name specified by the user.
11 */
12- if (mflag) {
13- for (i = 0; i < argc; i++)
14- if (used[i] >= 0 && (pw = getpwnam(argv[i]))) {
15- enter_person(pw);
16- used[i] = 1;
17- }
18- } else for (pw = getpwent(); pw; pw = getpwent())
19+ for (i = 0; i < argc; i++)
20+ if (used[i] >= 0 && (pw = getpwnam(argv[i]))) {
21+ enter_person(pw);
22+ used[i] = 1;
23+ }
24+ if (!mflag) for (pw = getpwent(); pw; pw = getpwent())
25 for (i = 0; i < argc; i++)
26 if (used[i] >= 0 &&
27 (!strcasecmp(pw->pw_name, argv[i]) ||
28
This page took 0.874774 seconds and 4 git commands to generate.