Lines Matching refs:op
759 be_slurp_update( Operation *op )
761 return ( SLAP_SLURP_SHADOW( op->o_bd ) &&
762 be_isupdate_dn( op->o_bd, &op->o_ndn ) );
766 be_shadow_update( Operation *op )
771 return ( ( SLAP_SYNC_SHADOW( op->o_bd ) && SLAPD_SYNC_IS_SYNCCONN( op->o_connid ) ) ||
772 ( SLAP_SHADOW( op->o_bd ) && be_isupdate_dn( op->o_bd, &op->o_ndn ) ) );
792 be_isroot( Operation *op )
794 return be_isroot_dn( op->o_bd, &op->o_ndn );
798 be_isroot_pw( Operation *op )
800 return be_rootdn_bind( op, NULL ) == LDAP_SUCCESS;
812 * if LDAP_SUCCESS, op->orb_edn is set
816 be_rootdn_bind( Operation *op, SlapReply *rs )
823 assert( op->o_tag == LDAP_REQ_BIND );
824 assert( op->orb_method == LDAP_AUTH_SIMPLE );
826 if ( !be_isroot_dn( op->o_bd, &op->o_req_ndn ) ) {
830 if ( BER_BVISNULL( &op->o_bd->be_rootpw ) ) {
835 if ( BER_BVISEMPTY( &op->o_bd->be_rootpw ) ) {
846 ldap_pvt_thread_pool_setkey( op->o_threadctx, (void *)slap_sasl_bind,
847 op->o_conn->c_sasl_authctx, 0, &old_authctx, NULL );
850 rc = lutil_passwd( &op->o_bd->be_rootpw, &op->orb_cred, NULL, NULL );
853 ldap_pvt_thread_pool_setkey( op->o_threadctx, (void *)slap_sasl_bind,
863 op->o_log_prefix, op->o_bd->be_rootdn.bv_val,
868 ber_dupbv( &op->orb_edn, &op->o_bd->be_rootdn );
871 send_ldap_result( op, rs );
880 Operation *op,
884 if ( op->o_bd->be_release ) {
886 return op->o_bd->be_release( op, e, rw );
895 backend_unbind( Operation *op, SlapReply *rs )
901 op->o_bd = be;
902 be->be_unbind( op, rs );
941 Operation *op,
944 LDAPControl **ctrls = op->o_ctrls;
951 switch ( slap_global_control( op, (*ctrls)->ldctl_oid, &cid ) ) {
968 if ( !op->o_bd->be_ctrls[cid] && (*ctrls)->ldctl_iscritical ) {
970 if ( get_whatFailed( op ) ) {
974 slap_ctrl_whatFailed_add( op, rs, oids );
1007 if( get_relax(op) && !be_isroot(op)) {
1019 Operation *op,
1037 if ( op->o_bd ) {
1041 if ( op->o_bd->be_chk_controls ) {
1042 rc = ( *op->o_bd->be_chk_controls )( op, rs );
1046 rc = backend_check_controls( op, rs );
1053 restrictops |= op->o_bd->be_restrictops;
1054 requires |= op->o_bd->be_requires;
1055 bssf = &op->o_bd->be_ssf_set.sss_ssf;
1062 switch( op->o_tag ) {
1141 if( op->o_transport_ssf < ssf->sss_transport ) {
1142 rs->sr_text = op->o_transport_ssf
1148 if( op->o_tls_ssf < ssf->sss_tls ) {
1149 rs->sr_text = op->o_tls_ssf
1156 if( op->o_tag == LDAP_REQ_BIND && opdata == NULL ) {
1158 if( op->o_ssf < ssf->sss_simple_bind ) {
1159 rs->sr_text = op->o_ssf
1166 if( op->o_tag != LDAP_REQ_BIND || opdata == NULL ) {
1169 if( op->o_sasl_ssf < ssf->sss_sasl ) {
1170 rs->sr_text = op->o_sasl_ssf
1176 if( op->o_ssf < ssf->sss_ssf ) {
1177 rs->sr_text = op->o_ssf
1185 if( op->o_transport_ssf < ssf->sss_update_transport ) {
1186 rs->sr_text = op->o_transport_ssf
1192 if( op->o_tls_ssf < ssf->sss_update_tls ) {
1193 rs->sr_text = op->o_tls_ssf
1199 if( op->o_sasl_ssf < ssf->sss_update_sasl ) {
1200 rs->sr_text = op->o_sasl_ssf
1206 if( op->o_ssf < ssf->sss_update_ssf ) {
1207 rs->sr_text = op->o_ssf
1214 BER_BVISEMPTY( &op->o_ndn ) )
1222 if ( op->o_conn->c_listener &&
1223 ! ( op->o_conn->c_listener->sl_perms & ( !BER_BVISEMPTY( &op->o_ndn )
1240 if( ( op->o_transport_ssf < ssf->sss_transport
1241 && op->o_authtype == LDAP_AUTH_SIMPLE )
1242 || BER_BVISEMPTY( &op->o_dn ) )
1251 if( op->o_authtype != LDAP_AUTH_SASL || BER_BVISEMPTY( &op->o_dn ) ) {
1259 if( BER_BVISEMPTY( &op->o_dn ) ) {
1268 ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
1269 version = op->o_conn->c_protocol;
1270 ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );
1281 if( op->o_protocol < LDAP_VERSION3 ) {
1290 if ( !starttls && BER_BVISEMPTY( &op->o_dn ) ) {
1291 if ( op->o_conn->c_listener &&
1292 !( op->o_conn->c_listener->sl_perms & S_IXOTH ))
1302 if ( op->o_conn->c_listener &&
1303 !( op->o_conn->c_listener->sl_perms &
1304 ( !BER_BVISEMPTY( &op->o_dn )
1335 int backend_check_referrals( Operation *op, SlapReply *rs )
1339 if( op->o_bd->be_chk_referrals ) {
1340 rs->sr_err = op->o_bd->be_chk_referrals( op, rs );
1343 send_ldap_result( op, rs );
1352 Operation *op,
1361 if ( op->o_bd == NULL ) {
1365 if ( op->o_bd->be_fetch ) {
1366 return op->o_bd->be_fetch( op, ndn, oc, at, rw, e );
1374 Operation *op,
1382 void *o_priv = op->o_private, *e_priv = NULL;
1386 Backend *be = op->o_bd;
1389 LDAP_SLIST_FOREACH(oex, &op->o_extra, oe_next) {
1395 op->o_bd = ((OpExtraDB *)oex)->oe_db;
1397 if ( !op->o_bd || !SLAP_DBHIDDEN( op->o_bd ))
1398 op->o_bd = select_backend( gr_ndn, 0 );
1400 for ( g = op->o_groups; g; g = g->ga_next ) {
1401 if ( g->ga_be != op->o_bd || g->ga_oc != group_oc ||
1421 op->o_private = NULL;
1422 rc = be_entry_get_rw( op, gr_ndn, group_oc, group_at, 0, &e );
1423 e_priv = op->o_private;
1424 op->o_private = o_priv;
1442 Backend *b2 = op->o_bd;
1468 op->o_tmpmemctx ) != LDAP_SUCCESS )
1504 filter = str2filter_x( op, ludp->lud_filter );
1516 op->o_bd = select_backend( op_ndn, 0 );
1517 op->o_private = NULL;
1518 rc2 = be_entry_get_rw( op, op_ndn, NULL, NULL, 0, &user );
1519 user_priv = op->o_private;
1520 op->o_private = o_priv;
1533 filter_free_x( op, filter, 1 );
1538 op->o_tmpfree( nbase.bv_val, op->o_tmpmemctx );
1546 op->o_private = user_priv;
1547 be_entry_release_r( op, user );
1548 op->o_private = o_priv;
1550 op->o_bd = b2;
1556 op_ndn, NULL, op->o_tmpmemctx );
1567 op->o_private = e_priv;
1568 be_entry_release_r( op, e );
1569 op->o_private = o_priv;
1576 if ( op->o_tag != LDAP_REQ_BIND && !op->o_do_not_cache ) {
1577 g = op->o_tmpalloc( sizeof( GroupAssertion ) + gr_ndn->bv_len,
1578 op->o_tmpmemctx );
1579 g->ga_be = op->o_bd;
1585 g->ga_next = op->o_groups;
1586 op->o_groups = g;
1590 op->o_bd = be;
1596 Operation *op,
1607 if ( op->o_abandon ) {
1611 oex.oe_db = op->o_bd;
1613 LDAP_SLIST_INSERT_HEAD(&op->o_extra, &oex.oe, oe_next);
1615 be_orig = op->o_bd;
1616 op->o_bd = frontendDB;
1617 rc = frontendDB->be_group( op, target, gr_ndn,
1619 op->o_bd = be_orig;
1620 LDAP_SLIST_REMOVE(&op->o_extra, &oex.oe, OpExtra, oe_next);
1627 Operation *op,
1635 void *o_priv = op->o_private, *e_priv = NULL;
1639 Backend *be = op->o_bd;
1642 LDAP_SLIST_FOREACH(oex, &op->o_extra, oe_next) {
1648 op->o_bd = ((OpExtraDB *)oex)->oe_db;
1650 if ( !op->o_bd || !SLAP_DBHIDDEN( op->o_bd ))
1651 op->o_bd = select_backend( edn, 0 );
1657 op->o_private = NULL;
1658 rc = be_entry_get_rw( op, edn, NULL, entry_at, 0, &e );
1659 e_priv = op->o_private;
1660 op->o_private = o_priv;
1668 if ( op->o_conn && access > ACL_NONE &&
1669 access_allowed( op, e, entry_at, NULL,
1691 rc = backend_operational( op, &rs );
1707 if ( op->o_conn && access > ACL_NONE &&
1708 access_allowed( op, e, entry_at, NULL,
1716 v = op->o_tmpalloc( sizeof(struct berval) * ( i + 1 ),
1717 op->o_tmpmemctx );
1720 if ( op->o_conn && access > ACL_NONE &&
1721 access_allowed( op, e, entry_at,
1729 op->o_tmpmemctx );
1735 op->o_tmpfree( v, op->o_tmpmemctx );
1746 op->o_private = e_priv;
1747 be_entry_release_r( op, e );
1748 op->o_private = o_priv;
1755 op->o_bd = be;
1761 Operation *op,
1772 oex.oe_db = op->o_bd;
1774 LDAP_SLIST_INSERT_HEAD(&op->o_extra, &oex.oe, oe_next);
1776 be_orig = op->o_bd;
1777 op->o_bd = frontendDB;
1778 rc = frontendDB->be_attribute( op, target, edn,
1780 op->o_bd = be_orig;
1781 LDAP_SLIST_REMOVE(&op->o_extra, &oex.oe, OpExtra, oe_next);
1788 Operation *op,
1802 assert( op != NULL );
1803 assert( op->o_conn != NULL );
1807 be = op->o_bd;
1808 o_priv = op->o_private;
1810 if ( !op->o_bd ) {
1811 op->o_bd = select_backend( edn, 0 );
1818 op->o_private = NULL;
1819 rc = be_entry_get_rw( op, edn, NULL, entry_at, 0, &e );
1820 e_priv = op->o_private;
1821 op->o_private = o_priv;
1834 if ( access_allowed_mask( op, e, entry_at,
1860 rc = backend_operational( op, &rs );
1874 if ( access_allowed_mask( op, e, entry_at,
1884 op->o_private = e_priv;
1885 be_entry_release_r( op, e );
1886 op->o_private = o_priv;
1893 op->o_bd = be;
1899 Operation *op,
1904 BackendDB *be_orig = op->o_bd;
1907 LDAP_SLIST_FOREACH(oex, &op->o_extra, oe_next) {
1932 *ap = slap_operational_subschemaSubentry( op->o_bd );
1938 op->o_bd = ((OpExtraDB *)oex)->oe_db;
1940 if ( !op->o_bd || !SLAP_DBHIDDEN( op->o_bd ))
1941 op->o_bd = select_backend( &op->o_req_ndn, 0 );
1943 if ( op->o_bd != NULL && !be_match( op->o_bd, frontendDB ) &&
1945 op->o_bd->be_operational != NULL )
1947 rc = op->o_bd->be_operational( op, rs );
1949 op->o_bd = be_orig;
1954 int backend_operational( Operation *op, SlapReply *rs )
1960 oex.oe_db = op->o_bd;
1962 LDAP_SLIST_INSERT_HEAD(&op->o_extra, &oex.oe, oe_next);
1966 be_orig = op->o_bd;
1967 op->o_bd = frontendDB;
1968 rc = frontendDB->be_operational( op, rs );
1969 op->o_bd = be_orig;
1970 LDAP_SLIST_REMOVE(&op->o_extra, &oex.oe, OpExtra, oe_next);