Commit fbb58dec authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Fix minor bugs...

parent e87e01b9
......@@ -64,7 +64,7 @@ int ldap_dn2domain(
#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 */
......@@ -94,8 +94,9 @@ int ldap_dn2domain(
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 );
......
......@@ -34,16 +34,23 @@ dnssrv_back_request(
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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment