1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

forest_update: ignore ldb.ERR_ATTRIBUTE_OR_VALUE_EXISTS in operation_ldif()

This matches what Windows is doing...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Stefan Metzmacher 2023-02-23 15:11:55 +01:00 committed by Andrew Bartlett
parent 7fe87d3c8d
commit 838a36c743

View File

@ -294,7 +294,14 @@ objectClass: container
print("UPDATE (LDIF) ------ OPERATION %d" % op)
print(sub_ldif)
self.samdb.modify_ldif(sub_ldif)
try:
self.samdb.modify_ldif(sub_ldif)
except ldb.LdbError as e:
(num, msg) = e.args
if num != ldb.ERR_ATTRIBUTE_OR_VALUE_EXISTS:
raise e
pass
if self.add_update_container:
self.update_add(op)