#define LDAP_DC "dc="
#define LDAP_DCOID "0.9.2342.19200300.100.1.25="
- if( *rdn[1] == NULL ) {
+ if( rdn[1] == NULL ) {
char *dc;
/* single RDN */
return -4;
}
- ndomain = realloc( domain,
- strlen(domain) + strlen(dc) + 2 );
+ ndomain = LDAP_REALLOC( domain,
+ ( domain == NULL ? 0 : strlen(domain) )
+ + strlen(dc) + 2 );
if( ndomain == NULL ) {
LDAP_FREE( rdn );
NULL, NULL, default_referral, NULL );
goto done;
}
+
+ Debug( LDAP_DEBUG_TRACE, "DNSSRV: dn=\"%s\" -> domain=\"%s\"\n",
+ dn == NULL ? "" : dn,
+ domain == NULL ? "" : domain,
+ 0 );
if( ldap_domain2hostlist( dn, &domain ) ) {
+ Debug( LDAP_DEBUG_TRACE, "DNSSRV: no such object\n", 0, 0, 0 );
send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT,
- NULL, NULL, NULL, NULL );
+ NULL, "could not locate DNS SRV records", NULL, NULL );
goto done;
}
hosts = str2charray( hostlist, " " );
if( hosts == NULL ) {
+ Debug( LDAP_DEBUG_TRACE, "DNSSRV: str2charrary error\n", 0, 0, 0 );
send_ldap_result( conn, op, LDAP_OTHER,
NULL, NULL, NULL, NULL );
goto done;