devel's kbind fix.
Add slapd -DSLAPD_UNDEFINED_OC_IS_NOT_EXTENSIBLE macro disable
undefined object classes implies extensible object behavior.
Add GNU Pth support (ITS#453)
+ Fixed -lldap Kerberos bind to work ldap_init() (ITS#426)
Changed -lldap to ignore space in filter: ( !(foo=bar)) (ITS#459)
Fixed multiple password support (ITS#464)
Fixed back-ldbm/bind invalid credentials vs no such object bug
return( NULL );
}
+ if ( ldap_delayed_open( ld ) < 0 ) {
+ return( NULL );
+ }
+
#ifdef LDAP_REFERRALS
krbinstance = ld->ld_defconn->lconn_krbinstance;
#else /* LDAP_REFERRALS */
return( NULL );
}
-#ifdef LDAP_REFERRALS
- if (( srv = (LDAPServer *)calloc( 1, sizeof( LDAPServer ))) ==
- NULL || ( ld->ld_defhost != NULL && ( srv->lsrv_host =
- ldap_strdup( ld->ld_defhost )) == NULL )) {
- if(srv != NULL) free( (char*) srv );
- ldap_ld_free( ld, 0 );
- return( NULL );
- }
- srv->lsrv_port = ld->ld_defport;
-
- if (( ld->ld_defconn = ldap_new_connection( ld, &srv, 1,1,0 )) == NULL ) {
- if ( ld->ld_defhost != NULL ) free( srv->lsrv_host );
- free( (char *)srv );
- ldap_ld_free( ld, 0 );
+ if ( ldap_delayed_open( ld ) < 0 ) {
return( NULL );
}
- ++ld->ld_defconn->lconn_refcnt; /* so it never gets closed/freed */
-
-#else /* LDAP_REFERRALS */
- if ( open_ldap_connection( ld, &ld->ld_sb, ld->ld_defhost,
- ld->ld_defport, &ld->ld_host, 0 ) < 0 ) {
- ldap_ld_free( ld, 0 );
- return( NULL );
- }
-#endif /* LDAP_REFERRALS */
Debug( LDAP_DEBUG_TRACE, "ldap_open successful, ld_host is %s\n",
( ld->ld_host == NULL ) ? "(null)" : ld->ld_host, 0, 0 );
#endif /* STR_TRANSLATION */
}
-
int
-ldap_send_initial_request( LDAP *ld, unsigned long msgtype, char *dn,
- BerElement *ber )
+ldap_delayed_open( LDAP *ld )
{
#if defined( LDAP_REFERRALS ) || defined( LDAP_DNS )
LDAPServer *servers, *srv;
#endif /* LDAP_REFERRALS || LDAP_DNS */
- Debug( LDAP_DEBUG_TRACE, "ldap_send_initial_request\n", 0, 0, 0 );
+ Debug( LDAP_DEBUG_TRACE, "ldap_delayed_open\n", 0, 0, 0 );
if ( ld->ld_sb.sb_sd == -1 ) {
/* not connected yet */
return( -1 );
}
#endif /* LDAP_REFERRALS */
-
- Debug( LDAP_DEBUG_TRACE,
- "ldap_delayed_open successful, ld_host is %s\n",
- ( ld->ld_host == NULL ) ? "(null)" : ld->ld_host, 0, 0 );
}
+ return( 0 );
+}
+
+int
+ldap_send_initial_request( LDAP *ld, unsigned long msgtype, char *dn,
+ BerElement *ber )
+{
+#if defined( LDAP_REFERRALS ) || defined( LDAP_DNS )
+ LDAPServer *servers, *srv;
+#endif /* LDAP_REFERRALS || LDAP_DNS */
+
+ Debug( LDAP_DEBUG_TRACE, "ldap_send_initial_request\n", 0, 0, 0 );
+
+ if ( ldap_delayed_open( ld ) < 0 ) {
+ return( -1 );
+ }
#if !defined( LDAP_REFERRALS ) && !defined( LDAP_DNS )