(Answer) (Category) OpenLDAP Faq-O-Matic : (Category) OpenLDAP Developer's FAQ : (Category) libldap : (Answer) Additional info/matched DN
Up to OpenLDAP 2.3, additional info and matched DN were always stored and passed as strings; in case they were empty, an empty string, i.e. a string containing just a '\0', was stored and returned.

Since OpenLDAP 2.4, empty strings for those fields are treated as NULL. This is essentially an optimization, since it avoids useless malloc/free of empty strings, and handling of NULL pointers is delegated to clients.

OpenLDAP 2.3 already provides this feature if compiled with -DLDAP_NULL_IS_NULL set.

Client developers are encouraged to experiment with this setting, to track down cases where NULL values are treated incorrectly. This parameter affects values accessed via ldap_parse_result(3) when either matcheddnp or errmsgp are not NULL, or via ldap_get_option(3) when used to collect LDAP_OPT_MATCHED_DN or LDAP_OPT_ERROR_STRING are requested.

[Append to This Answer]
Next: (Answer) How do I upgrade my client that was using now deprecated functions?
This document is: http://www.openldap.org/faq/index.cgi?file=1381
[Search] [Appearance]
This is a Faq-O-Matic 2.721.test.
© Copyright 1998-2013, OpenLDAP Foundation, info@OpenLDAP.org