diff options
Diffstat (limited to 'source4/lib/ldb/ldb_tdb')
-rw-r--r-- | source4/lib/ldb/ldb_tdb/ldb_index.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_index.c b/source4/lib/ldb/ldb_tdb/ldb_index.c index c02e74b61d..8578e06c0d 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_index.c +++ b/source4/lib/ldb/ldb_tdb/ldb_index.c @@ -199,6 +199,14 @@ static int ltdb_dn_list_store_full(struct ldb_module *module, struct ldb_dn *dn, struct ldb_message *msg; int ret; + if (list->count == 0) { + ret = ltdb_delete_noindex(module, dn); + if (ret == LDB_ERR_NO_SUCH_OBJECT) { + return LDB_SUCCESS; + } + return ret; + } + msg = ldb_msg_new(module); if (!msg) { ldb_module_oom(module); |