Lines Matching refs:s

78                     plugin_config_ldap *s = cpv->v.v;  in FREE_FUNC()  local
79 if (NULL != s->ldap) ldap_unbind_ext_s(s->ldap, NULL, NULL); in FREE_FUNC()
80 free(s); in FREE_FUNC()
491 static LDAP * mod_authn_ldap_host_init(log_error_st *errh, plugin_config_ldap *s) { in mod_authn_ldap_host_init() argument
495 if (NULL == s->auth_ldap_hostname) return NULL; in mod_authn_ldap_host_init()
497 if (LDAP_SUCCESS != ldap_initialize(&ld, s->auth_ldap_hostname)) { 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()
521 if (s->auth_ldap_starttls) { in mod_authn_ldap_host_init()
524 if (s->auth_ldap_cafile in mod_authn_ldap_host_init()
526 || 0 != strcmp(s->auth_ldap_cafile, default_cafile))) { in mod_authn_ldap_host_init()
528 s->auth_ldap_cafile); in mod_authn_ldap_host_init()
572 const plugin_config_ldap *s = (const plugin_config_ldap *)params; in mod_authn_ldap_rebind_proc() local
576 return s->auth_ldap_binddn in mod_authn_ldap_rebind_proc()
577 ? mod_authn_ldap_bind(s->errh, ld, in mod_authn_ldap_rebind_proc()
578 s->auth_ldap_binddn, in mod_authn_ldap_rebind_proc()
579 s->auth_ldap_bindpw) in mod_authn_ldap_rebind_proc()
580 : mod_authn_ldap_bind(s->errh, ld, NULL, NULL); in mod_authn_ldap_rebind_proc()
583 static LDAPMessage * mod_authn_ldap_search(log_error_st *errh, plugin_config_ldap *s, const char *b… in mod_authn_ldap_search() argument
594 if (s->ldap != NULL) { in mod_authn_ldap_search()
595 ret = ldap_search_ext_s(s->ldap, base, LDAP_SCOPE_SUBTREE, filter, in mod_authn_ldap_search()
602 ret = ldap_search_ext_s(s->ldap, base, LDAP_SCOPE_SUBTREE, filter, in mod_authn_ldap_search()
609 ldap_unbind_ext_s(s->ldap, NULL, NULL); in mod_authn_ldap_search()
612 s->ldap = mod_authn_ldap_host_init(errh, s); in mod_authn_ldap_search()
613 if (NULL == s->ldap) { in mod_authn_ldap_search()
617 ldap_set_rebind_proc(s->ldap, mod_authn_ldap_rebind_proc, s); in mod_authn_ldap_search()
618 ret = mod_authn_ldap_rebind_proc(s->ldap, NULL, 0, 0, s); in mod_authn_ldap_search()
620 ldap_destroy(s->ldap); in mod_authn_ldap_search()
621 s->ldap = NULL; in mod_authn_ldap_search()
625 ret = ldap_search_ext_s(s->ldap, base, LDAP_SCOPE_SUBTREE, filter, in mod_authn_ldap_search()
630 ldap_unbind_ext_s(s->ldap, NULL, NULL); in mod_authn_ldap_search()
631 s->ldap = NULL; in mod_authn_ldap_search()
638 static char * mod_authn_ldap_get_dn(log_error_st *errh, plugin_config_ldap *s, const char *base, co… in mod_authn_ldap_get_dn() argument
644 lm = mod_authn_ldap_search(errh, s, base, filter); in mod_authn_ldap_get_dn()
649 ld = s->ldap; /*(must be after mod_authn_ldap_search(); might reconnect)*/ in mod_authn_ldap_get_dn()
677 static handler_t mod_authn_ldap_memberOf(log_error_st *errh, plugin_config *s, const http_auth_requ… in mod_authn_ldap_memberOf() argument
678 if (!s->auth_ldap_groupmember) return HANDLER_ERROR; in mod_authn_ldap_memberOf()
684 buffer_append_string_buffer(filter, s->auth_ldap_groupmember); in mod_authn_ldap_memberOf()
686 if (buffer_is_equal_string(s->auth_ldap_groupmember, in mod_authn_ldap_memberOf()
694 plugin_config_ldap * const ldc = s->ldc; in mod_authn_ldap_memberOf()