summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2021-05-28 22:44:28 +1200
committerAndrew Bartlett <abartlet@samba.org>2021-06-29 02:19:35 +0000
commit8b3d2556dad5f97d1ba7186b9f4504d0ecc57d55 (patch)
treed690705c0b3196b52c9dec7e0789433d83c64746
parent9fb87134b8c3455940d502e13aa622234cf37b2c (diff)
downloadsamba-8b3d2556dad5f97d1ba7186b9f4504d0ecc57d55.tar.gz
rpc dnsserver: updates reset more than timestamp
This is based on observed Windows behaviour. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r--source4/rpc_server/dnsserver/dnsdb.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source4/rpc_server/dnsserver/dnsdb.c b/source4/rpc_server/dnsserver/dnsdb.c
index 3323000530f..d040273c1a8 100644
--- a/source4/rpc_server/dnsserver/dnsdb.c
+++ b/source4/rpc_server/dnsserver/dnsdb.c
@@ -590,8 +590,6 @@ WERROR dnsserver_db_update_record(TALLOC_CTX *mem_ctx,
return werr;
}
- arec->dwTimeStamp = 0;
-
ret = ldb_search(samdb, mem_ctx, &res, z->zone_dn, LDB_SCOPE_ONELEVEL, attrs,
"(&(objectClass=dnsNode)(name=%s)(!(dNSTombstoned=TRUE)))",
encoded_name);
@@ -659,6 +657,14 @@ WERROR dnsserver_db_update_record(TALLOC_CTX *mem_ctx,
arec->dwSerial = serial;
}
+ /*
+ * Successful RPC updates *always* zero timestamp and flags and set
+ * version.
+ */
+ arec->dwTimeStamp = 0;
+ arec->version = 5;
+ arec->flags = 0;
+
ndr_err = ndr_push_struct_blob(&el->values[i], mem_ctx, arec,
(ndr_push_flags_fn_t)ndr_push_dnsp_DnssrvRpcRecord);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {