Update DNSSEC timestamp file on process TERM.

This commit is contained in:
Kevin Darbyshire-Bryant
2015-07-27 19:34:23 +01:00
committed by Simon Kelley
parent d6cb7e4815
commit 34b5d19488
3 changed files with 15 additions and 6 deletions

View File

@@ -1321,6 +1321,15 @@ static void async_event(int pipe, time_t now)
if (daemon->lease_stream)
fclose(daemon->lease_stream);
#ifdef HAVE_DNSSEC
/* update timestamp file on TERM if time is considered valid */
if (daemon->back_to_the_future)
{
if (utime(daemon->timestamp_file, NULL) == -1)
my_syslog(LOG_ERR, _("failed to update mtime on %s: %s"), daemon->timestamp_file, strerror(errno));
}
#endif
if (daemon->runfile)
unlink(daemon->runfile);