Commit 238f7361 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

slapd returned "partial results and referral" even when no default

referral has been configured in the server.  Fix provided by Hallvard.
parent 1d0e0909
...@@ -143,10 +143,14 @@ do_bind( ...@@ -143,10 +143,14 @@ do_bind(
free( cred.bv_val ); free( cred.bv_val );
} }
if ( cred.bv_len == 0 ) { if ( cred.bv_len == 0 ) {
send_ldap_result( conn, op, LDAP_SUCCESS, NULL, NULL ); send_ldap_result( conn, op, LDAP_SUCCESS,
NULL, NULL );
} else if ( default_referral && *default_referral ) {
send_ldap_result( conn, op, LDAP_PARTIAL_RESULTS,
NULL, default_referral );
} else { } else {
send_ldap_result( conn, op, LDAP_PARTIAL_RESULTS, NULL, send_ldap_result( conn, op, LDAP_INVALID_CREDENTIALS,
default_referral ); NULL, default_referral );
} }
return; return;
} }
......
...@@ -40,6 +40,9 @@ send_ldap_result2( ...@@ -40,6 +40,9 @@ send_ldap_result2(
int rc, sd; int rc, sd;
unsigned long tag, bytes; unsigned long tag, bytes;
if ( err == LDAP_PARTIAL_RESULTS && (text == NULL || *text == '\0') )
err = LDAP_NO_SUCH_OBJECT;
Debug( LDAP_DEBUG_TRACE, "send_ldap_result %d:%s:%s\n", err, matched ? Debug( LDAP_DEBUG_TRACE, "send_ldap_result %d:%s:%s\n", err, matched ?
matched : "", text ? text : "" ); matched : "", text ? text : "" );
......
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