Re: getaddrinfo(3) chroot(2) with root

2014-05-15 Thread Remco
Denis Fondras wrote: Hello all, I am burning my last neurons with a behavior I can't explain. I wonder why getaddrinfo() fails when called after chroot() with root user. I have this piece of code : ... error = getaddrinfo(rpki.liopen.eu, NULL, NULL, ai_out); if

Re: getaddrinfo(3) chroot(2) with root

2014-05-15 Thread Otto Moerbeek
On Wed, May 14, 2014 at 07:41:47PM +0200, Denis Fondras wrote: After chroot, /etc/resolv.conf is no longer available. Thank you very much Ted Vadim. Other daemons like ntpd have a helper process that runs outside chroot and does all of the DNS resolution for them. Ok, I'll

getaddrinfo(3) chroot(2) with root

2014-05-14 Thread Denis Fondras
Hello all, I am burning my last neurons with a behavior I can't explain. I wonder why getaddrinfo() fails when called after chroot() with root user. I have this piece of code : /*--- test.c ---*/ #include sys/types.h #include stdio.h #include sys/socket.h #include netdb.h #include pwd.h int

Re: getaddrinfo(3) chroot(2) with root

2014-05-14 Thread Peter J. Philipp
On 05/14/14 18:57, Denis Fondras wrote: Hello all, I am burning my last neurons with a behavior I can't explain. I wonder why getaddrinfo() fails when called after chroot() with root user. I have this piece of code : /*--- test.c ---*/ #include sys/types.h #include stdio.h #include

Re: getaddrinfo(3) chroot(2) with root

2014-05-14 Thread Ted Unangst
On Wed, May 14, 2014 at 18:57, Denis Fondras wrote: Hello all, I am burning my last neurons with a behavior I can't explain. I wonder why getaddrinfo() fails when called after chroot() with root user. After chroot, /etc/resolv.conf is no longer available. If this an expected behavior, what

Re: getaddrinfo(3) chroot(2) with root

2014-05-14 Thread Denis Fondras
Le 14/05/2014 19:14, Peter J. Philipp a écrit : I wonder if you're using the wrong function. There is gethostbyname for forward lookups? I read it was deprecated. Denis

Re: getaddrinfo(3) chroot(2) with root

2014-05-14 Thread Vadim Zhukov
2014-05-14 20:57 GMT+04:00 Denis Fondras open...@ledeuns.net: Hello all, I am burning my last neurons with a behavior I can't explain. I wonder why getaddrinfo() fails when called after chroot() with root user. I have this piece of code : /*--- test.c ---*/ #include sys/types.h #include

Re: getaddrinfo(3) chroot(2) with root

2014-05-14 Thread Denis Fondras
After chroot, /etc/resolv.conf is no longer available. Thank you very much Ted Vadim. Other daemons like ntpd have a helper process that runs outside chroot and does all of the DNS resolution for them. Ok, I'll look on this side. Thank you, Denis