From 0dc3a13c01b53fdfafb8257bfa51aac26906e912 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 12 Apr 2010 00:06:45 +0000 Subject: [PATCH] fix previous commit --- servers/slapd/back-ldap/chain.c | 2 ++ servers/slapd/back-ldap/config.c | 16 ++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/servers/slapd/back-ldap/chain.c b/servers/slapd/back-ldap/chain.c index d7d4f64cce..9219f33fb7 100644 --- a/servers/slapd/back-ldap/chain.c +++ b/servers/slapd/back-ldap/chain.c @@ -854,6 +854,7 @@ ldap_chain_response( Operation *op, SlapReply *rs ) /* we need this to know if back-ldap returned any result */ lb.lb_lc = lc; + sc2.sc_next = sc->sc_next; sc2.sc_private = &lb; sc2.sc_response = ldap_chain_cb_response; op->o_callback = &sc2; @@ -947,6 +948,7 @@ ldap_chain_response( Operation *op, SlapReply *rs ) case LDAP_SUCCESS: case LDAP_REFERRAL: + sr_err = rs->sr_err; /* slapd-ldap sent response */ if ( !op->o_abandon && lb.lb_status != LDAP_CH_RES ) { /* FIXME: should we send response? */ diff --git a/servers/slapd/back-ldap/config.c b/servers/slapd/back-ldap/config.c index 14eca16ba3..1726de3ec6 100644 --- a/servers/slapd/back-ldap/config.c +++ b/servers/slapd/back-ldap/config.c @@ -689,9 +689,11 @@ slap_idassert_authzfrom_parse( ConfigArgs *c, slap_idassert_t *si ) ber_bvarray_add( &si->si_authz, &bv ); } else { - int i; - for ( i = 0; !BER_BVISNULL( &si->si_authz[ i ] ); i++ ) - ; + int i = 0; + if ( si->si_authz != NULL ) { + for ( ; !BER_BVISNULL( &si->si_authz[ i ] ); i++ ) + ; + } if ( i <= c->valx ) { ber_bvarray_add( &si->si_authz, &bv ); @@ -734,9 +736,11 @@ slap_idassert_passthru_parse( ConfigArgs *c, slap_idassert_t *si ) ber_bvarray_add( &si->si_passthru, &bv ); } else { - int i; - for ( i = 0; !BER_BVISNULL( &si->si_passthru[ i ] ); i++ ) - ; + int i = 0; + if ( si->si_passthru != NULL ) { + for ( ; !BER_BVISNULL( &si->si_passthru[ i ] ); i++ ) + ; + } if ( i <= c->valx ) { ber_bvarray_add( &si->si_passthru, &bv ); -- 2.39.5