Commit 4ef4c9eb authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Return default referral if DN maps to empty domain.

parent b4e1ea15
......@@ -45,16 +45,14 @@ dnssrv_back_referrals(
return LDAP_OTHER;
}
if( ldap_dn2domain( dn->bv_val, &domain ) ) {
if( ldap_dn2domain( dn->bv_val, &domain ) || domain == NULL ) {
send_ldap_result( conn, op, LDAP_REFERRAL,
NULL, NULL, default_referral, NULL );
return LDAP_REFERRAL;
}
Debug( LDAP_DEBUG_TRACE, "DNSSRV: dn=\"%s\" -> domain=\"%s\"\n",
dn->bv_val,
domain == NULL ? "" : domain,
0 );
dn->bv_val, domain, 0 );
if( ( rc = ldap_domain2hostlist( domain, &hostlist ) ) ) {
Debug( LDAP_DEBUG_TRACE,
......
......@@ -44,16 +44,14 @@ dnssrv_back_search(
assert( get_manageDSAit( op ) );
if( ldap_dn2domain( dn->bv_val, &domain ) ) {
if( ldap_dn2domain( dn->bv_val, &domain ) || domain == NULL ) {
send_ldap_result( conn, op, LDAP_REFERRAL,
NULL, NULL, default_referral, NULL );
goto done;
}
Debug( LDAP_DEBUG_TRACE, "DNSSRV: dn=\"%s\" -> domain=\"%s\"\n",
dn->bv_len ? dn->bv_val : "",
domain == NULL ? "" : domain,
0 );
dn->bv_len ? dn->bv_val : "", domain, 0 );
if( ( rc = ldap_domain2hostlist( domain, &hostlist ) ) ) {
Debug( LDAP_DEBUG_TRACE, "DNSSRV: domain2hostlist returned %d\n",
......
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