Bug 100 - zonec alters RRSIG inception/expiration
zonec alters RRSIG inception/expiration
Status: RESOLVED FIXED
Product: NSD
Classification: Unclassified
Component: Zonec Code
2.3.x
Sun other
: P1 blocker
Assigned To: NSD team
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-15 11:46 CEST by Jakob Schlyter
Modified: 2005-09-26 12:16 CEST (History)
1 user (show)

See Also:


Attachments
Replace timegm call with custom mktime_from_utc function (2.15 KB, patch)
2005-09-16 12:37 CEST, Erik Rozendaal
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jakob Schlyter 2005-09-15 11:46:06 CEST
zonec on sparc alters the RRSIG inception/expiration field while compiling resulting in corrupt zone.

"dig @f.ns.se se soa +dnssec +norec" vs "dig @g.ns.se se soa +dnssec +norec" does not match. we have 
verified that the zonefile contents on f.ns.se and g.ns.se is the same.
Comment 1 Erik Rozendaal 2005-09-15 12:07:06 CEST
Looks like the hour field is shifted by one, which points at some kind of time
zone issue. Zonec tries to compensate for that by using the timegm(3) function.
Is this function available on SPARC?

If not, zonec uses the function defined in compat/timegm.c. This first sets the
TZ variable to the empty string. What is the current value of the TZ variable?
Can you try setting it to the empty string or maybe to 'UTC' or 'GMT' and rerun
zonec? Does this change anything?
Comment 2 Måns Nilsson 2005-09-15 13:02:16 CEST
The TZ is unset. The machine lives in MEST. 
I am running the build under TZ=GMT as I type. 
There is no timegm(3) on Solaris. 
Comment 3 Måns Nilsson 2005-09-15 13:18:04 CEST
Setting TZ=GMT did not help. (yes, remembered to export TZ too.)
Comment 4 Erik Rozendaal 2005-09-16 12:37:12 CEST
Created attachment 24 [details]
Replace timegm call with custom mktime_from_utc function

New timegm implementation (called mktime_from_utc). This code is based on the
Python 2.4.1 Lib/calendar.py timegm code. The compat/timegm.c code (taken from
a Linux man page) does not work correctly.
Comment 5 Miek Gieben 2005-09-26 12:16:34 CEST
Fix is in subversion