OpenLDAP 2.0 Change Log
OpenLDAP 2.0.X Engineering
+ Updated -lldap SASL error reporting
+ Updated -lldap TLS error reporting
Build Environment
Fixed $(DESTDIR) install (ITS#806)
assert( lc->lconn_sasl_ctx == NULL );
if ( host == NULL ) {
- ld->ld_errno = LDAP_UNAVAILABLE;
+ ld->ld_errno = LDAP_LOCAL_ERROR;
return ld->ld_errno;
}
if ( sd == AC_SOCKET_INVALID ) {
/* not connected yet */
- int rc = ldap_open_defconn( ld );
-
+ int rc;
+
+ rc = ldap_open_defconn( ld );
if( rc < 0 ) return ld->ld_errno;
+
ber_sockbuf_ctrl( ld->ld_sb, LBER_SB_OPT_GET_FD, &sd );
if( sd == AC_SOCKET_INVALID ) {
- ld->ld_errno = LDAP_UNAVAILABLE;
+ ld->ld_errno = LDAP_LOCAL_ERROR;
return ld->ld_errno;
}
}
ctx = ld->ld_defconn->lconn_sasl_ctx;
if( ctx == NULL ) {
- ld->ld_errno = LDAP_UNAVAILABLE;
+ ld->ld_errno = LDAP_LOCAL_ERROR;
return ld->ld_errno;
}
e = ldap_first_entry( ld, res );
if ( e == NULL ) {
+ ldap_msgfree( res );
if ( ld->ld_errno == LDAP_SUCCESS ) {
- ld->ld_errno = LDAP_UNAVAILABLE;
+ ld->ld_errno = LDAP_NO_SUCH_OBJECT;
}
return ld->ld_errno;
}
values = ldap_get_values( ld, e, "supportedSASLMechanisms" );
if ( values == NULL ) {
- ld->ld_errno = LDAP_NO_SUCH_ATTRIBUTE;
ldap_msgfree( res );
+ ld->ld_errno = LDAP_NO_SUCH_ATTRIBUTE;
return ld->ld_errno;
}
mechlist = ldap_charray2str( values, " " );
if ( mechlist == NULL ) {
- ld->ld_errno = LDAP_NO_MEMORY;
LDAP_VFREE( values );
ldap_msgfree( res );
+ ld->ld_errno = LDAP_NO_MEMORY;
return ld->ld_errno;
}
if (randfile == NULL) {
Debug( LDAP_DEBUG_ANY,
- "TLS: Use configuration file or $RANDFILE to define seed PRNG",
+ "TLS: Use configuration file or $RANDFILE to define seed PRNG\n",
0, 0, 0);
return -1;
}
if (RAND_status() == 0) {
Debug( LDAP_DEBUG_ANY,
- "TLS: PRNG not been seeded with enough data",
+ "TLS: PRNG not been seeded with enough data\n",
0, 0, 0);
return -1;
}