]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldap/bind.c
ITS#8142 cleanup prev commit
[openldap] / servers / slapd / back-ldap / bind.c
index d336dbb723f33b9ff25f99c33d93729c038856e9..598dae3fd99837e1d0d37e1ccc13dc96c8aa0339 100644 (file)
@@ -1573,7 +1573,12 @@ retry:;
                        op->o_tag = o_tag;
                        rs->sr_text = "Proxy can't contact remote server";
                        send_ldap_result( op, rs );
-                       rs->sr_err = SLAPD_DISCONNECT;
+                       /* if we originally bound and wanted rebind-as-user, must drop
+                        * the connection now because we just discarded the credentials.
+                        * ITS#7464, #8142
+                        */
+                       if ( LDAP_BACK_SAVECRED( li ) && SLAP_IS_AUTHZ_BACKEND( op ) )
+                               rs->sr_err = SLAPD_DISCONNECT;
                }
 
                rc = 0;