mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-18 21:04:45 -05:00
immediately return sizelimitExceeded if appropriate
This commit is contained in:
parent
e5f83e20b5
commit
aecfb85793
1 changed files with 22 additions and 8 deletions
|
|
@ -580,16 +580,16 @@ really_bad:;
|
|||
* back-meta would need to merge them
|
||||
* consistently (think of pagedResults...)
|
||||
*/
|
||||
if ( ldap_parse_result( msc->msc_ld,
|
||||
rs->sr_err = ldap_parse_result( msc->msc_ld,
|
||||
res,
|
||||
&candidates[ i ].sr_err,
|
||||
(char **)&candidates[ i ].sr_matched,
|
||||
NULL /* (char **)&candidates[ i ].sr_text */ ,
|
||||
&references,
|
||||
NULL /* &candidates[ i ].sr_ctrls (unused) */ ,
|
||||
1 ) != LDAP_SUCCESS )
|
||||
{
|
||||
res = NULL;
|
||||
1 );
|
||||
res = NULL;
|
||||
if ( rs->sr_err != LDAP_SUCCESS ) {
|
||||
ldap_get_option( msc->msc_ld,
|
||||
LDAP_OPT_ERROR_NUMBER,
|
||||
&rs->sr_err );
|
||||
|
|
@ -598,10 +598,6 @@ really_bad:;
|
|||
goto really_bad;
|
||||
}
|
||||
|
||||
rs->sr_err = candidates[ i ].sr_err;
|
||||
sres = slap_map_api2result( rs );
|
||||
res = NULL;
|
||||
|
||||
/* massage matchedDN if need be */
|
||||
if ( candidates[ i ].sr_matched != NULL ) {
|
||||
struct berval match, mmatch;
|
||||
|
|
@ -693,6 +689,24 @@ really_bad:;
|
|||
is_ok++;
|
||||
break;
|
||||
|
||||
case LDAP_SIZELIMIT_EXCEEDED:
|
||||
/* if a target returned sizelimitExceeded
|
||||
* and the entry count is equal to the
|
||||
* proxy's limit, the target would have
|
||||
* returned more, and the error must be
|
||||
* propagated to the client; otherwise,
|
||||
* the target enforced a limit lower
|
||||
* than what requested by the proxy;
|
||||
* ignore it */
|
||||
if ( rs->sr_nentries == op->ors_slimit ) {
|
||||
savepriv = op->o_private;
|
||||
op->o_private = (void *)i;
|
||||
send_ldap_result( op, rs );
|
||||
op->o_private = savepriv;
|
||||
goto finish;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if ( META_BACK_ONERR_STOP( mi ) ) {
|
||||
savepriv = op->o_private;
|
||||
|
|
|
|||
Loading…
Reference in a new issue