db-ldap.h revision cfdaa223525f87c9c980a25cc7bb6770a248d76a
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen/* Functions like ldap_bind() have been deprecated in OpenLDAP 2.3
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen This define enables them until the code here can be refactored */
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainentypedef void db_search_callback_t(struct ldap_connection *conn,
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen const char *dn;
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen int fd; /* only set when connected/connecting */
767ff4367960efd5fa868f3b56f850fd4c205c8bTimo Sirainen struct ldap_request *delayed_requests_head, *delayed_requests_tail;
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen struct hash_table *pass_attr_map, *user_attr_map;
c18ff860dc22960fd37c272d929f889c7939a2c8Timo Sirainen unsigned int retrying:1; /* just reconnected, resending requests */
d22301419109ed4a38351715e6760011421dadecTimo Sirainen struct ldap_request *next; /* in conn->delayed_requests */
c18ff860dc22960fd37c272d929f889c7939a2c8Timo Sirainen /* for bind requests, base contains the DN and filter=NULL */
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen char **attributes; /* points to pass_attr_names / user_attr_names */
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenvoid db_ldap_add_delayed_request(struct ldap_connection *conn,
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenvoid db_ldap_search(struct ldap_connection *conn, struct ldap_request *request,
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenvoid db_ldap_set_attrs(struct ldap_connection *conn, const char *attrlist,
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainen char ***attr_names_r, struct hash_table *attr_map,
d22301419109ed4a38351715e6760011421dadecTimo Sirainen const char *const default_attr_map[],
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenstruct ldap_connection *db_ldap_init(const char *config_path);
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenvoid db_ldap_unref(struct ldap_connection **conn);
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenint db_ldap_connect(struct ldap_connection *conn);
1ac7c8e9040e0d0b7e9f849e45b94bfe919595a9Timo Sirainenconst char *ldap_get_error(struct ldap_connection *conn);