git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
936c8f3
)
s4-ldb: delete empty index records
author
Andrew Tridgell
<tridge@samba.org>
Thu, 22 Oct 2009 00:14:36 +0000
(11:14 +1100)
committer
Andrew Tridgell
<tridge@samba.org>
Thu, 22 Oct 2009 01:47:54 +0000
(12:47 +1100)
source4/lib/ldb/ldb_tdb/ldb_index.c
patch
|
blob
|
history
diff --git
a/source4/lib/ldb/ldb_tdb/ldb_index.c
b/source4/lib/ldb/ldb_tdb/ldb_index.c
index c02e74b61db55d53bf9e3c7f9f75f0483cfe6e2a..8578e06c0de368e327ef56155f445af290514503 100644
(file)
--- 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);