]> git.pld-linux.org Git - packages/bsd-finger.git/blob - bsd-finger-exact.patch
- changed all BuildRoot definitons
[packages/bsd-finger.git] / bsd-finger-exact.patch
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
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.055223 seconds and 3 git commands to generate.