]> git.sur5r.net Git - openldap/commitdiff
We need to set sasl_layers prior to returning result...
authorKurt Zeilenga <kurt@openldap.org>
Sat, 7 Oct 2000 02:00:54 +0000 (02:00 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 7 Oct 2000 02:00:54 +0000 (02:00 +0000)
servers/slapd/bind.c
servers/slapd/sasl.c

index e88001e4d2011053a19a2f1e0dd16c890783874a..4fd61bc8f9534d421a98b91872f2d1b0a3e14d48 100644 (file)
@@ -223,7 +223,6 @@ do_bind(
                        conn->c_authmech = conn->c_sasl_bind_mech;
                        conn->c_sasl_bind_mech = NULL;
                        conn->c_sasl_bind_in_progress = 0;
-                       if( ssf ) conn->c_sasl_layers++;
                        conn->c_sasl_ssf = ssf;
                        if( ssf > conn->c_ssf ) {
                                conn->c_ssf = ssf;
index 250b2ab5ac5cf7ca4bdf1822ef77ee1212586066..537f1741fa2b4fe73b98f603c3841cffba8bb398 100644 (file)
@@ -538,6 +538,12 @@ int slap_sasl_bind(
                        }
 
                        if( rc == LDAP_SUCCESS ) {
+                               if( ssf ) {
+                                       ldap_pvt_thread_mutex_lock( &conn->c_mutex );
+                                       conn->c_sasl_layers++;
+                                       ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
+                               }
+
                                send_ldap_sasl( conn, op, rc,
                                        NULL, NULL, NULL, NULL,
                                        response.bv_len ? &response : NULL );