I'm running the following configuration:
binutils - 2.16.1
gcc - 3.4.4
glibc - 2.3.5
kernel - debian 2.6.8
on a m68k mvme177 box.

My inetd (from busybox) keeps failing on a getservbyname call.  I have
all 
my executables _statically_ linked.

Here's a look at my environment:

> ls -lt lib

lrwxrwxrwx    1 tfierst  atc            11 Jun  7 18:22 ld.so.1 ->
ld-2.3.5.so
-rwxr-xr-x    1 tfierst  atc        334061 Jun  7 18:21 ld-2.3.5.so
lrwxrwxrwx    1 tfierst  atc            18 Jun  7 18:20 libnss_compat.so
-> libnss_compat.so.2
lrwxrwxrwx    1 tfierst  atc            22 Jun  7 18:20
libnss_compat.so.2 -> libnss_compat-2.3.5.so
lrwxrwxrwx    1 tfierst  atc            15 Jun  7 18:20 libnss_dns.so ->
libnss_dns.so.2
lrwxrwxrwx    1 tfierst  atc            19 Jun  7 18:20 libnss_dns.so.2
-> libnss_dns-2.3.5.so
lrwxrwxrwx    1 tfierst  atc            17 Jun  7 18:20 libnss_files.so
-> libnss_files.so.2
lrwxrwxrwx    1 tfierst  atc            21 Jun  7 18:20
libnss_files.so.2 -> libnss_files-2.3.5.so
lrwxrwxrwx    1 tfierst  atc            18 Jun  7 18:20 libnss_hesiod.so
-> libnss_hesiod.so.2
lrwxrwxrwx    1 tfierst  atc            22 Jun  7 18:20
libnss_hesiod.so.2 -> libnss_hesiod-2.3.5.so
lrwxrwxrwx    1 tfierst  atc            19 Jun  7 18:20
libnss_nisplus.so -> libnss_nisplus.so.2
lrwxrwxrwx    1 tfierst  atc            23 Jun  7 18:20
libnss_nisplus.so.2 -> libnss_nisplus-2.3.5.so
lrwxrwxrwx    1 tfierst  atc            15 Jun  7 18:20 libnss_nis.so ->
libnss_nis.so.2
lrwxrwxrwx    1 tfierst  atc            19 Jun  7 18:20 libnss_nis.so.2
-> libnss_nis-2.3.5.so
-rwxr-xr-x    1 tfierst  atc         75936 Apr 26 16:52
libnss_compat-2.3.5.so
-rwxr-xr-x    1 tfierst  atc        227728 Apr 26 16:52
libnss_nisplus-2.3.5.so
-rwxr-xr-x    1 tfierst  atc        190299 Apr 26 16:52
libnss_nis-2.3.5.so
-rwxr-xr-x    1 tfierst  atc         55483 Apr 26 16:52
libnss_hesiod-2.3.5.so
-rwxr-xr-x    1 tfierst  atc        131088 Apr 26 16:52
libnss_files-2.3.5.so
-rwxr-xr-x    1 tfierst  atc         40325 Apr 26 16:52
libnss_dns-2.3.5.so

> cat /etc/services

telnet 23/tcp

> cat /etc/inetd.conf

telnet stream tcp nowait root /usr/sbin/telnetd telnetd

> cat /etc/ld.so.conf
/lib

I have the following line in my etc/protocols file:

tcp     6       TCP             # transmission control protocol

> cat /etc/nsswitch.conf

# /etc/nsswitch.files:
#
# An example file that could be copied over to /etc/nsswitch.conf; #
passwd:     files ldap
shadow:     files ldap
group:      files
hosts:      files dns
ipnodes:    files
networks:   files
protocols:  files
rpc:        files
ethers:     files
netmasks:   files
bootparams: files
publickey:  files
# At present there isn't a 'files' backend for netgroup;  the system
will
#   figure it out pretty quickly, and won't use netgroups at all.
netgroup:   files
automount:  files
aliases:    files
services:   files
sendmailvars:   files
printers:       user files
auth_attr:  files
prof_attr:  files
project:    files
 
I have executed the ldconfig command, which creates my /etc/ld.so.cache
file.  It 
seems correct when I do an ldconfig -p.

I do not think this is a problem with my inetd.  I ran the following
code 
(compiled statically):

#include <stdio.h>
#include <netdb.h>

int main(void) {
   struct servent *sp;

   printf("testing getserverbyname.....\n");

   sp = getservbyname("telnet", "tcp");
   if (sp == 0) {
      printf("getservbyname failed\n");
   } else {
      printf("getservbyname passed\n");
   }
   return 0;
}
 
This prints the failed statement.  Thus there is a problem with
getservbyname.
 
Permissions are OK on all /etc files.  I can successfully read from the
/etc/services 
file from above program.
 
Is there anything I'm not thinking of as far as getting the libnss_*
libraries to run 
dynamically with a statically linked executable?

Is there any other configuration files I need to worry about?  I'm
coming up from 
scratch, so maybe I'm missing something else (device nodes, other config
files, ...?).

Is this the proper mailing list to post to with this type of question?

Any help would be GREATLY appreciated.

-Tim

-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to