ACiDAngel
2004-Sep-18 04:16 UTC
[Icecast] TIP: using icecast in chroot mode with YP announcing
> Klaas Jan Wierenga wrote: > > > I'm not using yp directory listings, but I can guess why it is not > > working. > > You're probably missing the libcurl.so library in your chroot jail > > directories. Here's the listing of files I have in the chroot jail: > > Definitely not, I rebuilt the whole lib structure i got from > ldd in my chroot But i always get : > > [2004-09-16 23:15:04] EROR yp/yp_submit_url Got a NAK from > yp_add(Unknown) > (http://dir.xiph.org/cgi-bin/yp-cgi) > > If I switch chroot off everything works fine without any more changes. > > All libs from "ldd icecast" are in the chroot-root in there > right path's > > At first I also thought it is a lib-problem - but I think it > cant be a libraries problem because I already straced the > icecast process with all its childs for libcalls and there's > nothing I can see that fails ... > Can anyone reproduce that ? Is it a bug ?Afte noone could gave me a help I found a solution for myself. In icecast chroot mode the resolving/nscd does not work. Also not, if the libresolv is copied to the icecast chroot. (dunno if this is a chroot problem or if it is a problem/feature in combination with gresecurity kernel patches which i use) If I put hosts in icecastroot/etc and write into that hosts file my yp hostnames it works fine. I announce on xiph and oddsock so I created the following "hosts" file in the chrooted etc dir: 140.211.166.5 dir.xiph.org 66.98.134.94 www.oddsock.org Good luck Ralf
Karl Heyes
2004-Sep-18 04:51 UTC
[Icecast] TIP: using icecast in chroot mode with YP announcing
On Sat, 2004-09-18 at 12:15, ACiDAngel wrote:> Afte noone could gave me a help I found a solution for myself. > In icecast chroot mode the resolving/nscd does not work. > Also not, if the libresolv is copied to the icecast chroot. > (dunno if this is a chroot problem or if it is a problem/feature in > combination with gresecurity kernel patches which i use) > > If I put hosts in icecastroot/etc and write into that hosts file my yp > hostnames it works fine. > I announce on xiph and oddsock so I created the following "hosts" file in > the chrooted etc dir:whenever an app uses a chroot setup, a working environment needs to be setup beforehand, that includes shared libs and any other needed files in /dev, /etc, /bin, and maybe /var and /tmp. The exact layout varies depending on the app and how it's configured. The strace should of shown no connect attempt to the YP servers, but the lack of /etc/nsswitch.conf and /etc/resolv.conf will probably be the problem in that case. karl.