]> git.pld-linux.org Git - packages/bsd-finger.git/commitdiff
- patch from rawhide.
authorkloczek <kloczek@pld-linux.org>
Wed, 20 Oct 1999 22:16:31 +0000 (22:16 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    bsd-finger-exact.patch -> 1.1

bsd-finger-exact.patch [new file with mode: 0644]

diff --git a/bsd-finger-exact.patch b/bsd-finger-exact.patch
new file mode 100644 (file)
index 0000000..69c030c
--- /dev/null
@@ -0,0 +1,28 @@
+This patch ensures that an exact match will always be checked for,
+which is necessary for finger to work at all if info about your
+users is stored in a database for which the nsswitch module doesn't
+provide the (deprecated) getpwent() functions.
+
+--- bsd-finger-0.10/finger/finger.c    Sun Apr 11 00:55:54 1999
++++ bsd-finger-0.10/finger/finger.c    Sun Apr 11 00:57:25 1999
+@@ -191,13 +191,12 @@
+        * traverse the list of possible login names and check the login name
+        * and real name against the name specified by the user.
+        */
+-      if (mflag) {
+-              for (i = 0; i < argc; i++)
+-                      if (used[i] >= 0 && (pw = getpwnam(argv[i]))) {
+-                              enter_person(pw);
+-                              used[i] = 1;
+-                      }
+-      } else for (pw = getpwent(); pw; pw = getpwent())
++      for (i = 0; i < argc; i++)
++              if (used[i] >= 0 && (pw = getpwnam(argv[i]))) {
++                      enter_person(pw);
++                      used[i] = 1;
++              }
++      if (!mflag) for (pw = getpwent(); pw; pw = getpwent())
+               for (i = 0; i < argc; i++)
+                       if (used[i] >= 0 &&
+                           (!strcasecmp(pw->pw_name, argv[i]) ||
+
This page took 0.095678 seconds and 4 git commands to generate.