[comp.bugs.4bsd] finger @@@@@@@@

mkkam@menkae.cs.uh.edu (Francis Kam) (11/13/88)

I tried:
	% finger @@@@@@@@@@@@@
on a sun 3/50 running SunOS4.0 and got as many finger processes running
as the number of '@' at the command line.

That might not be a bug, but quite undesirable to me.


-------------
Francis Kam                           CSC-3475
Internet: mkkam@cs.uh.edu             Computer Science Department
          mkkam@sun1.cs.uh.edu        University of Houston
CSNET:    mkkam@houston.csnet         4800 Calhoun
Phone: (713)749-1748                  Houston, TX 77004.
       (713)749-4791

ddl@husc6.harvard.edu (Dan Lanciani) (11/14/88)

In article <968@uhnix1.uh.edu>, mkkam@menkae.cs.uh.edu (Francis Kam) writes:
| I tried:
| 	% finger @@@@@@@@@@@@@
| on a sun 3/50 running SunOS4.0 and got as many finger processes running
| as the number of '@' at the command line.
| 
| That might not be a bug, but quite undesirable to me.

	If you find it undesirable, then don't type it.  Sorry, I couldn't
resist...  In any case, this is not a bug but a combination of two features.
For a long time the target of a remote finger could itself be a remote
finger.  This is extremely useful for getting to systems on different
networks, e.g., finger @oz@xx.lcs.mit.edu when oz was a real chaos net
host.  In Sun OS 4.0, the null hostname appears to be treated as the
local host so you see the @@@@ effect.  In any case, please don't
fix the former feature...

					Dan Lanciani
					ddl@harvard.*

guy@auspex.UUCP (Guy Harris) (11/16/88)

>In Sun OS 4.0, the null hostname appears to be treated as the
>local host so you see the @@@@ effect.

This appears to be generic to 4.3BSD; the routine "inet_addr" returns 0
when handed a null string.  A null hostname gets passed to
"gethostbyname", which quite reasonably says "no such host"; "finger"
than tries handing it to "inet_addr", which returns 0 rather than -1.

I don't see any reason why "inet_addr" shouldn't reject a null string -
if there isn't at least *one* digit in the string, it's hard to see why
it should be considered a valid Internet address specification.