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

Re: Accessing LDAP attributes inside slapd


  Look at the connection_internal_open() function in
servers/slapd/connection.c.  I needed to do something similar to what you
are doing when I was working on the SASL authorization code.
  The *conn and *ldp are filled in with the Connection info you need for
backend searches and an *LDAP handle to use for reading back the search
results with the clientside LDAP libraries.  Parameter *id is the NDN that
you want to claim to be on the "client" end of the connection.
  Be sure to call connection_internal_close() when you're done.

-Mark Adamson
 Carnegie Mellon

> I want to store some (possibly backend specific) configuration information
> as ldap attributes. What's the best way to get at this information within
> slapd.
> I cannot use the backend search routine because it's needs information about
> the connection etc which doesn't exist. In any case the backend search
> routine calls send_ldap_result() directly, so that's not very
> useful. bi_tool_entry_get() seems to be the closest to what I need; however
> there is no way to find the entry I need without iterating through the whole
> list of entries.