On Thu, Oct 22, 2020 at 10:16:28AM -0400, ben wrote:

> Hello, Misc;
> 
> I'm attempting to write a CGI progam in C which uses getaddrinfo(3), however
> upon running the script getaddrinfo doesn't seem to run. I have a feeling this
> is due to linking issues as other have experienced a similar issue with glibc.
> 
> Here is the ldd output of the binary:
> 
> Start            End              Type  Open Ref GrpRef Name
> 00000d8efcc50000 00000d8efcc55000 exe   1    0   0      test
> 00000d910d122000 00000d910d216000 rlib  0    1   0      /usr/lib/libc.so.96.0
> 00000d91079b6000 00000d91079b6000 ld.so 0    1   0      /usr/libexec/ld.so
> 
> I've moved the libraries listed in the ldd command output to the /var/www
> directory for proper chrooting, and still getaddrinfo doesn't work.
> 
> Has anyone experienced this before and is there a possible solution? Thank you
> in advance.
> 
> 
> Ben Raskin.
> 

In these cases ktrace is your friend.

My guess would be your chroot does not contain a etc/resolv.conf
and/ro etc/hosts file and you do not have a resolver running on
127.0.0.1

        -Otto

Reply via email to