1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-30 19:42:05 +03:00

rpc dns: reset dword aging related zone properties

This allows a user to set zone properties relevant to DNS record aging over RPC.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10812

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Aaron Haslett
2018-07-03 15:34:32 +12:00
committed by Andrew Bartlett
parent b22ce97686
commit d6e111ff42
6 changed files with 137 additions and 9 deletions

View File

@ -1040,6 +1040,7 @@ class TestZones(DNSTest):
self.set_params(zone=self.zone, Aging=0)
dec = 2
def mod_ts(rec):
self.assertTrue(rec.dwTimeStamp > 0)
rec.dwTimeStamp -= dec
self.ldap_modify_dnsrecs(name, mod_ts)
after_mod = self.ldap_get_dns_records(name)
@ -1064,10 +1065,12 @@ class TestZones(DNSTest):
AllowUpdate = dnsp.DNS_ZONE_UPDATE_UNSECURE)
before_mod = self.dns_update_record(name, txt)
def mod_ts(rec):
self.assertTrue(rec.dwTimeStamp > 0)
rec.dwTimeStamp -= interval/2
self.ldap_modify_dnsrecs(name, mod_ts)
update_during_norefresh = self.dns_update_record(name, txt)
def mod_ts(rec):
self.assertTrue(rec.dwTimeStamp > 0)
rec.dwTimeStamp -= interval + interval/2
self.ldap_modify_dnsrecs(name, mod_ts)
update_during_refresh = self.dns_update_record(name, txt)
@ -1098,6 +1101,7 @@ class TestZones(DNSTest):
rec = self.dns_update_record(name,txt)
rec = self.dns_update_record(name+'2',txt)
def mod_ts(rec):
self.assertTrue(rec.dwTimeStamp > 0)
rec.dwTimeStamp -= interval*5
self.ldap_modify_dnsrecs(name, mod_ts)
dsdb._scavenge_dns_records(self.samdb)