Lines Matching refs:op
86 dds_expire_cb( Operation *op, SlapReply *rs )
88 dds_cb_t *dc = (dds_cb_t *)op->o_callback->sc_private;
95 de = op->o_tmpalloc( sizeof( dds_expire_t ) + rs->sr_entry->e_nname.bv_len + 1,
96 op->o_tmpmemctx );
125 Operation *op;
141 op = &opbuf.ob_op;
143 op->o_tag = LDAP_REQ_SEARCH;
144 memset( &op->oq_search, 0, sizeof( op->oq_search ) );
146 op->o_bd = select_backend( &di->di_nsuffix[ 0 ], 0 );
148 op->o_req_dn = op->o_bd->be_suffix[ 0 ];
149 op->o_req_ndn = op->o_bd->be_nsuffix[ 0 ];
151 op->o_dn = op->o_bd->be_rootdn;
152 op->o_ndn = op->o_bd->be_rootndn;
154 op->ors_scope = LDAP_SCOPE_SUBTREE;
155 op->ors_tlimit = DDS_INTERVAL( di )/2 + 1;
156 op->ors_slimit = SLAP_NO_LIMIT;
157 op->ors_attrs = slap_anlist_no_attrs;
164 op->ors_filterstr.bv_len = STRLENOF( "(&(objectClass=" ")(" "<=" "))" )
168 op->ors_filterstr.bv_val = op->o_tmpalloc( op->ors_filterstr.bv_len + 1, op->o_tmpmemctx );
169 snprintf( op->ors_filterstr.bv_val, op->ors_filterstr.bv_len + 1,
174 op->ors_filter = str2filter_x( op, op->ors_filterstr.bv_val );
175 if ( op->ors_filter == NULL ) {
180 op->o_callback = ≻
184 (void)op->o_bd->bd_info->bi_op_search( op, &rs );
187 op->o_tmpfree( op->ors_filterstr.bv_val, op->o_tmpmemctx );
188 filter_free_x( op, op->ors_filter, 1 );
208 op->o_tag = LDAP_REQ_DELETE;
209 op->o_callback = ≻
219 op->o_req_dn = de->de_ndn;
220 op->o_req_ndn = de->de_ndn;
221 (void)op->o_bd->bd_info->bi_op_delete( op, &rs );
249 op->o_tmpfree( de, op->o_tmpmemctx );
287 dds_freeit_cb( Operation *op, SlapReply *rs )
289 op->o_tmpfree( op->o_callback, op->o_tmpmemctx );
290 op->o_callback = NULL;
297 dds_counter_cb( Operation *op, SlapReply *rs )
302 dds_info_t *di = op->o_callback->sc_private;
305 switch ( op->o_tag ) {
322 return dds_freeit_cb( op, rs );
326 dds_op_add( Operation *op, SlapReply *rs )
328 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
336 is_dynamicObject = is_entry_dynamicObject( op->ora_e );
342 if ( is_entry_referral( op->ora_e ) ) {
346 } else if ( is_entry_alias( op->ora_e ) ) {
352 op->o_bd->bd_info = (BackendInfo *)on->on_info;
353 send_ldap_result( op, rs );
359 if ( !dn_match( &op->o_req_ndn, &op->o_bd->be_nsuffix[ 0 ] ) ) {
363 BackendInfo *bi = op->o_bd->bd_info;
365 dnParent( &op->o_req_ndn, &p_ndn );
366 op->o_bd->bd_info = (BackendInfo *)on->on_info;
367 rc = be_entry_get_rw( op, &p_ndn,
373 if ( ! access_allowed( op, e,
378 send_ldap_result( op, rs );
382 send_ldap_error( op, rs, rc, "no static subordinate entries allowed for dynamicObject" );
386 be_entry_release_r( op, e );
391 op->o_bd->bd_info = bi;
401 if ( !be_isroot_dn( op->o_bd, &op->o_req_ndn ) ) {
407 op->o_bd->bd_info = (BackendInfo *)on->on_info;
408 send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
423 /* FIXME: apparently, values in op->ora_e are malloc'ed
426 assert( attr_find( op->ora_e->e_attrs, slap_schema.si_ad_entryTtl ) == NULL );
427 attr_merge_one( op->ora_e, slap_schema.si_ad_entryTtl, &bv, &bv );
433 assert( attr_find( op->ora_e->e_attrs, ad_entryExpireTimestamp ) == NULL );
434 attr_merge_one( op->ora_e, ad_entryExpireTimestamp, &bv, &bv );
440 sc = op->o_tmpalloc( sizeof( slap_callback ), op->o_tmpmemctx );
444 sc->sc_next = op->o_callback;
446 op->o_callback = sc;
454 dds_op_delete( Operation *op, SlapReply *rs )
456 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
462 BackendInfo *bi = op->o_bd->bd_info;
464 op->o_bd->bd_info = (BackendInfo *)on->on_info;
465 rs->sr_err = be_entry_get_rw( op, &op->o_req_ndn,
472 be_entry_release_r( op, e );
475 sc = op->o_tmpalloc( sizeof( slap_callback ), op->o_tmpmemctx );
479 sc->sc_next = op->o_callback;
481 op->o_callback = sc;
483 op->o_bd->bd_info = bi;
490 dds_op_modify( Operation *op, SlapReply *rs )
492 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
496 BackendInfo *bi = op->o_bd->bd_info;
517 op->o_bd->bd_info = (BackendInfo *)on->on_info;
518 rs->sr_err = be_entry_get_rw( op, &op->o_req_ndn,
536 be_entry_release_r( op, e );
540 op->o_bd->bd_info = bi;
543 for ( mod = op->orm_modlist; mod; mod = mod->sml_next ) {
595 rs->sr_err = backend_attribute( op, NULL, &op->o_req_ndn,
622 rs->sr_err = backend_attribute( op, NULL, &op->o_req_ndn,
660 rs->sr_err = backend_attribute( op, NULL, &op->o_req_ndn,
686 rc = backend_attribute( op, NULL, &op->o_req_ndn,
733 if ( get_relax( op ) ) {
768 rc = backend_attribute( op, NULL, &op->o_req_ndn,
781 for ( modp = &op->orm_modlist; *modp; modp = &(*modp)->sml_next )
815 op->o_bd->bd_info = (BackendInfo *)on->on_info;
816 send_ldap_result( op, rs );
824 dds_op_rename( Operation *op, SlapReply *rs )
826 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
834 if ( op->orr_nnewSup != NULL ) {
836 BackendInfo *bi = op->o_bd->bd_info;
842 op->o_bd->bd_info = (BackendInfo *)on->on_info;
843 rc = be_entry_get_rw( op, &op->o_req_ndn,
846 be_entry_release_r( op, e );
851 rc = be_entry_get_rw( op, op->orr_nnewSup,
857 if ( ! access_allowed( op, e,
862 send_ldap_result( op, rs );
865 send_ldap_error( op, rs, LDAP_CONSTRAINT_VIOLATION,
869 be_entry_release_r( op, e );
871 op->o_bd->bd_info = bi;
994 dds_op_extended( Operation *op, SlapReply *rs )
996 slap_overinst *on = (slap_overinst *)op->o_bd->bd_info;
1003 if ( bvmatch( &op->ore_reqoid, &slap_EXOP_REFRESH ) ) {
1006 BackendDB db = *op->o_bd;
1008 Operation op2 = *op;
1014 rs->sr_err = slap_parse_refresh( op->ore_reqdata, NULL, &ttl,
1038 if ( !( !SLAP_SINGLE_SHADOW( op->o_bd ) || be_isupdate( op ) ) ) {
1040 BerVarray defref = op->o_bd->be_update_refs
1041 ? op->o_bd->be_update_refs : default_referral;
1044 rs->sr_ref = referral_rewrite( op->o_bd->be_update_refs,
1061 assert( !BER_BVISNULL( &op->o_req_ndn ) );
1066 op->o_bd->bd_info = (BackendInfo *)on->on_info;
1067 rs->sr_err = be_entry_get_rw( op, &op->o_req_ndn,
1070 rs->sr_err = be_entry_get_rw( op, &op->o_req_ndn,
1075 if ( ! access_allowed( op, e,
1085 be_entry_release_r( op, e );
1093 be_entry_release_r( op, e );
1141 op->o_log_prefix, op->o_req_ndn.bv_val, ttl );
1245 dds_cfadd( Operation *op, SlapReply *rs, Entry *p, ConfigArgs *ca )
1260 if ( c->op == SLAP_CONFIG_EMIT ) {
1335 } else if ( c->op == LDAP_MOD_DELETE ) {
1596 dds_count_cb( Operation *op, SlapReply *rs )
1598 int *nump = (int *)op->o_callback->sc_private;
1625 Operation *op;
1633 op = &opbuf.ob_op;
1635 op->o_tag = LDAP_REQ_SEARCH;
1636 memset( &op->oq_search, 0, sizeof( op->oq_search ) );
1638 op->o_bd = be;
1640 op->o_req_dn = op->o_bd->be_suffix[ 0 ];
1641 op->o_req_ndn = op->o_bd->be_nsuffix[ 0 ];
1643 op->o_dn = op->o_bd->be_rootdn;
1644 op->o_ndn = op->o_bd->be_rootndn;
1646 op->ors_scope = LDAP_SCOPE_SUBTREE;
1647 op->ors_tlimit = SLAP_NO_LIMIT;
1648 op->ors_slimit = SLAP_NO_LIMIT;
1649 op->ors_attrs = slap_anlist_no_attrs;
1651 op->ors_filterstr.bv_len = STRLENOF( "(objectClass=" ")" )
1653 op->ors_filterstr.bv_val = op->o_tmpalloc( op->ors_filterstr.bv_len + 1, op->o_tmpmemctx );
1654 snprintf( op->ors_filterstr.bv_val, op->ors_filterstr.bv_len + 1,
1658 op->ors_filter = str2filter_x( op, op->ors_filterstr.bv_val );
1659 if ( op->ors_filter == NULL ) {
1664 op->o_callback = ≻
1669 op->o_bd->bd_info = (BackendInfo *)on->on_info;
1670 (void)op->o_bd->bd_info->bi_op_search( op, &rs );
1671 op->o_bd->bd_info = (BackendInfo *)on;
1674 op->o_tmpfree( op->ors_filterstr.bv_val, op->o_tmpmemctx );
1675 filter_free_x( op, op->ors_filter, 1 );
1809 Operation *op,
1812 BackendDB *bd = op->o_bd;
1814 rs->sr_err = slap_parse_refresh( op->ore_reqdata, &op->o_req_ndn, NULL,
1815 &rs->sr_text, op->o_tmpmemctx );
1822 op->o_log_prefix, op->o_req_ndn.bv_val );
1823 op->o_req_dn = op->o_req_ndn;
1825 op->o_bd = select_backend( &op->o_req_ndn, 0 );
1826 if ( op->o_bd == NULL ) {
1827 send_ldap_error( op, rs, LDAP_NO_SUCH_OBJECT,
1832 if ( !SLAP_DYNAMIC( op->o_bd ) ) {
1833 send_ldap_error( op, rs, LDAP_UNAVAILABLE_CRITICAL_EXTENSION,
1838 rs->sr_err = backend_check_restrictions( op, rs,
1844 if ( op->o_bd->be_extended == NULL ) {
1845 send_ldap_error( op, rs, LDAP_UNAVAILABLE_CRITICAL_EXTENSION,
1850 op->o_bd->be_extended( op, rs );
1853 if ( !BER_BVISNULL( &op->o_req_ndn ) ) {
1854 op->o_tmpfree( op->o_req_ndn.bv_val, op->o_tmpmemctx );
1855 BER_BVZERO( &op->o_req_ndn );
1856 BER_BVZERO( &op->o_req_dn );
1858 op->o_bd = bd;