bsd-finger-0.10-25 has code for compliance with an obscure feature of RFC742, which, roughly paraphrased, states that "/w" or "/W" is equivalent to "-l". The code simply overwrites the "/w" with the "-l" before passing the args to the finger command, which knows nothing of "/w". However, this results in finger requests of the form "finger /wuser@machine" becoming "-luser" instead of "-l user".
Does this problem persist in the latest finger-0.16-1 package in Raw Hide? I'm not quite sure how to test, so, if you can supply a working test case, I'd be grateful.
Fixed in finger-0.16-2. Thanks for the patch.
The bug was fixed in finger-0.16-2, but it has now reappeared in finger-0.16-5 for RedHat v6.2. Here, again, is the patch: This patch fixes the code for compliance with an obscure feature of RFC742, which, roughly paraphrased, states that "/w" or "/W" is equivalent to "-l". The previous code simply overwrites the "/w" with the "-l" before passing the args to the finger command, which knows nothing of "/w". This patch adds in a space, so that "/wuser" is expanded to "-l user" instead of "-luser", which would not be understood by finger. --- bsd-finger-0.16/fingerd/fingerd.c Sun Dec 12 13:46:28 1999 +++ bsd-finger-0.16/fingerd/fingerd.c Thu May 18 01:56:54 2000 @@ -214,7 +214,12 @@ av[k++] = "finger"; for (s = strtok(line, WS); s && k<ENTRIES; s = strtok(NULL, WS)) { /* RFC742: "/[Ww]" == "-l" */ - if (!strncasecmp(s, "/w", 2)) memcpy(s, "-l", 2); + if (!strncasecmp(s, "/w", 2)) + { + if (k < ENTRIES - 1) + av[k++] = "-l"; + s += 2; + } if (!forwarding) { t = strchr(s, '@'); if (t) {
This is still an issue in Rawhide finger (0.17-0.1).
Fixed in finger-0.17-3. Thanks (again) for the patch.
I can't verify that with finger 0.17-3. finger /W user and finger /w user produce correct results, but not finger /Wuser or finger /wuser The just return "unknown user".
Executing a "finger /wuser" should be expected to return "unknown user". The "/w" is really not proper Linux/Unix command line style. The issue is that the finger daemon must translate /w's incoming from other systems. Therefore, the appropriate test is "finger /wuser@machine".
*** Bug 14002 has been marked as a duplicate of this bug. ***
My bad. One always learns something. Could verify correct /wuser@machine and /Wuser@machine behavior when fingering from another machine. Closing this.