1 /* slapi_overlay.c - SLAPI overlay */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 * Copyright 2001-2006 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;
34 static int slapi_over_initialized = 0;
36 static int slapi_over_response( Operation *op, SlapReply *rs );
37 static int slapi_over_cleanup( Operation *op, SlapReply *rs );
40 slapi_over_pblock_new( Operation *op, SlapReply *rs )
44 pb = slapi_pblock_new();
46 pb->pb_conn = op->o_conn;
50 PBLOCK_ASSERT_OP( pb, op->o_tag );
56 slapi_op_internal_p( Operation *op, SlapReply *rs, slap_callback *cb )
59 Slapi_PBlock *pb = NULL;
63 * Abstraction violating check for SLAPI internal operations
64 * allows pblock to remain consistent when invoking internal
67 for ( pcb = op->o_callback; pcb != NULL; pcb = pcb->sc_next ) {
68 if ( pcb->sc_response == slapi_int_response ) {
69 pb = (Slapi_PBlock *)pcb->sc_private;
70 PBLOCK_ASSERT_INTOP( pb, 0 );
78 pb = slapi_over_pblock_new( op, rs );
81 cb->sc_response = slapi_over_response;
82 cb->sc_cleanup = slapi_over_cleanup;
84 cb->sc_next = op->o_callback;
92 slapi_over_compute_output(
93 computed_attr_context *c,
94 Slapi_Attr *attribute,
99 AttributeDescription *desc;
102 if ( c == NULL || attribute == NULL || entry == NULL ) {
106 rs = (SlapReply *)c->cac_private;
108 assert( rs->sr_entry == entry );
110 desc = attribute->a_desc;
112 if ( rs->sr_attrs == NULL ) {
113 /* All attrs request, skip operational attributes */
114 if ( is_at_operational( desc->ad_type ) ) {
118 /* Specific attributes requested */
119 if ( is_at_operational( desc->ad_type ) ) {
120 if ( !SLAP_OPATTRS( rs->sr_attr_flags ) &&
121 !ad_inlist( desc, rs->sr_attrs ) ) {
125 if ( !SLAP_USERATTRS( rs->sr_attr_flags ) &&
126 !ad_inlist( desc, rs->sr_attrs ) ) {
132 /* XXX perhaps we should check for existing attributes and merge */
133 for ( a = &rs->sr_operational_attrs; *a != NULL; a = &(*a)->a_next )
136 *a = slapi_attr_dup( attribute );
142 slapi_over_aux_operational( Operation *op, SlapReply *rs )
144 /* Support for computed attribute plugins */
145 computed_attr_context ctx;
148 if ( slapi_op_internal_p( op, rs, NULL ) ) {
149 return SLAP_CB_CONTINUE;
152 ctx.cac_pb = slapi_over_pblock_new( op, rs );
154 ctx.cac_private = rs;
156 if ( rs->sr_entry != NULL ) {
158 * For each client requested attribute, call the plugins.
160 if ( rs->sr_attrs != NULL ) {
161 for ( anp = rs->sr_attrs; anp->an_name.bv_val != NULL; anp++ ) {
162 if ( compute_evaluator( &ctx, anp->an_name.bv_val,
163 rs->sr_entry, slapi_over_compute_output ) == 1 ) {
169 * Technically we shouldn't be returning operational attributes
170 * when the user requested only user attributes. We'll let the
171 * plugin decide whether to be naughty or not.
173 compute_evaluator( &ctx, "*", rs->sr_entry, slapi_over_compute_output );
177 slapi_pblock_destroy( ctx.cac_pb );
179 return SLAP_CB_CONTINUE;
183 * We need this function to call frontendDB (global) plugins before
184 * database plugins, if we are invoked by a slap_callback.
187 slapi_over_call_plugins( Slapi_PBlock *pb, int type )
189 int rc = 1; /* means no plugins called */
192 PBLOCK_ASSERT_OP( pb, 0 );
195 if ( !be_match( op->o_bd, frontendDB ) ) {
196 rc = slapi_int_call_plugins( frontendDB, type, pb );
199 rc = slapi_int_call_plugins( op->o_bd, type, pb );
206 slapi_over_search( Operation *op, SlapReply *rs, int type )
211 assert( rs->sr_type == REP_SEARCH || rs->sr_type == REP_SEARCHREF );
213 /* create a new pblock to not trample on result controls */
214 pb = slapi_over_pblock_new( op, rs );
216 rc = slapi_over_call_plugins( pb, type );
217 if ( rc >= 0 ) /* 1 means no plugins called */
218 rc = SLAP_CB_CONTINUE;
220 rc = LDAP_SUCCESS; /* confusing: don't abort, but don't send */
222 slapi_pblock_destroy(pb);
228 * Call pre- and post-result plugins
231 slapi_over_result( Operation *op, SlapReply *rs, int type )
233 Slapi_PBlock *pb = SLAPI_OPERATION_PBLOCK( op );
235 assert( rs->sr_type == REP_RESULT || rs->sr_type == REP_SASL || rs->sr_type == REP_EXTENDED );
237 slapi_over_call_plugins( pb, type );
239 return SLAP_CB_CONTINUE;
244 slapi_op_bind_callback( Operation *op, SlapReply *rs, int prc )
247 case SLAPI_BIND_SUCCESS:
248 /* Continue with backend processing */
250 case SLAPI_BIND_FAIL:
251 /* Failure, frontend (that's us) sends result */
252 rs->sr_err = LDAP_INVALID_CREDENTIALS;
253 send_ldap_result( op, rs );
256 case SLAPI_BIND_ANONYMOUS: /* undocumented */
257 default: /* plugin sent result or no plugins called */
258 BER_BVZERO( &op->orb_edn );
260 if ( rs->sr_err == LDAP_SUCCESS ) {
262 * Plugin will have called slapi_pblock_set(LDAP_CONN_DN) which
263 * will have set conn->c_dn and conn->c_ndn
265 if ( BER_BVISNULL( &op->o_conn->c_ndn ) && prc == 1 ) {
266 /* No plugins were called; continue processing */
269 ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
270 if ( !BER_BVISEMPTY( &op->o_conn->c_ndn ) ) {
271 ber_len_t max = sockbuf_max_incoming_auth;
272 ber_sockbuf_ctrl( op->o_conn->c_sb,
273 LBER_SB_OPT_SET_MAX_INCOMING, &max );
275 ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );
277 /* log authorization identity */
278 Statslog( LDAP_DEBUG_STATS,
279 "%s BIND dn=\"%s\" mech=%s (SLAPI) ssf=0\n",
281 BER_BVISNULL( &op->o_conn->c_dn )
282 ? "<empty>" : op->o_conn->c_dn.bv_val,
283 BER_BVISNULL( &op->orb_tmp_mech )
284 ? "<empty>" : op->orb_tmp_mech.bv_val, 0, 0 );
295 slapi_op_search_callback( Operation *op, SlapReply *rs, int prc )
297 Slapi_PBlock *pb = SLAPI_OPERATION_PBLOCK( op );
299 /* check preoperation result code */
304 rs->sr_err = LDAP_SUCCESS;
306 if ( pb->pb_intop == 0 &&
307 slapi_int_call_plugins( op->o_bd, SLAPI_PLUGIN_COMPUTE_SEARCH_REWRITER_FN, pb ) == 0 ) {
309 * The plugin can set the SLAPI_SEARCH_FILTER.
310 * SLAPI_SEARCH_STRFILER is not normative.
312 op->o_tmpfree( op->ors_filterstr.bv_val, op->o_tmpmemctx );
313 filter2bv_x( op, op->ors_filter, &op->ors_filterstr );
319 struct slapi_op_info {
320 int soi_preop; /* preoperation plugin parameter */
321 int soi_postop; /* postoperation plugin parameter */
322 int soi_internal_preop; /* internal preoperation plugin parameter */
323 int soi_internal_postop; /* internal postoperation plugin parameter */
324 int (*soi_callback)(Operation *, SlapReply *, int); /* preoperation result handler */
325 } slapi_op_dispatch_table[] = {
327 SLAPI_PLUGIN_PRE_BIND_FN,
328 SLAPI_PLUGIN_POST_BIND_FN,
329 SLAPI_PLUGIN_INTERNAL_PRE_BIND_FN,
330 SLAPI_PLUGIN_INTERNAL_POST_BIND_FN,
331 slapi_op_bind_callback
334 SLAPI_PLUGIN_PRE_UNBIND_FN,
335 SLAPI_PLUGIN_POST_UNBIND_FN,
336 SLAPI_PLUGIN_INTERNAL_PRE_UNBIND_FN,
337 SLAPI_PLUGIN_INTERNAL_POST_UNBIND_FN,
341 SLAPI_PLUGIN_PRE_SEARCH_FN,
342 SLAPI_PLUGIN_POST_SEARCH_FN,
343 SLAPI_PLUGIN_INTERNAL_PRE_SEARCH_FN,
344 SLAPI_PLUGIN_INTERNAL_POST_SEARCH_FN,
345 slapi_op_search_callback
348 SLAPI_PLUGIN_PRE_COMPARE_FN,
349 SLAPI_PLUGIN_POST_COMPARE_FN,
350 SLAPI_PLUGIN_INTERNAL_PRE_COMPARE_FN,
351 SLAPI_PLUGIN_INTERNAL_POST_COMPARE_FN,
355 SLAPI_PLUGIN_PRE_MODIFY_FN,
356 SLAPI_PLUGIN_POST_MODIFY_FN,
357 SLAPI_PLUGIN_INTERNAL_PRE_MODIFY_FN,
358 SLAPI_PLUGIN_INTERNAL_POST_MODIFY_FN,
362 SLAPI_PLUGIN_PRE_MODRDN_FN,
363 SLAPI_PLUGIN_POST_MODRDN_FN,
364 SLAPI_PLUGIN_INTERNAL_PRE_MODRDN_FN,
365 SLAPI_PLUGIN_INTERNAL_POST_MODRDN_FN,
369 SLAPI_PLUGIN_PRE_ADD_FN,
370 SLAPI_PLUGIN_POST_ADD_FN,
371 SLAPI_PLUGIN_INTERNAL_PRE_ADD_FN,
372 SLAPI_PLUGIN_INTERNAL_POST_ADD_FN,
376 SLAPI_PLUGIN_PRE_DELETE_FN,
377 SLAPI_PLUGIN_POST_DELETE_FN,
378 SLAPI_PLUGIN_INTERNAL_PRE_DELETE_FN,
379 SLAPI_PLUGIN_INTERNAL_POST_DELETE_FN,
383 SLAPI_PLUGIN_PRE_ABANDON_FN,
384 SLAPI_PLUGIN_POST_ABANDON_FN,
385 SLAPI_PLUGIN_INTERNAL_PRE_ABANDON_FN,
386 SLAPI_PLUGIN_INTERNAL_POST_ABANDON_FN,
399 slapi_tag2op( ber_tag_t tag )
410 case LDAP_REQ_DELETE:
413 case LDAP_REQ_MODRDN:
416 case LDAP_REQ_MODIFY:
419 case LDAP_REQ_COMPARE:
422 case LDAP_REQ_SEARCH:
425 case LDAP_REQ_UNBIND:
436 /* Add SLAPI_RESCONTROLS to rs->sr_ctrls, with care, because
437 * rs->sr_ctrls could be allocated on the stack */
439 slapi_over_merge_controls( Operation *op, SlapReply *rs )
441 Slapi_PBlock *pb = SLAPI_OPERATION_PBLOCK( op );
442 LDAPControl **ctrls = NULL;
443 LDAPControl **slapi_ctrls = NULL;
444 size_t n_slapi_ctrls = 0;
445 size_t n_rs_ctrls = 0;
448 slapi_pblock_get( pb, SLAPI_RESCONTROLS, (void **)&slapi_ctrls );
450 n_slapi_ctrls = slapi_int_count_controls( slapi_ctrls );
451 n_rs_ctrls = slapi_int_count_controls( rs->sr_ctrls );
453 slapi_pblock_set( pb, SLAPI_X_OLD_RESCONTROLS, (void *)rs->sr_ctrls );
455 if ( n_slapi_ctrls == 0 )
456 return LDAP_SUCCESS; /* no SLAPI controls */
458 ctrls = (LDAPControl **) op->o_tmpalloc(
459 ( n_slapi_ctrls + n_rs_ctrls + 1 ) * sizeof(LDAPControl *),
462 for ( i = 0; i < n_slapi_ctrls; i++ ) {
463 ctrls[i] = slapi_ctrls[i];
465 if ( rs->sr_ctrls != NULL ) {
466 for ( i = 0; i < n_rs_ctrls; i++ ) {
467 ctrls[n_slapi_ctrls + i] = rs->sr_ctrls[i];
470 ctrls[n_slapi_ctrls + n_rs_ctrls] = NULL;
472 rs->sr_ctrls = ctrls;
478 slapi_over_unmerge_controls( Operation *op, SlapReply *rs )
480 Slapi_PBlock *pb = SLAPI_OPERATION_PBLOCK( op );
481 LDAPControl **rs_ctrls = NULL;
483 slapi_pblock_get( pb, SLAPI_X_OLD_RESCONTROLS, (void **)&rs_ctrls );
485 if ( rs_ctrls == NULL || rs->sr_ctrls == rs_ctrls ) {
486 /* no copying done */
490 op->o_tmpfree( rs->sr_ctrls, op->o_tmpmemctx );
491 rs->sr_ctrls = rs_ctrls;
497 slapi_over_response( Operation *op, SlapReply *rs )
499 Slapi_PBlock *pb = SLAPI_OPERATION_PBLOCK( op );
500 int rc = SLAP_CB_CONTINUE;
502 if ( pb->pb_intop == 0 ) {
503 switch ( rs->sr_type ) {
507 rc = slapi_over_result( op, rs, SLAPI_PLUGIN_PRE_RESULT_FN );
510 rc = slapi_over_search( op, rs, SLAPI_PLUGIN_PRE_ENTRY_FN );
513 rc = slapi_over_search( op, rs, SLAPI_PLUGIN_PRE_REFERRAL_FN );
520 slapi_over_merge_controls( op, rs );
526 slapi_over_cleanup( Operation *op, SlapReply *rs )
528 Slapi_PBlock *pb = SLAPI_OPERATION_PBLOCK( op );
529 int rc = SLAP_CB_CONTINUE;
531 slapi_over_unmerge_controls( op, rs );
533 if ( pb->pb_intop == 0 ) {
534 switch ( rs->sr_type ) {
538 rc = slapi_over_result( op, rs, SLAPI_PLUGIN_POST_RESULT_FN );
541 rc = slapi_over_search( op, rs, SLAPI_PLUGIN_POST_ENTRY_FN );
544 rc = slapi_over_search( op, rs, SLAPI_PLUGIN_POST_REFERRAL_FN );
555 slapi_op_func( Operation *op, SlapReply *rs )
558 slap_operation_t which;
559 struct slapi_op_info *opinfo;
565 int preop_type, postop_type;
568 if ( !slapi_plugins_used )
569 return SLAP_CB_CONTINUE;
572 * Find the SLAPI operation information for this LDAP
573 * operation; this will contain the preop and postop
574 * plugin types, as well as optional callbacks for
575 * setting up the SLAPI environment.
577 which = slapi_tag2op( op->o_tag );
578 if ( which >= op_last ) {
579 /* invalid operation, but let someone else deal with it */
580 return SLAP_CB_CONTINUE;
583 opinfo = &slapi_op_dispatch_table[which];
584 if ( opinfo == NULL ) {
585 /* no SLAPI plugin types for this operation */
586 return SLAP_CB_CONTINUE;
589 internal_op = slapi_op_internal_p( op, rs, &cb );
592 preop_type = opinfo->soi_internal_preop;
593 postop_type = opinfo->soi_internal_postop;
595 preop_type = opinfo->soi_preop;
596 postop_type = opinfo->soi_postop;
599 if ( preop_type == 0 ) {
600 /* no SLAPI plugin types for this operation */
602 rc = SLAP_CB_CONTINUE;
606 pb = SLAPI_OPERATION_PBLOCK( op );
608 /* cache backend so we call correct postop plugins */
609 be = pb->pb_op->o_bd;
611 rc = slapi_int_call_plugins( be, preop_type, pb );
614 * soi_callback is responsible for examining the result code
615 * of the preoperation plugin and determining whether to
616 * abort. This is needed because of special SLAPI behaviour
617 e with bind preoperation plugins.
619 * The soi_callback function is also used to reset any values
620 * returned from the preoperation plugin before calling the
621 * backend (for the success case).
623 if ( opinfo->soi_callback == NULL ) {
624 /* default behaviour is preop plugin can abort operation */
630 rc = (opinfo->soi_callback)( op, rs, rc );
636 * Call actual backend (or next overlay in stack). We need to
637 * do this rather than returning SLAP_CB_CONTINUE and calling
638 * postoperation plugins in a response handler to match the
639 * behaviour of SLAPI in OpenLDAP 2.2, where postoperation
640 * plugins are called after the backend has completely
641 * finished processing the operation.
643 on = (slap_overinst *)op->o_bd->bd_info;
646 rc = overlay_op_walk( op, rs, which, oi, on->on_next );
649 * Call postoperation plugins
651 slapi_int_call_plugins( be, postop_type, pb );
654 if ( !internal_op ) {
655 slapi_pblock_destroy(pb);
656 cb.sc_private = NULL;
659 op->o_callback = cb.sc_next;
665 slapi_over_extended( Operation *op, SlapReply *rs )
673 slapi_int_get_extop_plugin( &op->ore_reqoid, &callback );
674 if ( callback == NULL ) {
675 return SLAP_CB_CONTINUE;
678 internal_op = slapi_op_internal_p( op, rs, &cb );
680 return SLAP_CB_CONTINUE;
683 pb = SLAPI_OPERATION_PBLOCK( op );
685 rc = (*callback)( pb );
686 if ( rc == SLAPI_PLUGIN_EXTENDED_SENT_RESULT ) {
688 } else if ( rc == SLAPI_PLUGIN_EXTENDED_NOT_HANDLED ) {
689 rc = SLAP_CB_CONTINUE;
693 assert( rs->sr_rspoid != NULL );
695 send_ldap_extended( op, rs );
698 slapi_ch_free_string( (char **)&rs->sr_rspoid );
701 if ( rs->sr_rspdata != NULL )
702 ber_bvfree( rs->sr_rspdata );
707 slapi_pblock_destroy( pb );
708 op->o_callback = cb.sc_next;
714 slapi_over_access_allowed(
717 AttributeDescription *desc,
719 slap_access_t access,
720 AccessControlState *state,
727 SlapReply rs = { REP_RESULT };
729 internal_op = slapi_op_internal_p( op, &rs, &cb );
731 cb.sc_response = NULL;
732 cb.sc_cleanup = NULL;
734 pb = SLAPI_OPERATION_PBLOCK( op );
736 rc = slapi_int_access_allowed( op, e, desc, val, access, state );
738 rc = SLAP_CB_CONTINUE;
741 if ( !internal_op ) {
742 slapi_pblock_destroy( pb );
745 op->o_callback = cb.sc_next;
751 slapi_over_acl_group(
754 struct berval *gr_ndn,
755 struct berval *op_ndn,
756 ObjectClass *group_oc,
757 AttributeDescription *group_at )
762 BackendDB *be = op->o_bd;
764 SlapReply rs = { REP_RESULT };
766 op->o_bd = select_backend( gr_ndn, 0, 0 );
768 for ( g = op->o_groups; g; g = g->ga_next ) {
769 if ( g->ga_be != op->o_bd || g->ga_oc != group_oc ||
770 g->ga_at != group_at || g->ga_len != gr_ndn->bv_len )
774 if ( strcmp( g->ga_ndn, gr_ndn->bv_val ) == 0 ) {
783 if ( target != NULL && dn_match( &target->e_nname, gr_ndn ) ) {
787 rc = be_entry_get_rw( op, gr_ndn, group_oc, group_at, 0, &e );
793 internal_op = slapi_op_internal_p( op, &rs, &cb );
795 cb.sc_response = NULL;
796 cb.sc_cleanup = NULL;
798 pb = SLAPI_OPERATION_PBLOCK( op );
800 slapi_pblock_set( pb, SLAPI_X_GROUP_ENTRY, (void *)e );
801 slapi_pblock_set( pb, SLAPI_X_GROUP_OPERATION_DN, (void *)op_ndn->bv_val );
802 slapi_pblock_set( pb, SLAPI_X_GROUP_ATTRIBUTE, (void *)group_at->ad_cname.bv_val );
803 slapi_pblock_set( pb, SLAPI_X_GROUP_TARGET_ENTRY, (void *)target );
805 rc = slapi_over_call_plugins( pb, SLAPI_X_PLUGIN_PRE_GROUP_FN );
806 if ( rc >= 0 ) /* 1 means no plugins called */
807 rc = SLAP_CB_CONTINUE;
809 rc = pb->pb_rs->sr_err;
811 slapi_pblock_delete_param( pb, SLAPI_X_GROUP_ENTRY );
812 slapi_pblock_delete_param( pb, SLAPI_X_GROUP_OPERATION_DN );
813 slapi_pblock_delete_param( pb, SLAPI_X_GROUP_ATTRIBUTE );
814 slapi_pblock_delete_param( pb, SLAPI_X_GROUP_TARGET_ENTRY );
817 slapi_pblock_destroy( pb );
820 be_entry_release_r( op, e );
823 op->o_callback = cb.sc_next;
825 rc = LDAP_NO_SUCH_OBJECT; /* return SLAP_CB_CONTINUE for correctness? */
828 if ( op->o_tag != LDAP_REQ_BIND && !op->o_do_not_cache &&
829 rc != SLAP_CB_CONTINUE ) {
830 g = op->o_tmpalloc( sizeof( GroupAssertion ) + gr_ndn->bv_len,
836 g->ga_len = gr_ndn->bv_len;
837 strcpy( g->ga_ndn, gr_ndn->bv_val );
838 g->ga_next = op->o_groups;
842 * XXX don't call POST_GROUP_FN, I have no idea what the point of
843 * that plugin function was anyway
851 slapi_over_db_open( BackendDB *be )
856 pb = slapi_pblock_new();
858 rc = slapi_int_call_plugins( be, SLAPI_PLUGIN_START_FN, pb );
860 slapi_pblock_destroy( pb );
866 slapi_over_db_close( BackendDB *be )
871 pb = slapi_pblock_new();
873 rc = slapi_int_call_plugins( be, SLAPI_PLUGIN_CLOSE_FN, pb );
875 slapi_pblock_destroy( pb );
883 memset( &slapi, 0, sizeof(slapi) );
885 slapi.on_bi.bi_type = SLAPI_OVERLAY_NAME;
887 slapi.on_bi.bi_op_bind = slapi_op_func;
888 slapi.on_bi.bi_op_unbind = slapi_op_func;
889 slapi.on_bi.bi_op_search = slapi_op_func;
890 slapi.on_bi.bi_op_compare = slapi_op_func;
891 slapi.on_bi.bi_op_modify = slapi_op_func;
892 slapi.on_bi.bi_op_modrdn = slapi_op_func;
893 slapi.on_bi.bi_op_add = slapi_op_func;
894 slapi.on_bi.bi_op_delete = slapi_op_func;
895 slapi.on_bi.bi_op_abandon = slapi_op_func;
896 slapi.on_bi.bi_op_cancel = slapi_op_func;
898 slapi.on_bi.bi_db_open = slapi_over_db_open;
899 slapi.on_bi.bi_db_close = slapi_over_db_close;
901 slapi.on_bi.bi_extended = slapi_over_extended;
902 slapi.on_bi.bi_access_allowed = slapi_over_access_allowed;
903 slapi.on_bi.bi_operational = slapi_over_aux_operational;
904 slapi.on_bi.bi_acl_group = slapi_over_acl_group;
906 return overlay_register( &slapi );
909 int slapi_over_is_inst( BackendDB *be )
911 return overlay_is_inst( be, SLAPI_OVERLAY_NAME );
914 int slapi_over_config( BackendDB *be )
916 if ( slapi_over_initialized == 0 ) {
919 /* do global initializaiton */
920 ldap_pvt_thread_mutex_init( &slapi_hn_mutex );
921 ldap_pvt_thread_mutex_init( &slapi_time_mutex );
922 ldap_pvt_thread_mutex_init( &slapi_printmessage_mutex );
924 if ( slapi_log_file == NULL )
925 slapi_log_file = slapi_ch_strdup( LDAP_RUNDIR LDAP_DIRSEP "errors" );
927 rc = slapi_int_init_object_extensions();
931 rc = slapi_over_init();
935 slapi_over_initialized = 1;
938 return overlay_config( be, SLAPI_OVERLAY_NAME );
941 #endif /* LDAP_SLAPI */