Hello!

Van egy Gentoo, rajta apache2 + mod_chroot + mod_php5. Kivaloan mukodik,
eltekintve a nevfeloldasi problemaktol. Meg jo 3 eve csinaltam egy
apache-ot chrootba (ott az egesz ment abba megfelelo configure
parameterekkel), onnan emlekeztem, hogy kellenek kulonfele lib-ek es
fileok a host /etc mappajabol. Most igy nez ki:

chroot/www/etc:
host.conf
hosts
ld.so.cache
localtime
nsswitch.conf
protocols
resolv.conf

chroot/www/lib:
(a host teljes /lib folderje, bar elvileg eleg lenne a nehany libnss_)

Az etc-ben talalhato szoveges fileok tartalma:

host.conf:
order hosts, bind
mdns off
multi off

hosts:
127.0.0.1       localhost

nsswitch.conf:
hosts:       files dns
protocols:   files
services:    files

resolv.conf es protocols:
(a host rendszerbol masolva 1az1ben, ott jol mukodnek)

Ha php-ben hasznalom a gethostbyname() fv-t, akkor az nem oldja fel a
nevet, csak abban az esetben, hogy ha a paramterben atadott host-ot
felsorolom a chroot/etc/hosts fileban. De a DNS-t mar nem kerdezi meg.

Talalkozott-e mar valaki ezzel, vagy hasonloval? En mar teljesen
tanacstalan vagyok. Ranyomtam strace-t is a kerest kiszolgalo apache
child-ra, s remekul latszik, hogy meg sem probal DNS szerverhez
kapcsolodni. Mindez mod_chroot nelkul zokszo nelkul mukodik.

Thx.
-- 
  LiRul                            http://www.hixsplit.hu/
  Un*x + HIX = hixsplit   Lehet, de nem erdemes nelkule...
_________________________________________________
linux lista      -      [email protected]
http://mlf2.linux.rulez.org/mailman/listinfo/linux

válasz