]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/sasl.c
also log cookie parsing
[openldap] / servers / slapd / sasl.c
index cf952291bfcb573790dc0efcc5687687e0f6935e..d9a604efc1e08a2f9740e28505fc3b72ed7eba76 100644 (file)
@@ -326,7 +326,7 @@ slap_auxprop_lookup(
 
                cb.sc_private = &sl;
 
-               op.o_bd = select_backend( &op.o_req_ndn, 0, 1 );
+               op.o_bd = select_backend( &op.o_req_ndn, 1 );
 
                if ( op.o_bd ) {
                        /* For rootdn, see if we can use the rootpw */
@@ -440,7 +440,7 @@ slap_auxprop_store(
        }
        if (!conn || !op.o_req_ndn.bv_val) return SASL_BADPARAM;
 
-       op.o_bd = select_backend( &op.o_req_ndn, 0, 1 );
+       op.o_bd = select_backend( &op.o_req_ndn, 1 );
 
        if ( !op.o_bd || !op.o_bd->be_modify ) return SASL_FAIL;
                
@@ -455,6 +455,7 @@ slap_auxprop_store(
                mod->sml_op = LDAP_MOD_REPLACE;
                mod->sml_flags = 0;
                ber_str2bv( pr[i].name, 0, 0, &mod->sml_type );
+               mod->sml_numvals = pr[i].nvalues;
                mod->sml_values = (struct berval *)ch_malloc( (pr[i].nvalues + 1) *
                        sizeof(struct berval));
                for (j=0; j<pr[i].nvalues; j++) {
@@ -722,9 +723,9 @@ slap_sasl_authorize(
 ok:
        if (conn->c_sasl_bindop) {
                Statslog( LDAP_DEBUG_STATS,
-                       "conn=%lu op=%lu BIND authcid=\"%s\" authzid=\"%s\"\n",
-                       conn->c_connid, conn->c_sasl_bindop->o_opid
-                       auth_identity, requested_user, 0);
+                       "%s BIND authcid=\"%s\" authzid=\"%s\"\n",
+                       conn->c_sasl_bindop->o_log_prefix
+                       auth_identity, requested_user, 0, 0 );
        }
 
        Debug( LDAP_DEBUG_TRACE, "SASL Authorize [conn=%ld]: "
@@ -826,9 +827,9 @@ ok:
 
        if ( conn->c_sasl_bindop ) {
                Statslog( LDAP_DEBUG_STATS,
-                       "conn=%lu op=%lu BIND authcid=\"%s\" authzid=\"%s\"\n",
-                       conn->c_connid, conn->c_sasl_bindop->o_opid
-                       authcid, authzid ? authzid : "", 0);
+                       "%s BIND authcid=\"%s\" authzid=\"%s\"\n",
+                       conn->c_sasl_bindop->o_log_prefix
+                       authcid, authzid ? authzid : "", 0, 0 );
        }
 
        *errstr = NULL;
@@ -1093,12 +1094,12 @@ slapd_rw_apply( void *private, const char *filter, struct berval *val )
        int rc;
 
        thrctx = ldap_pvt_thread_pool_context();
-       op = (Operation *)&opbuf;
-       connection_fake_init2( &conn, op, thrctx, 0 );
+       connection_fake_init2( &conn, &opbuf, thrctx, 0 );
+       op = &opbuf.ob_op;
 
        op->o_tag = LDAP_REQ_SEARCH;
        op->o_req_dn = op->o_req_ndn = sl->base;
-       op->o_bd = select_backend( &op->o_req_ndn, 0, 1 );
+       op->o_bd = select_backend( &op->o_req_ndn, 1 );
        if ( !op->o_bd ) {
                return REWRITE_ERR;
        }
@@ -1210,8 +1211,8 @@ int slap_sasl_init( void )
                sprintf( version, "%u.%d.%d", (unsigned)rc >> 24, (rc >> 16) & 0xff,
                        rc & 0xffff );
                Debug( LDAP_DEBUG_ANY, "slap_sasl_init: SASL library version mismatch:"
-                       " expected " SASL_VERSION_STRING ","
-                       " got %s\n", version, 0, 0 );
+                       " expected %s, got %s\n",
+                       SASL_VERSION_STRING, version, 0 );
                return -1;
        }
 #endif