mirror of
https://github.com/coredns/coredns.git
synced 2025-11-13 07:22:16 -05:00
This reverts commit c4720b8ad2.
This commit is contained in:
@@ -22,7 +22,6 @@ type Signer struct {
|
||||
origin string
|
||||
dbfile string
|
||||
directory string
|
||||
modTime time.Time
|
||||
jitterIncep time.Duration
|
||||
jitterExpir time.Duration
|
||||
|
||||
@@ -42,11 +41,6 @@ func (s *Signer) Sign(now time.Time) (*file.Zone, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// s.dbfile is a parseable zone file, track the mtime
|
||||
if fi, err := os.Stat(s.dbfile); err == nil {
|
||||
s.modTime = fi.ModTime()
|
||||
}
|
||||
|
||||
mttl := z.Apex.SOA.Minttl
|
||||
ttl := z.Apex.SOA.Header().Ttl
|
||||
inception, expiration := lifetime(now, s.jitterIncep, s.jitterExpir)
|
||||
@@ -121,12 +115,6 @@ func (s *Signer) resign() error {
|
||||
if err != nil && os.IsNotExist(err) {
|
||||
return err
|
||||
}
|
||||
// if modtime of the input zone file has changed, we will also resign.
|
||||
if fi, err := os.Stat(s.dbfile); err == nil {
|
||||
if !s.modTime.IsZero() && fi.ModTime() != s.modTime {
|
||||
return fmt.Errorf("zone's modification time %s; differs from last seen modification time: %s", fi.ModTime().Format(timeFmt), s.modTime.Format(timeFmt))
|
||||
}
|
||||
}
|
||||
|
||||
now := time.Now().UTC()
|
||||
return resign(rd, now)
|
||||
|
||||
Reference in New Issue
Block a user