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

Re: Slapd seach process



mark.macdonald.100@strath.ac.uk wrote:

I am trying to understand the slapd search process such that I can experimentally fix the message returned by slapd at design time. At which point does the frontend search.c pass proceedings to the backends?

In particular how does the client-side LDAPMessage structure compare to the server-side SlapReply structure?

I have been trying to follow this code taken from line 398 of servers/slapd/search.c in version 2.2.13

/* actually do the search and send the result(s) */
if ( op->o_bd->be_search && limits_check( op, rs ) == 0 ) {
(op->o_bd->be_search)( op, rs );
} else {
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
"operation not supported within namingContext" );
}


1) what do you mean by "design time"? I'm not quite getting your point.
2) the frontend search passes control to the backend when the be->be_search hook is invoked (which actually is a macro that expands to be->bd_info->bi_op_search). Note however that many changes occurred since the piece of code you're looking at; currently, the control passes to the hook in a BackendDB struct called frontendDB, which may be overridden by an overlay layer called "global overlays" which, in turn, ends up calling the analogous of the piece of code you're seeing above; but that call, as well, could be intecepted by yet another layer of overlays before processing gets to the actual backend.
3) 2.2.13 is pretty old, and things changed much with current code. Unless you have very specific needs, I suggest you develop based on 2.3 (or HEAD) code.


p.


SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497