[Date Prev][Date Next] [Chronological] [Thread] [Top]

How do I run a query on the bdb database before I've started listening for incoming request?


I've managed to get both my naming contexts up and functional. 

I want to be able to run a query within slapd before I've started listening (before main.c/slapd_daemon()

slapadd and slapcat use these great helper functions bdb_tool_entry_put and bdb_tool_entry_get and the associated bdb_tool_* functions. What I need is the equivalent of a bdb_tool_entry_search function?

I've been grepping through the source and the best function I can find is back_bdb/search.c/search_candidates (which in turn call filter_candidates) which I'm trying to fix up to look like bdb_tool_entry_get/put functions. I need to still translate the ids to a list of entries that I can return back. Ideally I would want to support paged results..

Am I on the right track? Any pointers as to how I could efficiently do this would be much appreciated.