Lines Matching refs:ldap_context

47                            krb5_ldap_context *ldap_context)
52 if (ldap_context->bind_dn == NULL) {
59 if (ldap_context->bind_pwd == NULL && ldap_context->service_password_file == NULL) {
66 if (ldap_context->bind_pwd == NULL && ldap_context->service_password_file !=
67 NULL && ldap_context->service_cert_path == NULL) {
68 if ((st=krb5_ldap_readpassword(context, ldap_context, &password)) != 0) {
76 ldap_context->service_cert_path = strdup((char *)password + strlen("{FILE}"));
77 if (ldap_context->service_cert_path == NULL) {
83 ldap_context->service_cert_pass = NULL;
85 ldap_context->service_cert_pass = strdup((char *)password +
87 if (ldap_context->service_cert_pass == NULL) {
95 ldap_context->bind_pwd = (char *)password;
96 if (ldap_context->bind_pwd == NULL) {
105 if (ldap_context->bind_pwd != NULL && strlen(ldap_context->bind_pwd) == 0) {
120 krb5_ldap_bind(krb5_ldap_context *ldap_context,
126 if (ldap_context->service_cert_path != NULL) {
148 bv.bv_val = ldap_context->bind_pwd;
149 bv.bv_len = strlen(ldap_context->bind_pwd);
151 ldap_context->bind_dn,
159 krb5_ldap_initialize(krb5_ldap_context *ldap_context,
185 if (ldap_context->kcontext)
186 krb5_set_error_message (ldap_context->kcontext, KRB5_KDB_ACCESS_ERROR,
195 if (ldap_context->root_certificate_file == NULL) {
196 if (ldap_context->kcontext)
197 krb5_set_error_message (ldap_context->kcontext, KRB5_KDB_ACCESS_ERROR,
204 if ((st = ldapssl_client_init(ldap_context->root_certificate_file, NULL)) < 0) {
205 if (ldap_context->kcontext)
206 krb5_set_error_message (ldap_context->kcontext, KRB5_KDB_ACCESS_ERROR, "%s",
215 if (ldap_context->kcontext) {
216 krb5_set_error_message (ldap_context->kcontext, KRB5_KDB_ACCESS_ERROR, "%s",
223 if (ldap_context->service_cert_path != NULL) {
229 NULL, ldap_context->service_cert_pass,
231 if (ldap_context->kcontext) {
232 krb5_set_error_message (ldap_context->kcontext,
242 if ((st=krb5_ldap_bind(ldap_context, ldap_server_handle)) == 0) {
247 if (ldap_context->kcontext)
249 krb5_set_error_message (ldap_context->kcontext,
274 krb5_ldap_db_init(krb5_context context, krb5_ldap_context *ldap_context)
285 if ((st=krb5_validate_ldap_context(context, ldap_context)) != 0)
295 st = HNDL_LOCK(ldap_context);
298 while (ldap_context->server_info_list[cnt] != NULL) {
301 server_info = ldap_context->server_info_list[cnt];
309 if (ldap_context->service_cert_path != NULL) {
328 for (conns=0; conns < ldap_context->max_server_conns; ++conns) {
329 if ((st=krb5_ldap_initialize(ldap_context, server_info)) != 0)
338 HNDL_UNLOCK(ldap_context);
356 krb5_ldap_db_single_init(krb5_ldap_context *ldap_context)
362 while (ldap_context->server_info_list[cnt] != NULL) {
363 server_info = ldap_context->server_info_list[cnt];
365 if (server_info->num_conns < ldap_context->max_server_conns-1) {
366 st = krb5_ldap_initialize(ldap_context, server_info);
377 while (ldap_context->server_info_list[cnt] != NULL) {
378 server_info = ldap_context->server_info_list[cnt];
379 st = krb5_ldap_initialize(ldap_context, server_info);
389 krb5_ldap_rebind(krb5_ldap_context *ldap_context,
406 || (krb5_ldap_bind(ldap_context, handle) != LDAP_SUCCESS))
407 return krb5_ldap_request_next_handle_from_pool(ldap_context, ldap_server_handle);
428 krb5_ldap_free_ldap_context(krb5_ldap_context *ldap_context)
430 if (ldap_context == NULL)
433 krb5_ldap_free_krbcontainer_params(ldap_context->krbcontainer);
434 ldap_context->krbcontainer = NULL;
436 krb5_ldap_free_realm_params(ldap_context->lrparams);
437 ldap_context->lrparams = NULL;
439 krb5_ldap_free_server_params(ldap_context);
448 krb5_ldap_context *ldap_context=NULL;
456 ldap_context = (krb5_ldap_context *) dal_handle->db_context;
459 krb5_ldap_free_ldap_context(ldap_context);