Lines Matching refs:ld

357 …hn_ldap_opt_err(log_error_st *errh, const char *file, unsigned long line, const char *fn, LDAP *ld)  in mod_authn_ldap_opt_err()  argument
360 ldap_get_option(ld, LDAP_OPT_ERROR_NUMBER, &err); in mod_authn_ldap_opt_err()
492 LDAP *ld; in mod_authn_ldap_host_init() local
497 if (LDAP_SUCCESS != ldap_initialize(&ld, s->auth_ldap_hostname)) { in mod_authn_ldap_host_init()
503 ret = ldap_set_option(ld, LDAP_OPT_PROTOCOL_VERSION, &ret); in mod_authn_ldap_host_init()
506 ldap_destroy(ld); in mod_authn_ldap_host_init()
511 ldap_set_option(ld, LDAP_OPT_RESTART, LDAP_OPT_ON); in mod_authn_ldap_host_init()
514 ldap_set_option(ld, LDAP_OPT_NETWORK_TIMEOUT, &s->auth_ldap_timeout); in mod_authn_ldap_host_init()
518 ldap_set_option(ld, LDAP_OPT_TIMEOUT, &s->auth_ldap_timeout); in mod_authn_ldap_host_init()
527 ret = ldap_set_option(ld, LDAP_OPT_X_TLS_CACERTFILE, in mod_authn_ldap_host_init()
533 ldap_destroy(ld); in mod_authn_ldap_host_init()
538 ret = ldap_start_tls_s(ld, NULL, NULL); in mod_authn_ldap_host_init()
541 ldap_destroy(ld); in mod_authn_ldap_host_init()
546 return ld; in mod_authn_ldap_host_init()
549 static int mod_authn_ldap_bind(log_error_st *errh, LDAP *ld, const char *dn, const char *pw) { in mod_authn_ldap_bind() argument
563 ret = ldap_sasl_bind_s(ld,dn,LDAP_SASL_SIMPLE,&creds,NULL,NULL,NULL); in mod_authn_ldap_bind()
571 static int mod_authn_ldap_rebind_proc (LDAP *ld, LDAP_CONST char *url, ber_tag_t ldap_request, ber_… in mod_authn_ldap_rebind_proc() argument
577 ? mod_authn_ldap_bind(s->errh, ld, in mod_authn_ldap_rebind_proc()
580 : mod_authn_ldap_bind(s->errh, ld, NULL, NULL); in mod_authn_ldap_rebind_proc()
639 LDAP *ld; in mod_authn_ldap_get_dn() local
649 ld = s->ldap; /*(must be after mod_authn_ldap_search(); might reconnect)*/ in mod_authn_ldap_get_dn()
651 count = ldap_count_entries(ld, lm); in mod_authn_ldap_get_dn()
661 if (NULL == (first = ldap_first_entry(ld, lm))) { in mod_authn_ldap_get_dn()
662 mod_authn_ldap_opt_err(errh,__FILE__,__LINE__,"ldap_first_entry()",ld); in mod_authn_ldap_get_dn()
667 if (NULL == (dn = ldap_get_dn(ld, first))) { in mod_authn_ldap_get_dn()
668 mod_authn_ldap_opt_err(errh,__FILE__,__LINE__,"ldap_get_dn()",ld); in mod_authn_ldap_get_dn()
714 LDAP *ld; in mod_authn_ldap_basic() local
784 ld = mod_authn_ldap_host_init(errh, p->conf.ldc); in mod_authn_ldap_basic()
785 if (NULL == ld) in mod_authn_ldap_basic()
789 int ret = ldap_set_option(ld, LDAP_OPT_REFERRALS, LDAP_OPT_OFF); in mod_authn_ldap_basic()
795 if (LDAP_SUCCESS != mod_authn_ldap_bind(errh, ld, dn, pw)) in mod_authn_ldap_basic()
798 ldap_unbind_ext_s(ld, NULL, NULL); /* disconnect */ in mod_authn_ldap_basic()
799 ld = NULL; in mod_authn_ldap_basic()
810 if (NULL != ld) ldap_destroy(ld); in mod_authn_ldap_basic()