NLnetLabs / nsd

The NLnet Labs Name Server Daemon (NSD) is an authoritative, RFC compliant DNS nameserver.

Home Page:https://nlnetlabs.nl/nsd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add zones without nsd-control

orlitzky opened this issue · comments

If I change one of my zones, I can reload it using systemctl reload nsd. This makes use of systemd's ExecReload, which can be overridden but typically just sends SIGHUP to the daemon's PID. This is especially nice because the unprivileged nsd user is allowed to send SIGHUP to his own process, so changing zones does not require root.

If I add a zone, however, I have to change nsd.conf or one of its include files, and I've noticed that SIGHUP will not cause nsd to "reload" the new zone. Instead, nsd-control refers to that as "reconfig". If nsd-control is not enabled, a full restart of the daemon is therefore required to add a zone, and that requires root.

Is there some way around this? The description of the systemd feature says that it "triggers a configuration reload," and it would be nice if there was a way to force a reconfig instead of just a zone reload using that mechanism. Maybe a reconfig could be triggered with SIGUSR2?

In short, the problem I'm trying to solve is to be able to add new zones locally without root privileges and without nsd-control.

Hi @orlitzky! I'm sorry this slipped through. I'll take a look at this next week.

No problem, it's not urgent, thank you.

We don't add zones that often so I've been logging in as root and restarting the daemon myself as necessary. If the answer turns out to be "use nsd-control" then I can live with that too :)

Hi @orlitzky! Detecting new zones on SIGHUP seems like desired behavior. We'll change the behavior to do that, shouldn't be too hard to do, but I won't get around to it immediately. Thanks for the suggestion 👍

Sounds good, thank you.