]> git.pld-linux.org Git - packages/bsd-finger.git/blob - bsd-finger-exact.patch
- store patches in decompressed files
[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 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 @@
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]))) {
16 -                               if (!check_nofinger(pw)) {
17 -                                       enter_person(pw);
18 -                                       used[i] = 1;
19 -                               }
20 +       for (i = 0; i < argc; i++)
21 +               if (used[i] >= 0 && (pw = getpwnam(argv[i]))) {
22 +                       if (!check_nofinger(pw)) {
23 +                               enter_person(pw);
24 +                               used[i] = 1;
25                         }
26 -       } else for (pw = getpwent(); pw; pw = getpwent())
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]) ||
This page took 0.045843 seconds and 3 git commands to generate.