diff options
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/ldb/ldb_tdb/ldb_index.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_index.c b/source4/lib/ldb/ldb_tdb/ldb_index.c index a04fb1a8bd..a28e97256f 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_index.c +++ b/source4/lib/ldb/ldb_tdb/ldb_index.c @@ -1223,9 +1223,13 @@ static int ltdb_index_onelevel(struct ldb_module *module, const struct ldb_messa int ltdb_index_add_element(struct ldb_module *module, struct ldb_dn *dn, struct ldb_message_element *el) { + struct ltdb_private *ltdb = talloc_get_type(ldb_module_get_private(module), struct ltdb_private); if (ldb_dn_is_special(dn)) { return LDB_SUCCESS; } + if (!ltdb_is_indexed(ltdb->cache->indexlist, el->name)) { + return LDB_SUCCESS; + } return ltdb_index_add_el(module, ldb_dn_get_linearized(dn), el); } |