s4:dsdb/common: use LDB_SEQ_HIGHEST_SEQ for our entry in the uptodatevector
authorStefan Metzmacher <metze@samba.org>
Wed, 19 Dec 2012 11:47:43 +0000 (12:47 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 1 Jan 2013 18:28:06 +0000 (19:28 +0100)
We should use the global highestCommittedUSN, not the per partition value.

This matches a Windows 2008R2 and 2012 server.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/common/util.c

index 4543003..894fd3c 100644 (file)
@@ -3487,7 +3487,7 @@ int dsdb_load_udv_v2(struct ldb_context *samdb, struct ldb_dn *dn, TALLOC_CTX *m
        const struct ldb_val *ouv_value;
        unsigned int i;
        int ret;
-       uint64_t highest_usn;
+       uint64_t highest_usn = 0;
        const struct GUID *our_invocation_id;
        struct timeval now = timeval_current();
 
@@ -3530,7 +3530,7 @@ int dsdb_load_udv_v2(struct ldb_context *samdb, struct ldb_dn *dn, TALLOC_CTX *m
                return ldb_operr(samdb);
        }
 
-       ret = dsdb_load_partition_usn(samdb, dn, &highest_usn, NULL);
+       ret = ldb_sequence_number(samdb, LDB_SEQ_HIGHEST_SEQ, &highest_usn);
        if (ret != LDB_SUCCESS) {
                /* nothing to add - this can happen after a vampire */
                TYPESAFE_QSORT(*cursors, *count, drsuapi_DsReplicaCursor2_compare);