123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398 |
- ||(s) == LDAP_UNAVAILABLE)
- extern "C" {
- typedef enum {
- never=LDAP_DEREF_NEVER,
- searching=LDAP_DEREF_SEARCHING,
- finding=LDAP_DEREF_FINDING,
- always=LDAP_DEREF_ALWAYS
- } deref_options;
- typedef struct util_ldap_connection_t {
- LDAP *ldap;
- apr_pool_t *pool;
- apr_thread_mutex_t *lock;
- const char *host;
- int port;
- deref_options deref;
- const char *binddn;
- const char *bindpw;
- int bound;
- int secure;
- apr_array_header_t *client_certs;
- const char *reason;
- struct util_ldap_connection_t *next;
- struct util_ldap_state_t *st;
- int keep;
- int ChaseReferrals;
- int ReferralHopLimit;
- apr_time_t freed;
- apr_pool_t *rebind_pool;
- int must_rebind;
- request_rec *r;
- apr_time_t last_backend_conn;
- } util_ldap_connection_t;
- typedef struct util_ldap_config_t {
- int ChaseReferrals;
- int ReferralHopLimit;
- apr_array_header_t *client_certs;
- } util_ldap_config_t;
- typedef struct util_ldap_state_t {
- apr_pool_t *pool;
- apr_thread_mutex_t *mutex;
- apr_global_mutex_t *util_ldap_cache_lock;
- apr_size_t cache_bytes;
- char *cache_file;
- long search_cache_ttl;
- long search_cache_size;
- long compare_cache_ttl;
- long compare_cache_size;
- struct util_ldap_connection_t *connections;
- apr_array_header_t *global_certs;
- int ssl_supported;
- int secure;
- int secure_set;
- int verify_svr_cert;
- apr_shm_t *cache_shm;
- apr_rmm_t *cache_rmm;
-
- void *util_ldap_cache;
- long connectionTimeout;
- struct timeval *opTimeout;
- int debug_level;
- apr_interval_time_t connection_pool_ttl;
- int retries;
- apr_interval_time_t retry_delay;
- } util_ldap_state_t;
- struct mod_auth_ldap_groupattr_entry_t {
- char *name;
- };
- APR_DECLARE_OPTIONAL_FN(int,uldap_connection_open,(request_rec *r,
- util_ldap_connection_t *ldc));
- APR_DECLARE_OPTIONAL_FN(void,uldap_connection_close,(util_ldap_connection_t *ldc));
- APR_DECLARE_OPTIONAL_FN(apr_status_t,uldap_connection_unbind,(void *param));
- APR_DECLARE_OPTIONAL_FN(util_ldap_connection_t *,uldap_connection_find,(request_rec *r, const char *host, int port,
- const char *binddn, const char *bindpw, deref_options deref,
- int secure));
- APR_DECLARE_OPTIONAL_FN(int,uldap_cache_comparedn,(request_rec *r, util_ldap_connection_t *ldc,
- const char *url, const char *dn, const char *reqdn,
- int compare_dn_on_server));
- APR_DECLARE_OPTIONAL_FN(int,uldap_cache_compare,(request_rec *r, util_ldap_connection_t *ldc,
- const char *url, const char *dn, const char *attrib, const char *value));
- APR_DECLARE_OPTIONAL_FN(int,uldap_cache_check_subgroups,(request_rec *r, util_ldap_connection_t *ldc,
- const char *url, const char *dn, const char *attrib, const char *value,
- char **subgroupAttrs, apr_array_header_t *subgroupclasses,
- int cur_subgroup_depth, int max_subgroup_depth));
- APR_DECLARE_OPTIONAL_FN(int,uldap_cache_checkuserid,(request_rec *r, util_ldap_connection_t *ldc,
- const char *url, const char *basedn, int scope, char **attrs,
- const char *filter, const char *bindpw, const char **binddn, const char ***retvals));
- APR_DECLARE_OPTIONAL_FN(int,uldap_cache_getuserdn,(request_rec *r, util_ldap_connection_t *ldc,
- const char *url, const char *basedn, int scope, char **attrs,
- const char *filter, const char **binddn, const char ***retvals));
- APR_DECLARE_OPTIONAL_FN(int,uldap_ssl_supported,(request_rec *r));
- apr_status_t util_ldap_cache_init(apr_pool_t *pool, util_ldap_state_t *st);
- char *util_ald_cache_display(request_rec *r, util_ldap_state_t *st);
- }
|