]> git.sur5r.net Git - openldap/commitdiff
fix previous commit
authorPierangelo Masarati <ando@openldap.org>
Mon, 12 Apr 2010 00:06:45 +0000 (00:06 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 12 Apr 2010 00:06:45 +0000 (00:06 +0000)
servers/slapd/back-ldap/chain.c
servers/slapd/back-ldap/config.c

index d7d4f64cce5c34e00be5b0054f174e138f064f99..9219f33fb71794fa8269c3fb8660586d744fda63 100644 (file)
@@ -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? */
index 14eca16ba38c08e1ca3c74ff79cca81fef083ded..1726de3ec6e4599ef475aa2c3d04ce7af3e24beb 100644 (file)
@@ -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 );