mirror of
https://github.com/samba-team/samba.git
synced 2025-01-24 02:04:21 +03:00
getncchanges: improve get_nc_changes_add_links() by checking uSNChanged
This will make a difference once we handle DRSUAPI_DRS_GET_ANC correctly. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
c31777a701
commit
02f11b925c
@ -590,7 +590,7 @@ static WERROR get_nc_changes_add_links(struct ldb_context *sam_ctx,
|
||||
{
|
||||
unsigned int i;
|
||||
TALLOC_CTX *tmp_ctx = NULL;
|
||||
uint64_t uSNChanged = ldb_msg_find_attr_as_int(msg, "uSNChanged", -1);
|
||||
uint64_t uSNChanged = ldb_msg_find_attr_as_uint64(msg, "uSNChanged", 0);
|
||||
bool is_critical = ldb_msg_find_attr_as_bool(msg, "isCriticalSystemObject", false);
|
||||
|
||||
if (replica_flags & DRSUAPI_DRS_CRITICAL_ONLY) {
|
||||
@ -599,6 +599,10 @@ static WERROR get_nc_changes_add_links(struct ldb_context *sam_ctx,
|
||||
}
|
||||
}
|
||||
|
||||
if (uSNChanged <= highest_usn) {
|
||||
return WERR_OK;
|
||||
}
|
||||
|
||||
tmp_ctx = talloc_new(mem_ctx);
|
||||
if (tmp_ctx == NULL) {
|
||||
return WERR_NOT_ENOUGH_MEMORY;
|
||||
|
Loading…
x
Reference in New Issue
Block a user