[afnog] bind on freebsd

Daniel Shaw daniel at afrinic.net
Mon Jan 13 07:14:13 UTC 2014


Hi Frank, I hope you are well!


On Jan 9, 2014, at 16:02, Frank Habicht <geier at geier.ne.tz> wrote:
> 
> On a freebsd 9.2 (x86_64) I run, the bind didn't want to start in chroot
> (/var/named). It started fine with out chroot.
> bind 9.9.4 from ports is installed to replace system bind.
> 
> updating ports didn't help.
> 
> what finally helped was to copy openssl engines libs into the chroot
> (probably bind or openssl is not clever enough to load them before entering
> the chroot) :
> 
> root at stats1:/root # pkill named
> root at stats1:/root # mkdir -p /var/named/usr/local/lib
> root at stats1:/root # cp -r /usr/local/lib/engines /var/named/usr/local/lib
> 
> not sure if there might be a 'cleaner' way...

I don't know if it's "cleaner" or not, but one alternative that *should* work is to use mount_nullfs something like:

# mount_nullfs /usr/local/lib/engines /var/named/usr/local/lib/engines

(where /var/named/usr/local/lib/engines is an empty directory).

Note: I've not tested this on FreeBSD myself, but * have used mount --bind for chroots on Linux in a simalr way. And from what I  understand, mount_nullfs on FreeBSD is roughly equivalent to "mount --bind" on Linux, at least functionally.


Regards,
Daniel





More information about the afnog mailing list