summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-10-22 12:29:35 +1100
committerAndrew Tridgell <tridge@samba.org>2009-10-22 12:47:55 +1100
commit0fb6e2a52cb681cfdd73c4be16487d1d9d7d8318 (patch)
tree9fea4cd71907cb702de8c9d7e4ab0b04a450a257 /source4/lib/ldb
parenta5712ff673226e0259a7f6fcca4377feb0eabf8f (diff)
downloadsamba-0fb6e2a52cb681cfdd73c4be16487d1d9d7d8318.tar.gz
samba-0fb6e2a52cb681cfdd73c4be16487d1d9d7d8318.tar.bz2
samba-0fb6e2a52cb681cfdd73c4be16487d1d9d7d8318.zip
s4-ldb: don't try to index non-indexed attributes
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_index.c4
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);
}