[Date Prev][Date Next]
Re: backend private data
David Parker writes:
> It looks like all of the existing backends grab a backend-specific
> pointer from op->o_bd->be_private in, for instance, their bind
If they need backend-specific data, yes.
> At what point in the request processing does the
> op->o_bd->be_private pointer get populated?
Typically you'll malloc it and set default values in bi->bi_db_init,
fill it in bi->bi_db_config, and destroy it in bi->bi_db_destroy.
See e.g. back-bdb/init.c.
> In back-ldap, for example, the be_private is being cast to a "struct
> ldapinfo *", but I don't see anywhere in the slapd directory that
> knows about this type,
The type is defined by a .h file in the backend. It contains whatever
data the backend needs to know about which is specific to backend and
therefore not known by slapd proper.