1 /* glue.c - backend glue overlay */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 * Copyright 2001-2005 The OpenLDAP Foundation.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted only as authorized by the OpenLDAP
12 * A copy of this license is available in the file LICENSE in the
13 * top-level directory of the distribution or, alternatively, at
14 * <http://www.OpenLDAP.org/license.html>.
17 * This work was initially developed by Luke Howard for inclusion
18 * in OpenLDAP Software.
25 #include <ac/string.h>
26 #include <ac/socket.h>
33 static slap_overinst slapi;
36 slapi_over_compute_output(
37 computed_attr_context *c,
38 Slapi_Attr *attribute,
44 AttributeDescription *desc;
45 Operation *op = c->cac_op;
46 SlapReply *rs = (SlapReply *)c->cac_private;
48 if ( c == NULL || attribute == NULL || entry == NULL ) {
52 assert( rs->sr_entry == entry );
54 desc = attribute->a_desc;
56 if ( rs->sr_attrs == NULL ) {
57 /* All attrs request, skip operational attributes */
58 if ( is_at_operational( desc->ad_type ) ) {
62 /* Specific attributes requested */
63 if ( is_at_operational( desc->ad_type ) ) {
64 if ( !SLAP_OPATTRS( rs->sr_attr_flags ) &&
65 !ad_inlist( desc, rs->sr_attrs ) ) {
69 if ( !SLAP_USERATTRS( rs->sr_attr_flags ) &&
70 !ad_inlist( desc, rs->sr_attrs ) ) {
76 if ( !access_allowed( op, entry, desc, NULL, ACL_READ, c->cac_acl_state) ) {
77 slapi_log_error( SLAPI_LOG_ACL, "slapi_over_compute_output",
78 "acl: access to attribute %s not allowed\n",
79 desc->ad_cname.bv_val );
83 for ( a = &rs->sr_operational_attrs; *a != NULL; a = &(*a)->a_next )
86 *a = attr_dup( attribute );
92 slapi_over_operational( Operation *op, SlapReply *rs )
94 /* Support for computed attribute plugins */
95 computed_attr_context ctx;
97 AccessControlState acl_state = ACL_STATE_INIT;
99 ctx.cac_pb = op->o_pb;
101 ctx.cac_private = rs;
102 ctx.cac_acl_state = &acl_state;
104 if ( rs->sr_entry != NULL ) {
106 * For each client requested attribute, call the plugins.
108 if ( rs->sr_attrs != NULL ) {
109 for ( anp = rs->sr_attrs; anp->an_name.bv_val != NULL; anp++ ) {
110 if ( compute_evaluator( &ctx, anp->an_name.bv_val,
111 rs->sr_entry, slapi_over_compute_output ) == 1 ) {
117 * Technically we shouldn't be returning operational attributes
118 * when the user requested only user attributes. We'll let the
119 * plugin decide whether to be naughty or not.
121 compute_evaluator( &ctx, "*", rs->sr_entry, slapi_over_compute_output );
125 return SLAP_CB_CONTINUE;
129 slapi_over_search( Operation *op, SlapReply *rs, int type )
134 pb = slapi_pblock_new();
136 slapi_int_pblock_set_operation( pb, op );
137 slapi_pblock_set( pb, SLAPI_RESCONTROLS, (void *)rs->sr_ctrls );
138 slapi_pblock_set( pb, SLAPI_SEARCH_RESULT_ENTRY, (void *)rs->sr_entry );
140 rc = slapi_int_call_plugins( op->o_bd, type, pb );
142 rc = SLAP_CB_CONTINUE;
144 if ( rs->sr_type == REP_SEARCH ) {
145 /* XXX we shouldn't need this here */
146 slapi_over_operational( op, rs );
149 slapi_pblock_set( op->o_pb, SLAPI_RESCONTROLS, NULL );
150 slapi_pblock_destroy(pb);
156 slapi_over_merge_controls( Operation *op, SlapReply *rs, Slapi_PBlock *pb)
158 LDAPControl **slapiControls = NULL, **resControls;
159 int nSlapiControls = 0;
160 int nResControls = 0;
163 /* merge in controls */
164 if ( rs->sr_ctrls != NULL ) {
165 for ( nResControls = 0; rs->sr_ctrls[nResControls] != NULL; nResControls++ )
168 slapi_pblock_get( op->o_pb, SLAPI_RESCONTROLS, (void **)&slapiControls );
169 if ( slapiControls != NULL ) {
170 for ( nSlapiControls = 0; slapiControls[nSlapiControls] != NULL; nSlapiControls++ )
174 /* XXX this is a bit tricky, rs->sr_ctrls may have been allocated on stack */
175 resControls = (LDAPControl **)op->o_tmpalloc( ( nResControls + nSlapiControls + 1 ) *
176 sizeof( LDAPControl *), op->o_tmpmemctx );
177 if ( resControls == NULL ) {
181 if ( rs->sr_ctrls != NULL ) {
182 for ( i = 0; i < nResControls; i++ )
183 resControls[i] = rs->sr_ctrls[i];
185 if ( slapiControls != NULL ) {
186 for ( i = 0; i < nSlapiControls; i++ )
187 resControls[nResControls + i] = slapiControls[i];
189 resControls[nResControls + nSlapiControls] = NULL;
191 if ( slapiControls != NULL ) {
192 slapi_ch_free( (void **)&slapiControls );
193 slapi_pblock_set( op->o_pb, SLAPI_RESCONTROLS, NULL ); /* don't free */
196 rs->sr_ctrls = resControls;
202 slapi_over_result( Operation *op, SlapReply *rs )
206 slapi_pblock_set( op->o_pb, SLAPI_RESULT_CODE, (void *)rs->sr_err );
207 slapi_pblock_set( op->o_pb, SLAPI_RESULT_TEXT, (void *)rs->sr_text );
208 slapi_pblock_set( op->o_pb, SLAPI_RESULT_MATCHED, (void *)rs->sr_matched );
210 rc = slapi_int_call_plugins( op->o_bd, SLAPI_PLUGIN_PRE_RESULT_FN, op->o_pb );
215 slapi_pblock_get( op->o_pb, SLAPI_RESULT_CODE, (void **)&rs->sr_err );
216 slapi_pblock_get( op->o_pb, SLAPI_RESULT_TEXT, (void **)&rs->sr_text );
217 slapi_pblock_get( op->o_pb, SLAPI_RESULT_MATCHED, (void **)&rs->sr_matched );
220 rc = slapi_over_merge_controls( op, rs, op->o_pb );
224 rc = SLAP_CB_CONTINUE;
230 slapi_op_add_init( Operation *op, SlapReply *rs, Slapi_PBlock *pb )
232 slapi_pblock_set( pb, SLAPI_ADD_ENTRY, (void *)op->ora_e );
238 slapi_op_bind_init( Operation *op, SlapReply *rs, Slapi_PBlock *pb )
240 slapi_pblock_set( pb, SLAPI_BIND_TARGET, (void *)op->o_req_dn.bv_val );
241 slapi_pblock_set( pb, SLAPI_BIND_METHOD, (void *)op->orb_method );
242 slapi_pblock_set( pb, SLAPI_BIND_CREDENTIALS, (void *)&op->orb_cred );
243 slapi_pblock_set( pb, SLAPI_CONN_DN, NULL );
249 slapi_op_bind_callback( Operation *op, SlapReply *rs, Slapi_PBlock *pb )
254 case SLAPI_BIND_SUCCESS:
255 /* Continue with backend processing */
257 case SLAPI_BIND_FAIL:
258 /* Failure, frontend (that's us) sends result */
259 rs->sr_err = LDAP_INVALID_CREDENTIALS;
260 send_ldap_result( op, rs );
263 case SLAPI_BIND_ANONYMOUS: /* undocumented */
266 * Plugin sent authoritative result or no plugins were called
268 if ( slapi_pblock_get( pb, SLAPI_RESULT_CODE, (void **)&rs->sr_err ) != 0 ) {
269 rs->sr_err = LDAP_OTHER;
272 BER_BVZERO( &op->orb_edn );
274 if ( rs->sr_err == LDAP_SUCCESS ) {
275 slapi_pblock_get( pb, SLAPI_CONN_DN, (void *)&op->orb_edn.bv_val );
276 if ( BER_BVISNULL( &op->orb_edn ) ) {
278 /* No plugins were called; continue processing */
282 op->orb_edn.bv_len = strlen( op->orb_edn.bv_val );
284 rs->sr_err = dnPrettyNormal( NULL, &op->orb_edn,
285 &op->o_req_dn, &op->o_req_ndn, op->o_tmpmemctx );
286 ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
287 ber_dupbv(&op->o_conn->c_dn, &op->o_req_dn);
288 ber_dupbv(&op->o_conn->c_ndn, &op->o_req_ndn);
289 op->o_tmpfree( op->o_req_dn.bv_val, op->o_tmpmemctx );
290 BER_BVZERO( &op->o_req_dn );
291 op->o_tmpfree( op->o_req_ndn.bv_val, op->o_tmpmemctx );
292 BER_BVZERO( &op->o_req_ndn );
293 if ( !BER_BVISEMPTY( &op->o_conn->c_dn ) ) {
294 ber_len_t max = sockbuf_max_incoming_auth;
295 ber_sockbuf_ctrl( op->o_conn->c_sb,
296 LBER_SB_OPT_SET_MAX_INCOMING, &max );
298 /* log authorization identity */
299 Statslog( LDAP_DEBUG_STATS,
300 "%s BIND dn=\"%s\" mech=%s (SLAPI) ssf=0\n",
302 BER_BVISNULL( &op->o_conn->c_dn )
303 ? "<empty>" : op->o_conn->c_dn.bv_val,
304 op->orb_tmp_mech.bv_val, 0, 0 );
315 slapi_op_compare_init( Operation *op, SlapReply *rs, Slapi_PBlock *pb )
317 slapi_pblock_set( pb, SLAPI_COMPARE_TYPE, (void *)op->orc_ava->aa_desc->ad_cname.bv_val );
318 slapi_pblock_set( pb, SLAPI_COMPARE_VALUE, (void *)&op->orc_ava->aa_value );
324 slapi_op_modify_init( Operation *op, SlapReply *rs, Slapi_PBlock *pb )
326 LDAPMod **modv = NULL;
328 modv = slapi_int_modifications2ldapmods( &op->orm_modlist );
329 slapi_pblock_set( pb, SLAPI_MODIFY_MODS, (void *)modv );
335 slapi_op_modify_callback( Operation *op, SlapReply *rs, Slapi_PBlock *pb )
337 LDAPMod **modv = NULL;
339 /* check preoperation result code */
340 if ( rs->sr_err < 0 ) {
341 slapi_pblock_get( pb, SLAPI_RESULT_CODE, (void **)&rs->sr_err );
346 * NB: it is valid for the plugin to return no modifications
347 * (for example, a plugin might store some attributes elsewhere
348 * and remove them from the modification list; if only those
349 * attribute types were included in the modification request,
350 * then slapi_int_ldapmods2modifications() above will return
353 * However, the post-operation plugin should still be
357 slapi_pblock_get( pb, SLAPI_MODIFY_MODS, (void **)&modv );
358 op->orm_modlist = slapi_int_ldapmods2modifications( modv );
364 slapi_op_modify_cleanup( Operation *op, SlapReply *rs, Slapi_PBlock *pb )
366 LDAPMod **modv = NULL;
368 slapi_pblock_get( pb, SLAPI_MODIFY_MODS, (void **)&modv );
371 slapi_int_free_ldapmods( modv );
377 slapi_op_modrdn_init( Operation *op, SlapReply *rs, Slapi_PBlock *pb )
379 slapi_pblock_set( pb, SLAPI_MODRDN_NEWRDN, (void *)op->orr_newrdn.bv_val );
380 slapi_pblock_set( pb, SLAPI_MODRDN_NEWSUPERIOR, (void *)op->orr_newSup->bv_val );
381 slapi_pblock_set( pb, SLAPI_MODRDN_DELOLDRDN, (void *)op->orr_deleteoldrdn );
387 slapi_op_search_init( Operation *op, SlapReply *rs, Slapi_PBlock *pb )
391 attrs = anlist2charray_x( op->ors_attrs, 0, op->o_tmpmemctx );
393 slapi_pblock_set( pb, SLAPI_SEARCH_SCOPE, (void *)op->ors_scope );
394 slapi_pblock_set( pb, SLAPI_SEARCH_DEREF, (void *)op->ors_deref );
395 slapi_pblock_set( pb, SLAPI_SEARCH_SIZELIMIT, (void *)op->ors_slimit );
396 slapi_pblock_set( pb, SLAPI_SEARCH_TIMELIMIT, (void *)op->ors_tlimit );
397 slapi_pblock_set( pb, SLAPI_SEARCH_FILTER, (void *)op->ors_filter );
398 slapi_pblock_set( pb, SLAPI_SEARCH_STRFILTER, (void *)op->ors_filterstr.bv_val );
399 slapi_pblock_set( pb, SLAPI_SEARCH_ATTRS, (void *)attrs );
400 slapi_pblock_set( pb, SLAPI_SEARCH_ATTRSONLY, (void *)op->ors_attrsonly );
406 slapi_op_search_callback( Operation *op, SlapReply *rs, Slapi_PBlock *pb )
408 /* check preoperation result code */
409 if ( rs->sr_err < 0 ) {
410 slapi_pblock_get( pb, SLAPI_RESULT_CODE, (void **)&rs->sr_err );
414 if ( slapi_int_call_plugins( op->o_bd, SLAPI_PLUGIN_COMPUTE_SEARCH_REWRITER_FN, pb ) != 0 ) {
419 * The plugin can set the SLAPI_SEARCH_FILTER.
420 * SLAPI_SEARCH_STRFILER is not normative.
422 slapi_pblock_get( pb, SLAPI_SEARCH_FILTER, (void *)&op->ors_filter );
423 op->o_tmpfree( op->ors_filterstr.bv_val, op->o_tmpmemctx );
424 filter2bv_x( op, op->ors_filter, &op->ors_filterstr );
426 slapi_pblock_get( pb, SLAPI_SEARCH_TARGET, (void **)&op->o_req_dn.bv_val );
427 op->o_req_dn.bv_len = strlen( op->o_req_dn.bv_val );
429 if( !BER_BVISNULL( &op->o_req_ndn ) ) {
430 slap_sl_free( op->o_req_ndn.bv_val, op->o_tmpmemctx );
432 rs->sr_err = dnNormalize( 0, NULL, NULL, &op->o_req_dn, &op->o_req_ndn,
434 if ( rs->sr_err != LDAP_SUCCESS ) {
435 send_ldap_result( op, rs );
439 slapi_pblock_get( pb, SLAPI_SEARCH_SCOPE, (void **)&op->ors_scope );
440 slapi_pblock_get( pb, SLAPI_SEARCH_DEREF, (void **)&op->ors_deref );
446 slapi_op_search_cleanup( Operation *op, SlapReply *rs, Slapi_PBlock *pb )
450 slapi_pblock_get( pb, SLAPI_SEARCH_ATTRS, (void *)&attrs );
453 op->o_tmpfree( attrs, op->o_tmpmemctx );
458 typedef int (slapi_over_callback)( Operation *, SlapReply *rs, Slapi_PBlock * );
460 struct slapi_op_info {
463 slapi_over_callback *soi_init;
464 slapi_over_callback *soi_callback;
465 slapi_over_callback *soi_cleanup;
466 } slapi_op_dispatch_table[] = {
468 SLAPI_PLUGIN_PRE_BIND_FN,
469 SLAPI_PLUGIN_POST_BIND_FN,
471 slapi_op_bind_callback,
475 SLAPI_PLUGIN_PRE_UNBIND_FN, /* UNBIND */
476 SLAPI_PLUGIN_POST_UNBIND_FN,
482 SLAPI_PLUGIN_PRE_SEARCH_FN,
483 SLAPI_PLUGIN_POST_SEARCH_FN,
484 slapi_op_search_init,
485 slapi_op_search_callback,
486 slapi_op_search_cleanup
489 SLAPI_PLUGIN_PRE_COMPARE_FN,
490 SLAPI_PLUGIN_POST_COMPARE_FN,
491 slapi_op_compare_init,
496 SLAPI_PLUGIN_PRE_MODIFY_FN,
497 SLAPI_PLUGIN_POST_MODIFY_FN,
498 slapi_op_modify_init,
499 slapi_op_modify_callback,
500 slapi_op_modify_cleanup
503 SLAPI_PLUGIN_PRE_MODRDN_FN,
504 SLAPI_PLUGIN_POST_MODRDN_FN,
505 slapi_op_modrdn_init,
510 SLAPI_PLUGIN_PRE_ADD_FN,
511 SLAPI_PLUGIN_POST_ADD_FN,
517 SLAPI_PLUGIN_PRE_DELETE_FN,
518 SLAPI_PLUGIN_POST_DELETE_FN,
524 SLAPI_PLUGIN_PRE_ABANDON_FN,
525 SLAPI_PLUGIN_POST_ABANDON_FN,
540 slapi_tag2op( ber_tag_t tag )
551 case LDAP_REQ_DELETE:
554 case LDAP_REQ_MODRDN:
557 case LDAP_REQ_MODIFY:
560 case LDAP_REQ_COMPARE:
563 case LDAP_REQ_SEARCH:
566 case LDAP_REQ_UNBIND:
578 slapi_op_response( Operation *op, SlapReply *rs )
582 switch ( rs->sr_type ) {
584 rc = slapi_over_result( op, rs );
587 rc = slapi_over_search( op, rs, SLAPI_PLUGIN_PRE_ENTRY_FN );
590 rc = slapi_over_search( op, rs, SLAPI_PLUGIN_PRE_REFERRAL_FN );
593 rc = SLAP_CB_CONTINUE;
601 slapi_op_cleanup( Operation *op, SlapReply *rs )
603 struct slapi_op_info *opinfo;
604 Slapi_PBlock *pb = op->o_pb;
606 assert( pb != NULL );
608 if ( rs->sr_type != REP_RESULT ) {
609 return SLAP_CB_CONTINUE;
612 opinfo = (struct slapi_op_info *)op->o_callback->sc_private;
614 /* call post-operation plugins */
615 slapi_int_call_plugins( op->o_bd, opinfo->soi_postop, pb );
617 if ( opinfo->soi_cleanup != NULL ) {
618 (opinfo->soi_cleanup)( op, rs, pb );
621 return SLAP_CB_CONTINUE;
625 slapi_op_func( Operation *op, SlapReply *rs )
627 Slapi_PBlock *pb = op->o_pb;
628 slap_operation_t which;
629 struct slapi_op_info *opinfo;
636 * We check for op->o_extensions to verify that we are not
637 * processing a SLAPI internal operation. XXX
639 if ( op->o_pb == NULL || op->o_extensions == NULL ) {
640 return SLAP_CB_CONTINUE;
644 * Find the SLAPI operation information for this LDAP
645 * operation; this will contain the preop and postop
646 * plugin types, as well as any additional information
647 * we need to complete.
649 which = slapi_tag2op( op->o_tag );
650 if ( which >= op_last ) {
651 return SLAP_CB_CONTINUE;
654 opinfo = &slapi_op_dispatch_table[which];
655 if ( opinfo == NULL || opinfo->soi_preop == 0 ) {
656 return SLAP_CB_CONTINUE;
659 slapi_int_pblock_set_operation( pb, op );
662 * soi_init is responsible for setting any operation-specific
663 * pblock parameters ("pre-preoperation plugin")
665 if ( opinfo->soi_init != NULL ) {
666 rs->sr_err = (opinfo->soi_init)( op, rs, pb );
667 if ( rs->sr_err != LDAP_SUCCESS )
672 * Call preoperation plugins
674 rs->sr_err = slapi_int_call_plugins( op->o_bd, opinfo->soi_preop, pb );
677 * Setup callback so postoperation plugins will get called;
678 * don't do this before, because if a preop plugin fails then
679 * the postop plugin shouldn't be called
681 cb = op->o_tmpcalloc(1, sizeof(slap_callback), op->o_tmpmemctx);
682 cb->sc_response = slapi_op_response;
683 cb->sc_cleanup = slapi_op_cleanup;
684 cb->sc_private = opinfo;
685 cb->sc_next = op->o_callback;
689 * soi_callback is responsible for examining the result code
690 * of the preoperation plugin and determining whether to
691 * abort. This is needed because of special SLAPI behaviour
692 * with bind preoperation plugins.
694 * The soi_callback function is also used to reset any values
695 * returned from the preoperation plugin before calling the
696 * backend (for the success case).
698 if ( opinfo->soi_callback == NULL ) {
699 if ( rs->sr_err < 0 ) {
700 slapi_pblock_get( pb, SLAPI_RESULT_CODE, (void **)&rs->sr_err );
704 rc = (opinfo->soi_callback)( op, rs, pb );
709 if ( rs->sr_err == 0 ) {
710 rs->sr_err = SLAP_CB_CONTINUE;
717 slapi_over_extended( Operation *op, SlapReply *rs )
719 Slapi_PBlock *pb = op->o_pb;
723 struct berval reqdata = BER_BVNULL;
725 slapi_int_get_extop_plugin( &op->ore_reqoid, &callback );
726 if ( callback == NULL ) {
727 return SLAP_CB_CONTINUE;
730 slapi_int_pblock_set_operation( pb, op );
732 if ( op->ore_reqdata != NULL ) {
733 reqdata = *op->ore_reqdata;
736 slapi_pblock_set( pb, SLAPI_EXT_OP_REQ_OID, (void *)op->ore_reqoid.bv_val);
737 slapi_pblock_set( pb, SLAPI_EXT_OP_REQ_VALUE, (void *)&reqdata);
739 rc = (*callback)( pb );
740 if ( rc == SLAPI_PLUGIN_EXTENDED_SENT_RESULT ) {
742 } else if ( rc == SLAPI_PLUGIN_EXTENDED_NOT_HANDLED ) {
743 return SLAP_CB_CONTINUE;
746 slapi_pblock_get( pb, SLAPI_EXT_OP_RET_OID, (void **)&rs->sr_rspoid );
747 slapi_pblock_get( pb, SLAPI_EXT_OP_RET_VALUE, (void **)&rs->sr_rspdata );
750 send_ldap_extended( op, rs );
752 if ( rs->sr_rspoid != NULL )
753 slapi_ch_free_string( (char **)&rs->sr_rspoid );
755 if ( rs->sr_rspdata != NULL )
756 ber_bvfree( rs->sr_rspdata );
762 slapi_over_access_allowed(
765 AttributeDescription *desc,
767 slap_access_t access,
768 AccessControlState *state,
773 rc = slapi_int_access_allowed( op, e, desc, val, access, state );
775 rc = SLAP_CB_CONTINUE;
782 slapi_over_acl_group(
785 struct berval *gr_ndn,
786 struct berval *op_ndn,
787 ObjectClass *group_oc,
788 AttributeDescription *group_at )
790 slapi_pblock_set( op->o_pb, SLAPI_X_GROUP_ENTRY, (void *)e );
791 slapi_pblock_set( op->o_pb, SLAPI_X_GROUP_OPERATION_DN, (void *)op_ndn->bv_val );
792 slapi_pblock_set( op->o_pb, SLAPI_X_GROUP_ATTRIBUTE, (void *)group_at->ad_cname.bv_val );
793 slapi_pblock_set( op->o_pb, SLAPI_X_GROUP_TARGET_ENTRY, (void *)target );
797 slapi_over_compute_output_attr_access(computed_attr_context *c, Slapi_Attr *a, Slapi_Entry *e)
799 struct berval *nval = (struct berval *)c->cac_private;
801 return access_allowed( c->cac_op, e, a->a_desc, nval, ACL_AUTH, NULL ) == 0;
805 slapi_over_acl_attribute(
808 struct berval *entry_ndn,
809 AttributeDescription *entry_at,
811 slap_access_t access )
813 computed_attr_context ctx;
815 ctx.cac_pb = op->o_pb;
817 ctx.cac_acl_state = NULL;
818 ctx.cac_private = nval;
823 slapi_int_overlay_init()
825 memset( &slapi, 0, sizeof(slapi) );
827 slapi.on_bi.bi_type = "slapi";
829 slapi.on_bi.bi_op_bind = slapi_op_func;
830 slapi.on_bi.bi_op_unbind = slapi_op_func;
831 slapi.on_bi.bi_op_search = slapi_op_func;
832 slapi.on_bi.bi_op_compare = slapi_op_func;
833 slapi.on_bi.bi_op_modify = slapi_op_func;
834 slapi.on_bi.bi_op_modrdn = slapi_op_func;
835 slapi.on_bi.bi_op_add = slapi_op_func;
836 slapi.on_bi.bi_op_delete = slapi_op_func;
837 slapi.on_bi.bi_op_abandon = slapi_op_func;
838 slapi.on_bi.bi_op_cancel = slapi_op_func;
840 slapi.on_bi.bi_extended = slapi_over_extended;
841 slapi.on_bi.bi_access_allowed = slapi_over_access_allowed;
842 slapi.on_bi.bi_operational = slapi_over_operational;
844 return overlay_register( &slapi );
847 #endif /* LDAP_SLAPI */