if ( use_tls ) {
rc = ldap_start_tls_s( ld, NULL, NULL );
if ( rc != LDAP_SUCCESS ) {
- tool_perror( "ldap_start_tls", rc, NULL, NULL, NULL, NULL );
+ char *msg=NULL;
+ ldap_get_option( ld, LDAP_OPT_DIAGNOSTIC_MESSAGE, (void*)&msg);
+ tool_perror( "ldap_start_tls", rc, NULL, NULL, msg, NULL );
+ ldap_memfree(msg);
if ( use_tls > 1 ) {
exit( EXIT_FAILURE );
}
lutil_sasl_freedefs( defaults );
if( rc != LDAP_SUCCESS ) {
+ char *msg=NULL;
+ ldap_get_option( ld, LDAP_OPT_DIAGNOSTIC_MESSAGE, (void*)&msg);
tool_perror( "ldap_sasl_interactive_bind_s",
- rc, NULL, NULL, NULL, NULL );
+ rc, NULL, NULL, msg, NULL );
+ ldap_memfree(msg);
exit( rc );
}
#else