Bug 4195 - Unbound fails to reload zones when using globing in include.
Unbound fails to reload zones when using globing in include.
Product: unbound
Classification: Unclassified
Component: server
x86_64 FreeBSD
: P5 blocker
Assigned To: unbound team
Depends on:
  Show dependency treegraph
Reported: 2018-10-19 14:52 CEST by Daniel (dmilith) Dettlaff
Modified: 2018-10-22 11:18 CEST (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Daniel (dmilith) Dettlaff 2018-10-19 14:52:07 CEST
Issue is quite simple. I have main Unbound configuration which loads conf files dynamically like this:

include: "/some/dir/*.conf"

Everything works until you send SIGHUP (reload) to the unbound process. Then my local zones are not loaded at all. When I will restart Unbound, it's returning local zones defined under all files in /some/dir/*.conf. So:

include: "/some/dir/*.conf"
include: "/some/dir/explicit-filename.conf"

and HUP works as well.
Comment 1 Daniel (dmilith) Dettlaff 2018-10-19 15:28:17 CEST
It looks like this issue is gone after setting chroot: "". So it's just silent failure when doing reload with chroot enabled.
Comment 2 Wouter Wijngaards 2018-10-22 11:18:31 CEST
Hi Daniel,

This should actually work fine.  It should process the chroot both for non-* and for normal filenames.  Are some of the files really symbolic links?  Symbolic links are not allowed to go outside of the chroot space.  May be (suddenly) resolved inside the chroot after the chroot and thus point to a different location.  On linux, mount --bind can be used.  Or hard links.  Or copies, with the file residing at the position in the chroot.

If there is some way for me to reproduce the issue, I would like to be able to do that to fix the bug; right now the code looks like it should work for globs in the include with chroot.  What (shortened) config makes this happen?

Best regards, Wouter