]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/saslauthz.c
Partial revert of f30269f5d2e4bb5ee7486fe6542078d1b59dba6d
[openldap] / servers / slapd / saslauthz.c
index 847904ee9b1b9e48224f318ffa75d2bcfbdbbac7..11b59d11c06c5986eafaae2e2f6cc27406e39174 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2011 The OpenLDAP Foundation.
+ * Copyright 1998-2012 The OpenLDAP Foundation.
  * Portions Copyright 2000 Mark Adamson, Carnegie Mellon.
  * All rights reserved.
  *
@@ -2005,7 +2005,7 @@ slap_sasl2dn(
        op.o_bd->be_search( &op, &rs );
        
 FINISHED:
-       if( !BER_BVISEMPTY( sasldn ) ) {
+       if( opx == opx->o_conn->c_sasl_bindop && !BER_BVISEMPTY( sasldn ) ) {
                opx->o_conn->c_authz_backend = op.o_bd;
        }
        if( !BER_BVISNULL( &op.o_req_dn ) ) {