I think I found a bug in libc.so.4.6.27, which causes problems whenever the
gethostbyname() is called. This bug will show up and give a message "Unknown
server error" when I try to use ftp, telnet, or any client programs to connect
to any host other than those specified in my /etc/hosts. No nameserver can be
used even though /etc/resolv.conf is set up correctly.
Here is how I found it, and how the problem can be duplicated and solved.
I set up SLIP connection early in January when I got a trial licence for
TIA for 14 days. Everything was working correctly at that time. After my trial
licence expired, I switched to term and have been using term since then. Since
then I upgraded my kernel, libc, gcc, dip, etc. to the latest version. Just
recently, I purchased the TIA licence and tried to set up my SLIP connection
again. But my early SLIP setup no longer worked. I could only ftp/telnet to
the hosts specified in my /etc/hosts file, if I use hostname as command line
argument. I could ftp/telnet to any other hosts only if I use IP address as
the command line argument. However, nslookup did works fine with no problem
in name-to-address translation.
After tracing down the problem, I finally found the libc.so.4.6.27 is
the culprit. When gethostbyname() is called, it calls the following
subroutines gethostbyname() --> res_search() --> res_querydomain() -->
res_query() --> res_mkquery() and res_send(). The res_send() is always
return failed when called. The problem can be temparily solved by doing
(1) copying libc.so.4.5.26 into /lib directory,
(2) ln -s /lib/libc.so.4.5.26 /lib/libc.so.4
(3) moving libc.so.4.6.27 out of /lib
The step (3) is necessary. Otherwise, ftp/telnet will still link to the
libc.so.4.6.27. You can know this by using "ldd /bin/ftp". The step (2) and
(3) should be changed in sequence. Otherwise, no command can be
executed without libc.so.4.
The libc.so.4.5.26 can be found at:
I have not pinned down the exact codes which cause the problem. I will do
so if I can find the source code for libc.so.4.5.26. If anybody has the info
please let me know.