Chroot
running a chrooted aolserver process under strace:
- *
strace -f -e file aolserver4-nsd -f -u www-data -g www-data -r /var/lib/aolserver4/main -b localhost:8000 -t /etc/aolserver4/main.tcl
- I got following file-systems accesses after the chroot call:
- /proc/sys/kernel/ngroups_max:
- /etc/group:
- /usr/lib/locale/locale-archive:
- /usr/share/locale/locale.alias:
- following this: looking for several locales like: * /usr/lib/locale/de@euro/LC_CTYPE
- /usr/lib/tcl8.4/encoding/iso8859-1.enc:
- finally this one
- /usr/lib/tcl8.4/init.tcl:
- it is fatal not to have this file!
- /etc/localtime:
- this shows up as error in the logfiles
- /dev/null:
- after loadings nscgi, it is fatal not to have this device!
Thoughts:
mkdir -p SERVER_HOME && cd SERVER_HOME mkdir proc dev etc mkdir -p usr/lib/tcl8.4 mknod -m 666 dev/null c 1 3 cp /etc/localtime etc cp -a /usr/lib/tcl8.4/encoding usr/lib/tcl8.4 :> usr/lib/tcl8.4/init.tcl # empty file getent group www-data > etc/group mount -t proc proc proc # on startup? eek: ngroups_max is not in my /proc!
library loading
- /usr/lib/tcl8.4/init.tcl
- log/error.log
- log/pid
- bin/*.so - dynamic libraries:
- nssock
- nslog: etc/localtime, log/domain/access.log
- nscgi: dev/null, cgi-bin
- usr/lib/tcl8.4/init.tcl
- bin/init.tcl (dynamic libs)
- TCL-libraries
- bin/init.tcl
- modules/tcl/init.tcl
- domain/tcl/init.tcl
- modules/tcl/.tcl
- domain/tcl/.tcl * from here only loaded modules lib
- modules/tcl/lib/init.tcl
- domain/tcl/lib/init.tcl
- modules/tcl/lib/.tcl
- domain/tcl/lib/.tcl