I'm changing deprecated ldap functions to non-deprecated functions. But I am having problems with ldap_sasl_bind_s. It returns error code 49
, which means invalid credentials. But I'm sure that the credentials are valid. Otherwise I added
TLS_REQCERT never
TLSVerifyClient never
to /etc/openldap/ldap.conf. Still I get the error.
ldap_simple_bind_s(q->ld, binddn, creds.bv_val); //works well
ldap_sasl_bind_s(q->ld, binddn, LDAP_SASL_SIMPLE , &creds, NULL, NULL, NULL); //returns ldap error code 49 but continues working
The main problem is that : When i m using ldap_sasl_bind_s, it doesnt bind all attrbiutes, that i got in my ldap architecture. Also when i m searching an existing attribute, it returns NOSUCH error.
Any help would be appreciated.