[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#2623: unstable/libc-aout gethostbyaddr broken!



Package: libc4
Version: 4.6.27-11

$ rlogin maneki-neko
klogind[6452]: gethostby*.getanswer: asked for type 12(129.44.80.192.in-addr.arpa), got 5(129.44.80.192.in-addr.arpa)

I've heard similar reports from others on linux systems doing lookups
on this part of the namespace, but this is the first time I actually
saw them. klogind is an a.out-compiled binary, I haven't rebuilt this
package for this particular machine yet (I'll follow up or produce
another bug report when I have the upgrade.) ldd on klogind gives

        libc.so.4 (DLL Jump 4.6pl27) => /lib/libc.so.4.6.27

The bug is that the code has no business complaining about the return
type (and doing any kind of printf is just *wrong* for a library
routine!) *especially* because it is valid to have a CNAME in an
in-addr lookup. If you don't believe me, check out
 ds.internic.net:/internet-drafts/draft-ietf-cidrd-classless-inaddr-00.txt

and especially the text on the first page:

   ...  The proposed
   method is fully compatible with the original DNS lookup mechanisms
   specified in [1], i.e. there is no need to modify the lookup
   algorithm used, and there should be no need to modify any software
   which does DNS lookups either. ...

I haven't determined yet if libc5 is broken in the same way. Sorry to
rant quite so much, it's annoying to have to bounce across machines
just to find a way in to get the background info for this bug. (Note
that while I want to see gethostbyaddr corrected, at a very least, it
must not generate output -- it is wrong for libraries to do so
(especially for libraries used by daemons) and if the file descriptor
isn't in the interface to the function, it shouldn't use it.)

					_Mark_ <eichin@cygnus.com>
					Cygnus Support, Eastern USA



Reply to: