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:
a5712ff
)
s4-ldb: don't try to index non-indexed attributes
author
Andrew Tridgell
<tridge@samba.org>
Thu, 22 Oct 2009 01:29:35 +0000
(12:29 +1100)
committer
Andrew Tridgell
<tridge@samba.org>
Thu, 22 Oct 2009 01:47:55 +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 a04fb1a8bd2416f1ebbee435a5b70111d0a0ea96..a28e97256fcdc2979f22a3d94da10b4770f7791b 100644
(file)
--- 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);
}