Lines Matching refs:s

253 static LDAP * mod_authn_ldap_host_init(log_error_st *errh, vhostdb_config *s) {  in mod_authn_ldap_host_init()  argument
257 ret = ldap_initialize(&ld, s->host); in mod_authn_ldap_host_init()
275 ldap_set_option(ld, LDAP_OPT_NETWORK_TIMEOUT, &s->timeout); in mod_authn_ldap_host_init()
279 ldap_set_option(ld, LDAP_OPT_TIMEOUT, &s->timeout); in mod_authn_ldap_host_init()
282 if (s->starttls) { in mod_authn_ldap_host_init()
285 if (s->cafile in mod_authn_ldap_host_init()
286 && (!default_cafile || 0 != strcmp(s->cafile, default_cafile))) { in mod_authn_ldap_host_init()
287 ret = ldap_set_option(ld, LDAP_OPT_X_TLS_CACERTFILE, s->cafile); in mod_authn_ldap_host_init()
330 vhostdb_config *s = (vhostdb_config *)params; in mod_authn_ldap_rebind_proc() local
334 return mod_authn_ldap_bind(s->errh, ld, s->binddn, s->bindpw); in mod_authn_ldap_rebind_proc()
337 static LDAPMessage * mod_authn_ldap_search(log_error_st *errh, vhostdb_config *s, char *base, char … in mod_authn_ldap_search() argument
348 if (s->ldap != NULL) { in mod_authn_ldap_search()
349 ret = ldap_search_ext_s(s->ldap, base, LDAP_SCOPE_SUBTREE, filter, in mod_authn_ldap_search()
356 ret = ldap_search_ext_s(s->ldap, base, LDAP_SCOPE_SUBTREE, filter, in mod_authn_ldap_search()
363 ldap_unbind_ext_s(s->ldap, NULL, NULL); in mod_authn_ldap_search()
366 s->ldap = mod_authn_ldap_host_init(errh, s); in mod_authn_ldap_search()
367 if (NULL == s->ldap) { in mod_authn_ldap_search()
371 ldap_set_rebind_proc(s->ldap, mod_authn_ldap_rebind_proc, s); in mod_authn_ldap_search()
372 ret = mod_authn_ldap_bind(errh, s->ldap, s->binddn, s->bindpw); in mod_authn_ldap_search()
374 ldap_destroy(s->ldap); in mod_authn_ldap_search()
375 s->ldap = NULL; in mod_authn_ldap_search()
379 ret = ldap_search_ext_s(s->ldap, base, LDAP_SCOPE_SUBTREE, filter, in mod_authn_ldap_search()
384 ldap_unbind_ext_s(s->ldap, NULL, NULL); in mod_authn_ldap_search()
385 s->ldap = NULL; in mod_authn_ldap_search()