[CentOS] Re: Can TFTPD run in a chroot jail?

Mon Jan 14 03:21:54 UTC 2008
Eric B. <ebenze at hotmail.com>

>> I've been struggling with this problem for the last couple of hours and 
>> am
>> nowhere near solving the problem.  I am trying to run a tftp server in a
>> chroot jail.  Now perhaps I am being paranoid, but I would like to have 
>> it
>> launched from within its own jail even if it supposedly does a chroot 
>> itself
>> and runs with a parameterizable user.
>
> there is only one chroot under unix (you can't chroot from the shell
> then in the daemon).
>
> If a service implements chroot correctly, then it is better to use it
> (because it can load the necessary stuff before, so you don't need to
> copy a whole system to the jail).


Thanks for the info.  I looked through the code and realized that it doesn't 
actually chroot at all; just runs with a parameterizable user/group.

After scouring a little more, I found out I needed the /lib/libnss_* 
libraries.  In my particular case, it was the /lib/libnss_files.so.* lib 
that are used by NSS (Name Service Switch) to read the /etc/passwd, group 
and services files.

Thanks!

Eric