diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-12-19 17:33:13 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2013-01-01 19:28:06 +0100 |
commit | e7a26d02413005294180a1d9cd4c90d4ac4d9733 (patch) | |
tree | 28f2927d38311ae5ba9a34f98a5527c867015fd0 /source4 | |
parent | 81fa179b155a62f2f652fbb1fc4978c9f6eb5462 (diff) | |
download | samba-e7a26d02413005294180a1d9cd4c90d4ac4d9733.tar.gz samba-e7a26d02413005294180a1d9cd4c90d4ac4d9733.tar.bz2 samba-e7a26d02413005294180a1d9cd4c90d4ac4d9733.zip |
s4:dsdb/common: use 01.01.1970 as last_sync_success for our entry in the uptodatevector
This matches a Windows 2008R2 and 2012 server.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/common/util.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index 894fd3ccfb..2b96bd431e 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -3489,7 +3489,8 @@ int dsdb_load_udv_v2(struct ldb_context *samdb, struct ldb_dn *dn, TALLOC_CTX *m int ret; uint64_t highest_usn = 0; const struct GUID *our_invocation_id; - struct timeval now = timeval_current(); + static const struct timeval tv1970; + NTTIME nt1970 = timeval_to_nttime(&tv1970); ret = ldb_search(samdb, mem_ctx, &r, dn, LDB_SCOPE_BASE, attrs, NULL); if (ret != LDB_SUCCESS) { @@ -3540,7 +3541,7 @@ int dsdb_load_udv_v2(struct ldb_context *samdb, struct ldb_dn *dn, TALLOC_CTX *m for (i=0; i<*count; i++) { if (GUID_equal(our_invocation_id, &(*cursors)[i].source_dsa_invocation_id)) { (*cursors)[i].highest_usn = highest_usn; - (*cursors)[i].last_sync_success = timeval_to_nttime(&now); + (*cursors)[i].last_sync_success = nt1970; TYPESAFE_QSORT(*cursors, *count, drsuapi_DsReplicaCursor2_compare); return LDB_SUCCESS; } @@ -3553,7 +3554,7 @@ int dsdb_load_udv_v2(struct ldb_context *samdb, struct ldb_dn *dn, TALLOC_CTX *m (*cursors)[*count].source_dsa_invocation_id = *our_invocation_id; (*cursors)[*count].highest_usn = highest_usn; - (*cursors)[*count].last_sync_success = timeval_to_nttime(&now); + (*cursors)[*count].last_sync_success = nt1970; (*count)++; TYPESAFE_QSORT(*cursors, *count, drsuapi_DsReplicaCursor2_compare); |