[Date Prev][Date Next]
non-const berval in ldap_sasl_bind
after reading some posts on ldap_bind and ldap_simple_bind being
deprecated I've started to change my code to use ldap_sasl_bind
Working in C++ I, first of all, implemented a wrapper class to integrate
STL strings with berval and have them UTF8 encoded "on the fly". Then on
a call to ldap_sasl_bind_s or similar I request a pointer to the
internally managed struct berval. Since I don't want that internal
berval to be adjusted externally I request to get a "const struct berval
Now, my compiler complains about losing const on that pointer while
passing it to ldap_sasl_bind_s ... I read
draft-ietf-ldapext-ldap-c-api-xx.txt again and found ldap_sasl_bind_c
declared to use a const struct berval * in argument cred.
Here's my question: what is your intention to not use the const
qualifier? Or: is there any reason to declare it non-const at all? Is
ldap_sasl_bind_s adjusting the berval in argument cred?