From b098eb82bf4c91aa8a7599cad4b0b6f65e843692 Mon Sep 17 00:00:00 2001 From: Joseph Sutton Date: Fri, 6 Oct 2023 12:45:55 +1300 Subject: [PATCH] s4:dsdb: Fix unreachable code (CID 1435967) Commit ede668e8e24c86f0836dfa5740e76d8aca1e0824 removed this condition for some unexplained reason, causing the following code to become unreachable. Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- source4/dsdb/samdb/ldb_modules/partition.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c index a0a6db48789e..94ff730b4b59 100644 --- a/source4/dsdb/samdb/ldb_modules/partition.c +++ b/source4/dsdb/samdb/ldb_modules/partition.c @@ -428,7 +428,7 @@ static int partition_copy_all_callback_action( * lead to an error */ search_ret = dsdb_module_search_dn(module, ac, &res, dn, NULL, DSDB_FLAG_NEXT_MODULE, req); - if (search_ret != LDB_SUCCESS) { + if (search_ret != LDB_SUCCESS && search_ret != LDB_ERR_NO_SUCH_OBJECT) { return search_ret; }