summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb/ldb_tdb.h
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-09-15 10:00:24 -0700
committerAndrew Tridgell <tridge@samba.org>2009-09-15 14:52:00 -0700
commit4861194f39bf826f3405452adc172cf5c240715b (patch)
tree9089bce0f55a9a6026fa2887ff71c61153189abb /source4/lib/ldb/ldb_tdb/ldb_tdb.h
parent6a9c89b3aef02310030ff436cd545eef77b8d1ee (diff)
downloadsamba-4861194f39bf826f3405452adc172cf5c240715b.tar.gz
samba-4861194f39bf826f3405452adc172cf5c240715b.tar.bz2
samba-4861194f39bf826f3405452adc172cf5c240715b.zip
s4-ldb: cope better with corruption of tdb records
When doing an indexed search if we hit a corrupt record we abandoned the indexed search and did a full search. The problem was that we might have sent some records to the caller already, which means the caller ended up with duplicate records. Fix this by returning a search error if indexing returns an error and we have given any records to the caller.
Diffstat (limited to 'source4/lib/ldb/ldb_tdb/ldb_tdb.h')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_tdb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.h b/source4/lib/ldb/ldb_tdb/ldb_tdb.h
index 75034dcf4b..c8c1dad5de 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_tdb.h
+++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.h
@@ -82,7 +82,7 @@ int ltdb_check_at_attributes_values(const struct ldb_val *value);
struct ldb_parse_tree;
-int ltdb_search_indexed(struct ltdb_context *ctx);
+int ltdb_search_indexed(struct ltdb_context *ctx, uint32_t *);
int ltdb_index_add(struct ldb_module *module, const struct ldb_message *msg);
int ltdb_index_del(struct ldb_module *module, const struct ldb_message *msg);
int ltdb_index_one(struct ldb_module *module, const struct ldb_message *msg, int add);