Lines Matching refs:op
43 Operation *op,
50 Operation *op,
56 meta_back_bind( Operation *op, SlapReply *rs )
58 metainfo_t *mi = ( metainfo_t * )op->o_bd->be_private;
71 op->o_log_prefix, op->o_req_dn.bv_val, 0 );
74 switch ( be_rootdn_bind( op, rs ) ) {
95 mc = meta_back_getconn( op, rs, NULL, LDAP_BACK_BIND_DONTSEND );
103 op->o_req_dn.bv_val, rs->sr_err,
108 op->o_log_prefix, buf, 0 );
120 send_ldap_result( op, rs );
124 candidates = meta_back_candidates_get( op );
155 op->o_log_prefix, 0, 0 );
182 (void)meta_back_proxy_authz_bind( mc, i, op, rs, LDAP_BACK_DONTSEND, 1 );
186 lerr = meta_back_single_bind( op, rs, mc, i );
208 && !dn_match( &op->o_req_ndn, &mc->mc_local_ndn ) )
245 ber_bvreplace( &mc->mc_local_ndn, &op->o_req_ndn );
258 LDAP_BACK_PCONN_SET( mc, op );
294 send_ldap_result( op, rs );
304 Operation *op,
312 metainfo_t *mi = ( metainfo_t * )op->o_bd->be_private;
323 op->o_log_prefix, candidate, 0 );
331 int timeout_err = op->o_protocol >= LDAP_VERSION3 ?
334 slap_op_t opidx = slap_req2op( op->o_tag );
339 if ( op->ors_tlimit <= 0 ) {
343 timeout = op->ors_tlimit;
363 stoptime = op->o_time + timeout;
396 op->o_log_prefix, candidate, (void *)msc->msc_ld );
399 meta_clear_one_candidate( op, mc, candidate );
417 op->o_log_prefix, candidate, buf );
422 if ( mi->mi_idle_timeout != 0 && msc->msc_time < op->o_time ) {
423 msc->msc_time = op->o_time;
441 op->o_log_prefix, candidate, rs->sr_err );
453 Operation *op,
458 metainfo_t *mi = ( metainfo_t * )op->o_bd->be_private;
484 dc.conn = op->o_conn;
488 if ( ldap_back_dn_massage( &dc, &op->o_req_dn, &mdn ) ) {
495 save_o_dn = op->o_dn;
496 save_o_do_not_cache = op->o_do_not_cache;
497 op->o_do_not_cache = 1;
498 op->o_dn = op->o_req_dn;
500 ctrls = op->o_ctrls;
501 rs->sr_err = meta_back_controls_add( op, rs, mc, candidate, &ctrls );
502 op->o_dn = save_o_dn;
503 op->o_do_not_cache = save_o_do_not_cache;
511 /* FIXME: should we check if at least some of the op->o_ctrls
515 LDAP_SASL_SIMPLE, &op->orb_cred,
523 mi->mi_ldap_extra->controls_free( op, rs, &ctrls );
525 meta_back_bind_op_result( op, rs, mc, candidate, msgid, LDAP_BACK_DONTSEND, 1 );
536 meta_back_proxy_authz_bind( mc, candidate, op, rs, LDAP_BACK_SENDERR, 1 );
543 ber_bvreplace( &msc->msc_bound_ndn, &op->o_req_ndn );
552 ber_bvreplace( &msc->msc_cred, &op->orb_cred );
558 && !BER_BVISEMPTY( &op->o_req_ndn ) )
561 &op->o_req_ndn, candidate );
565 if ( mdn.bv_val != op->o_req_dn.bv_val ) {
570 meta_back_quarantine( op, rs, candidate );
581 Operation *op,
589 metainfo_t *mi = ( metainfo_t * )op->o_bd->be_private;
598 if ( op->o_conn != NULL &&
599 !op->o_do_not_cache &&
605 (void)meta_back_proxy_authz_bind( mc, candidate, op, rs, sendok, dolock );
619 /* FIXME: should we check if at least some of the op->o_ctrls
631 rs->sr_err = meta_back_bind_op_result( op, rs, mc, candidate, msgid, sendok, dolock );
664 meta_back_quarantine( op, rs, candidate );
675 Operation *op,
680 metainfo_t *mi = ( metainfo_t * )op->o_bd->be_private;
688 if ( be_isroot( op ) ) {
698 op->o_log_prefix, buf,
710 candidates = meta_back_candidates_get( op );
751 rc = meta_back_single_dobind( op, rs, &mc, i,
770 if ( meta_back_retry( op, rs, &mc, i, sendok ) ) {
790 i, isroot ? op->o_bd->be_rootdn.bv_val : "anonymous",
794 op->o_log_prefix, buf, 0 );
817 op->o_log_prefix, i,
818 isroot ? op->o_bd->be_rootdn.bv_val : "anonymous" );
838 op->o_log_prefix, buf, bound );
849 send_ldap_result( op, rs );
919 Operation *op,
925 metainfo_t *mi = (metainfo_t *)op->o_bd->be_private;
933 op->o_log_prefix, candidate, msgid );
950 op->o_log_prefix, candidate, rc );
963 Operation *op,
970 metainfo_t *mi = ( metainfo_t * )op->o_bd->be_private;
999 int timeout_err = op->o_protocol >= LDAP_VERSION3 ?
1006 slap_op_t opidx = slap_req2op( op->o_tag );
1009 if ( op->ors_tlimit <= 0 ) {
1013 timeout = op->ors_tlimit;
1034 stoptime = op->o_time + timeout;
1044 (void)meta_back_cancel( mc, op, rs, msgid, candidate, sendok );
1066 if ( mi->mi_idle_timeout != 0 && msc->msc_time < op->o_time ) {
1067 msc->msc_time = op->o_time;
1090 op->o_log_prefix,
1098 rs->sr_ref = op->o_tmpalloc( sizeof( struct berval ) * ( i + 1 ),
1099 op->o_tmpmemctx );
1111 op->o_log_prefix,
1131 /* internal ops ( op->o_conn == NULL )
1133 if ( op->o_conn && !op->o_do_not_cache && matched ) {
1142 meta_back_quarantine( op, rs, candidate );
1194 op->o_log_prefix, buf, 0 );
1230 meta_back_quarantine( op, rs, i );
1243 if ( dnPretty( NULL, &dn, &pdn, op->o_tmpmemctx ) == LDAP_SUCCESS ) {
1245 matched_ctx = op->o_tmpmemctx;
1253 if ( op->o_conn && ( sendok & LDAP_BACK_SENDERR ) ) {
1255 send_ldap_result( op, rs );
1259 } else if ( op->o_conn &&
1263 send_ldap_result( op, rs );
1266 op->o_tmpfree( (char *)rs->sr_matched, matched_ctx );
1272 op->o_tmpfree( rs->sr_ref, op->o_tmpmemctx );
1301 Operation *op,
1308 metainfo_t *mi = (metainfo_t *)op->o_bd->be_private;
1320 if ( op->o_protocol == 0 || op->o_protocol == LDAP_VERSION3 ) {
1328 send_ldap_result( op, rs );
1334 if ( op->o_tag == LDAP_REQ_BIND ) {
1335 ndn = op->o_req_ndn;
1337 } else if ( !BER_BVISNULL( &op->o_conn->c_ndn ) ) {
1338 ndn = op->o_conn->c_ndn;
1341 ndn = op->o_ndn;
1388 send_ldap_result( op, rs );
1400 } else if ( mt->mt_idassert_authz && !be_isroot( op ) ) {
1409 rs->sr_err = slap_sasl_matches( op, mt->mt_idassert_authz,
1414 send_ldap_result( op, rs );
1440 if ( ( !op->o_do_not_cache || !op->o_is_auth_check ) &&
1460 authzID.bv_val = slap_sl_malloc( authzID.bv_len + 1, op->o_tmpmemctx );
1480 send_ldap_result( op, rs );
1497 send_ldap_result( op, rs );
1511 send_ldap_result( op, rs );
1520 slap_sl_free( authzID.bv_val, op->o_tmpmemctx );
1542 send_ldap_result( op, rs );
1560 Operation *op,
1565 metainfo_t *mi = (metainfo_t *)op->o_bd->be_private;
1573 rc = meta_back_proxy_authz_cred( mc, candidate, op, rs, sendok, &binddn, &cred, &method );
1589 rc = meta_back_bind_op_result( op, rs, mc, candidate, msgid, sendok, dolock );
1623 * status of op->o_ctrls.
1627 Operation *op,
1633 metainfo_t *mi = (metainfo_t *)op->o_bd->be_private;
1652 if ( op->o_protocol == 0 || op->o_protocol == LDAP_VERSION3 ) {
1664 switch ( mi->mi_ldap_extra->proxy_authz_ctrl( op, rs, &msc->msc_bound_ndn,
1683 switch ( slap_ctrl_session_tracking_request_add( op, rs, &c[ j1 + j2 ] ) ) {
1708 if ( op->o_ctrls ) {
1709 for ( n = 0; op->o_ctrls[ n ]; n++ )
1713 ctrls = op->o_tmpalloc( (n + j1 + j2 + 1) * sizeof( LDAPControl * ) + ( j1 + j2 ) * sizeof( LDAPControl ),
1714 op->o_tmpmemctx );
1725 if ( op->o_ctrls ) {
1726 for ( i = 0; op->o_ctrls[ i ]; i++ ) {
1727 ctrls[ i + j1 ] = op->o_ctrls[ i ];
1745 ctrls = op->o_ctrls;