.plan

Jeff Forys forys at snake.utah.edu
Sun Aug 27 16:04:16 AEST 1989


In article <2387 at auspex.auspex.com> guy at auspex.auspex.com (Guy Harris) writes:
> > I don't know who fixed 'finger': Berzerkley or our company's hackers.
>
> It was Berkeley - the 4.3 "finger" filters out non-printables in
> ".project" and ".plan" files [...]

Well, not exactly.  While 4.3BSD finger(1) made an attempt at filtering
out non-printables, the actual code (thru Tahoe) doesnt quite work:

	if (isprint(c) || isspace(c))
		putchar(c);
	else
		putchar(c ^ 100);

That last line was obviously a mistake, and people with an abundance of
free time will have little difficulty figuring out how to get escape and
assorted meta characters to "come thru".  The author of that particular
line of code probably meant to do something like:

		putchar(0x7f & (c | 0100));

Fortunately, it appears that the finger program has undergone a complete
rewrite, so future releases of BSD should not have this problem.
---
Jeff Forys @ Unv of Utah/Salt Lake, Comp Sci Dept. (801-581-4280)
forys at cs.utah.edu  -or-  ..!{boulder,decvax,nbires}!utah-cs!forys



More information about the Comp.unix.questions mailing list