summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb/ldb_tdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/ldb_tdb/ldb_tdb.c')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_tdb.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
index b28d73cbea..34cff41794 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -148,6 +148,10 @@ static int ltdb_add(struct ldb_context *ldb, const struct ldb_message *msg)
ret = ltdb_store(ldb, msg, TDB_INSERT);
+ if (strcmp(msg->dn, "@INDEXLIST") == 0) {
+ ltdb_reindex(ldb);
+ }
+
ltdb_unlock(ldb);
return ret;
@@ -206,6 +210,10 @@ static int ltdb_delete(struct ldb_context *ldb, const char *dn)
ltdb_search_dn1_free(ldb, &msg);
+ if (strcmp(dn, "@INDEXLIST") == 0) {
+ ltdb_reindex(ldb);
+ }
+
ltdb_unlock(ldb);
return ret;
@@ -430,6 +438,10 @@ static int ltdb_modify(struct ldb_context *ldb, const struct ldb_message *msg)
/* we've made all the mods - save the modified record back into the database */
ret = ltdb_store(ldb, &msg2, TDB_MODIFY);
+ if (strcmp(msg2.dn, "@INDEXLIST") == 0) {
+ ltdb_reindex(ldb);
+ }
+
free(tdb_key.dptr);
free(tdb_data.dptr);
ltdb_unpack_data_free(&msg2);