From: Wouter Wijngaards Date: Mon, 3 Aug 2015 15:00:56 +0000 (+0000) Subject: - Fix mktime in unbound-anchor not using UTC. X-Git-Tag: release-1.5.5rc1~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d38ea6b3a4e326ef2cd8595afcff7bdaacd9d65;p=thirdparty%2Funbound.git - Fix mktime in unbound-anchor not using UTC. git-svn-id: file:///svn/unbound/trunk@3467 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/Makefile.in b/Makefile.in index 40cf9a57d..8b970e392 100644 --- a/Makefile.in +++ b/Makefile.in @@ -168,7 +168,7 @@ HOST_OBJ=unbound-host.lo HOST_OBJ_LINK=$(HOST_OBJ) $(SLDNS_OBJ) $(COMPAT_OBJ_WITHOUT_CTIMEARC4) @WIN_HOST_OBJ_LINK@ UBANCHOR_SRC=smallapp/unbound-anchor.c UBANCHOR_OBJ=unbound-anchor.lo -UBANCHOR_OBJ_LINK=$(UBANCHOR_OBJ) \ +UBANCHOR_OBJ_LINK=$(UBANCHOR_OBJ) parseutil.lo \ $(COMPAT_OBJ_WITHOUT_CTIME) @WIN_UBANCHOR_OBJ_LINK@ TESTBOUND_SRC=testcode/testbound.c testcode/testpkts.c \ daemon/worker.c daemon/acl_list.c daemon/daemon.c daemon/stats.c \ diff --git a/doc/Changelog b/doc/Changelog index 46f4098eb..38e220268 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -2,6 +2,7 @@ - Document in the manual more text about configuring locally served zones. - Fix 5011 anchor update timer after reload. + - Fix mktime in unbound-anchor not using UTC. 30 July 2015: Wouter - please afl-gcc (llvm) for uninitialised variable warning. diff --git a/smallapp/unbound-anchor.c b/smallapp/unbound-anchor.c index 576a30f64..92bfa8428 100644 --- a/smallapp/unbound-anchor.c +++ b/smallapp/unbound-anchor.c @@ -117,6 +117,7 @@ #include "config.h" #include "libunbound/unbound.h" #include "sldns/rrdef.h" +#include "sldns/parseutil.h" #include #ifndef HAVE_EXPAT_H #error "need libexpat to parse root-anchors.xml file." @@ -1328,7 +1329,7 @@ xml_convertdate(const char* str) /* but ignore, (lenient) */ } - t = mktime(&tm); + t = sldns_mktime_from_utc(&tm); if(t == (time_t)-1) { if(verb) printf("xml_convertdate mktime failure\n"); return 0;