Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
fmDNS incorrectly writes files in RHEL/Centos 7 chroot setup #346
When fmDNS generates a config it incorrectly writes files to /var/named/chroot/[etc|var]
Under RHEL/Centos 7 named-chroot now creates a lot of bind mounted files.
The issue cropped up when I was dealing with rndc.key, I already had /etc/rndc.key file but when fmDNS generated the config it complained about a existing file and filed to build the config.
So I duplicated the key inside of fmDNS and move /etc/rndc.key out of the way, this time the build completed and the file was written but it was written effectively twice also it wrote in /var/named/chroot/etc named.conf.keys. rndc.key was written once in /etc and second in /var/named/chroot/etc. This caused the service to not start correctly since the include in named.conf to include named.conf.keys could not be found in /etc only in /var/named/chroot/etc.
The output of systemctl
To fix this I had to figure out how named-chroot put together it's list files to bind mount and found this in /usr/libexec
I edited the top of the file and added named.conf.keys, then touched /etc/named.conf.keys to create a empty file. I started the service and it was happy, next ran a build from fmDNS and it was happy, generated the files all correctly.
Then I tested by stopping service and checked /etc/named.conf.keys and sure enough it was populated now. started service and all works.
This leads to question what other files need to be added to that bind list.