mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
dsdb: Refuse to return an all-zero invocationID
This could cause an all-zero GUID to be entered into the replPropertyMetaData, which will then fail to be replicated to other DCs. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
40f99625ee
commit
4022d8632c
@ -1326,6 +1326,14 @@ const struct GUID *samdb_ntds_invocation_id(struct ldb_context *ldb)
|
||||
}
|
||||
|
||||
*invocation_id = samdb_result_guid(res->msgs[0], "invocationId");
|
||||
if (GUID_all_zero(invocation_id)) {
|
||||
if (ldb_msg_find_ldb_val(res->msgs[0], "invocationId")) {
|
||||
DEBUG(0, ("Failed to find our own NTDS Settings invocationId in the ldb!\n"));
|
||||
} else {
|
||||
DEBUG(0, ("Failed to find parse own NTDS Settings invocationId from the ldb!\n"));
|
||||
}
|
||||
goto failed;
|
||||
}
|
||||
|
||||
/* cache the domain_sid in the ldb */
|
||||
if (ldb_set_opaque(ldb, "cache.invocation_id", invocation_id) != LDB_SUCCESS) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user