summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-12-22 12:13:44 +1100
committerAndrew Tridgell <tridge@samba.org>2010-12-22 04:45:46 +0100
commit987b49c8e201310a563a21d05412d92dbf7b1beb (patch)
treec9c52c0af7cac10317eecc3c5561c8e97ee13f9f /source4
parent88c3e505e997cbb97fdcecbeea241238b2e48f70 (diff)
downloadsamba-987b49c8e201310a563a21d05412d92dbf7b1beb.tar.gz
samba-987b49c8e201310a563a21d05412d92dbf7b1beb.tar.bz2
samba-987b49c8e201310a563a21d05412d92dbf7b1beb.zip
dns: fixed dns record format
based on new WSPP docs from Bryan Burgin Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Wed Dec 22 04:45:46 CET 2010 on sn-devel-104
Diffstat (limited to 'source4')
-rw-r--r--source4/dns_server/dlz_bind9.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source4/dns_server/dlz_bind9.c b/source4/dns_server/dlz_bind9.c
index 83790c8da0..7f5125dbf6 100644
--- a/source4/dns_server/dlz_bind9.c
+++ b/source4/dns_server/dlz_bind9.c
@@ -150,7 +150,7 @@ static bool b9_format(struct dlz_bind9_data *state,
*type = "soa";
/* we need to fake the authoritative nameserver to
- * point at ourselves. This is now AD DNS servers
+ * point at ourselves. This is how AD DNS servers
* force clients to send updates to the right local DC
*/
mname = talloc_asprintf(mem_ctx, "%s.%s",
@@ -1179,6 +1179,7 @@ _PUBLIC_ isc_result_t dlz_addrdataset(const char *name, const char *rdatastr, vo
int ret, i;
struct ldb_message_element *el;
enum ndr_err_code ndr_err;
+ NTTIME t;
if (state->transaction_token != (void*)version) {
state->log(ISC_LOG_INFO, "samba_dlz: bad transaction version");
@@ -1190,9 +1191,13 @@ _PUBLIC_ isc_result_t dlz_addrdataset(const char *name, const char *rdatastr, vo
return ISC_R_NOMEMORY;
}
- /* we're waiting on docs for this field */
- rec->dwFlags = 0x0000f005;
- rec->dwSerial = state->soa_serial;
+ unix_to_nt_time(&t, time(NULL));
+ t /= 10*1000*1000; /* convert to seconds (NT time is in 100ns units) */
+ t /= 3600; /* convert to hours */
+
+ rec->rank = DNS_RANK_ZONE;
+ rec->dwSerial = state->soa_serial;
+ rec->dwTimeStamp = (uint32_t)t;
if (!b9_parse(state, rdatastr, rec)) {
state->log(ISC_LOG_INFO, "samba_dlz: failed to parse rdataset '%s'", rdatastr);