Lines Matching refs:ld

23 BerElement * ldap_build_sasl_bind_req( LDAP *ld, char *dn, char *mechanism, struct berval *creds, L…  in ldap_build_sasl_bind_req()  argument
44 ld->ld_errno = LDAP_PARAM_ERROR; in ldap_build_sasl_bind_req()
49 if ( (ber = alloc_ber_with_options( ld )) == NULLBER ) { in ldap_build_sasl_bind_req()
52 …if ( ber_printf( ber, "{it{ist{s", ++ld->ld_msgid, LDAP_REQ_BIND, ld->ld_version, dn, LDAP_AUTH_SA… in ldap_build_sasl_bind_req()
53 ld->ld_errno = LDAP_ENCODING_ERROR; in ldap_build_sasl_bind_req()
59 ld->ld_errno = LDAP_ENCODING_ERROR; in ldap_build_sasl_bind_req()
65 ld->ld_errno = LDAP_ENCODING_ERROR; in ldap_build_sasl_bind_req()
73 ld->ld_errno = LDAP_ENCODING_ERROR; in ldap_build_sasl_bind_req()
77 } else if (ld->ld_srvctrls && ld->ld_srvctrls[0]) { in ldap_build_sasl_bind_req()
79 if (ldap_controls_code(ber, ld->ld_srvctrls) != LDAP_SUCCESS){ in ldap_build_sasl_bind_req()
80 ld->ld_errno = LDAP_ENCODING_ERROR; in ldap_build_sasl_bind_req()
87 ld->ld_errno = LDAP_ENCODING_ERROR; in ldap_build_sasl_bind_req()
103 LDAP *ld, in ldap_sasl_bind() argument
118 LOCK_LDAP(ld); in ldap_sasl_bind()
122 if ( (ber = ldap_build_simple_bind_req(ld, dn, cred->bv_val, serverctrls)) == NULLBER){ in ldap_sasl_bind()
123 ldap_get_option(ld, LDAP_OPT_ERROR_NUMBER, &theErr); in ldap_sasl_bind()
125 UNLOCK_LDAP(ld); in ldap_sasl_bind()
132 if (( ber = ldap_build_sasl_bind_req(ld, dn, LDAP_SASL_CRAM_MD5, cred, serverctrls)) == NULLBER) { in ldap_sasl_bind()
133 ldap_get_option(ld, LDAP_OPT_ERROR_NUMBER, &theErr); in ldap_sasl_bind()
135 UNLOCK_LDAP(ld); in ldap_sasl_bind()
142 if (( ber = ldap_build_sasl_bind_req(ld, dn, LDAP_SASL_EXTERNAL, cred, serverctrls)) == NULLBER) { in ldap_sasl_bind()
143 ldap_get_option(ld, LDAP_OPT_ERROR_NUMBER, &theErr); in ldap_sasl_bind()
145 UNLOCK_LDAP(ld); in ldap_sasl_bind()
153 UNLOCK_LDAP(ld); in ldap_sasl_bind()
168 UNLOCK_LDAP(ld); in ldap_sasl_bind()
183 UNLOCK_LDAP(ld); in ldap_sasl_bind()
198 UNLOCK_LDAP(ld); in ldap_sasl_bind()
213 UNLOCK_LDAP(ld); in ldap_sasl_bind()
228 UNLOCK_LDAP(ld); in ldap_sasl_bind()
234 if ( ld->ld_cache != NULL ) { in ldap_sasl_bind()
235 ldap_flush_cache( ld ); in ldap_sasl_bind()
240 rv = send_initial_request( ld, LDAP_REQ_BIND, dn, ber ); in ldap_sasl_bind()
242 rv = ld->ld_errno; in ldap_sasl_bind()
247 UNLOCK_LDAP(ld); in ldap_sasl_bind()
253 UNLOCK_LDAP(ld); in ldap_sasl_bind()
266 LDAP *ld, in ldap_sasl_bind_s() argument
280 …if ((retcode = ldap_sasl_bind(ld, dn, mechanism, cred, serverctrls, clientctrls, &msgid)) != LDAP_… in ldap_sasl_bind_s()
282 if (ldap_result(ld, msgid, 1, (struct timeval *)NULL, &res ) == -1) in ldap_sasl_bind_s()
283 return (ld->ld_errno ); in ldap_sasl_bind_s()
285 return (ldap_parse_sasl_bind_result(ld, res, servercredp, 1)); in ldap_sasl_bind_s()
289 LDAP *ld, in ldap_sasl_cram_md5_bind_s() argument
307 …if ((res = ldap_sasl_bind_s(ld, dn, LDAP_SASL_CRAM_MD5, NULL, serverctrls, clientctrls, &challenge… in ldap_sasl_cram_md5_bind_s()
336 res = ldap_sasl_bind_s(ld, dn, LDAP_SASL_CRAM_MD5, &resp, serverctrls, clientctrls, &challenge); in ldap_sasl_cram_md5_bind_s()