NULL, text, NULL, NULL );
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_INFO,
- "do_bind: conn %d v%d unknown authentication method (%d)\n",
+ "do_bind: conn %ld v%d unknown authentication method (%ld)\n",
conn->c_connid, version, method ));
#else
Debug( LDAP_DEBUG_TRACE,
- "do_bind: v%d unknown authentication method (%d)\n",
+ "do_bind: v%d unknown authentication method (%ld)\n",
version, method, 0 );
#endif
goto cleanup;
if ( (be = select_backend( ndn, 0 )) == NULL ) {
if ( default_referral ) {
+ struct berval **ref = referral_rewrite( default_referral,
+ NULL, dn, LDAP_SCOPE_DEFAULT );
+
send_ldap_result( conn, op, rc = LDAP_REFERRAL,
- NULL, NULL, default_referral, NULL );
+ NULL, NULL, ref ? ref : default_referral, NULL );
+
+ ber_bvecfree( ref );
} else {
/* noSuchObject is not allowed to be returned by bind */