1 /* slapi_overlay.c - SLAPI overlay */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 * Copyright 2001-2017 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>
34 static slap_overinst slapi;
35 static int slapi_over_initialized = 0;
37 static int slapi_over_response( Operation *op, SlapReply *rs );
38 static int slapi_over_cleanup( Operation *op, SlapReply *rs );
41 slapi_over_pblock_new( Operation *op, SlapReply *rs )
45 pb = slapi_pblock_new();
47 pb->pb_conn = op->o_conn;
51 PBLOCK_ASSERT_OP( pb, op->o_tag );
57 slapi_op_internal_p( Operation *op, SlapReply *rs, slap_callback *cb )
60 Slapi_PBlock *pb = NULL;
64 * Abstraction violating check for SLAPI internal operations
65 * allows pblock to remain consistent when invoking internal
68 for ( pcb = op->o_callback; pcb != NULL; pcb = pcb->sc_next ) {
69 if ( pcb->sc_response == slapi_int_response ) {
70 pb = (Slapi_PBlock *)pcb->sc_private;
71 PBLOCK_ASSERT_INTOP( pb, 0 );
79 pb = slapi_over_pblock_new( op, rs );
82 cb->sc_response = slapi_over_response;
83 cb->sc_cleanup = slapi_over_cleanup;
86 cb->sc_next = op->o_callback;
94 slapi_over_compute_output(
95 computed_attr_context *c,
96 Slapi_Attr *attribute,
101 AttributeDescription *desc;
104 if ( c == NULL || attribute == NULL || entry == NULL ) {
108 rs = (SlapReply *)c->cac_private;
110 assert( rs->sr_entry == entry );
112 desc = attribute->a_desc;
114 if ( rs->sr_attrs == NULL ) {
115 /* All attrs request, skip operational attributes */
116 if ( is_at_operational( desc->ad_type ) ) {
120 /* Specific attributes requested */
121 if ( is_at_operational( desc->ad_type ) ) {
122 if ( !SLAP_OPATTRS( rs->sr_attr_flags ) &&
123 !ad_inlist( desc, rs->sr_attrs ) ) {
127 if ( !SLAP_USERATTRS( rs->sr_attr_flags ) &&
128 !ad_inlist( desc, rs->sr_attrs ) ) {
134 /* XXX perhaps we should check for existing attributes and merge */
135 for ( a = &rs->sr_operational_attrs; *a != NULL; a = &(*a)->a_next )
138 *a = slapi_attr_dup( attribute );
144 slapi_over_aux_operational( Operation *op, SlapReply *rs )
146 /* Support for computed attribute plugins */
147 computed_attr_context ctx;
150 if ( slapi_op_internal_p( op, rs, NULL ) ) {
151 return SLAP_CB_CONTINUE;
154 ctx.cac_pb = slapi_over_pblock_new( op, rs );
156 ctx.cac_private = rs;
158 if ( rs->sr_entry != NULL ) {
160 * For each client requested attribute, call the plugins.
162 if ( rs->sr_attrs != NULL ) {
163 for ( anp = rs->sr_attrs; anp->an_name.bv_val != NULL; anp++ ) {
164 if ( compute_evaluator( &ctx, anp->an_name.bv_val,
165 rs->sr_entry, slapi_over_compute_output ) == 1 ) {
171 * Technically we shouldn't be returning operational attributes
172 * when the user requested only user attributes. We'll let the
173 * plugin decide whether to be naughty or not.
175 compute_evaluator( &ctx, "*", rs->sr_entry, slapi_over_compute_output );
179 slapi_pblock_destroy( ctx.cac_pb );
181 return SLAP_CB_CONTINUE;
185 * We need this function to call frontendDB (global) plugins before
186 * database plugins, if we are invoked by a slap_callback.
189 slapi_over_call_plugins( Slapi_PBlock *pb, int type )
191 int rc = 1; /* means no plugins called */
194 PBLOCK_ASSERT_OP( pb, 0 );
197 if ( !be_match( op->o_bd, frontendDB ) ) {
198 rc = slapi_int_call_plugins( frontendDB, type, pb );
201 rc = slapi_int_call_plugins( op->o_bd, type, pb );
208 slapi_over_search( Operation *op, SlapReply *rs, int type )
213 assert( rs->sr_type == REP_SEARCH || rs->sr_type == REP_SEARCHREF );
215 /* create a new pblock to not trample on result controls */
216 pb = slapi_over_pblock_new( op, rs );
218 rc = slapi_over_call_plugins( pb, type );
219 if ( rc >= 0 ) /* 1 means no plugins called */
220 rc = SLAP_CB_CONTINUE;
222 rc = LDAP_SUCCESS; /* confusing: don't abort, but don't send */
224 slapi_pblock_destroy(pb);
230 * Call pre- and post-result plugins
233 slapi_over_result( Operation *op, SlapReply *rs, int type )
235 Slapi_PBlock *pb = SLAPI_OPERATION_PBLOCK( op );
237 assert( rs->sr_type == REP_RESULT || rs->sr_type == REP_SASL || rs->sr_type == REP_EXTENDED );
239 slapi_over_call_plugins( pb, type );
241 return SLAP_CB_CONTINUE;
246 slapi_op_bind_callback( Operation *op, SlapReply *rs, int prc )
249 case SLAPI_BIND_SUCCESS:
250 /* Continue with backend processing */
252 case SLAPI_BIND_FAIL:
253 /* Failure, frontend (that's us) sends result */
254 rs->sr_err = LDAP_INVALID_CREDENTIALS;
255 send_ldap_result( op, rs );
258 case SLAPI_BIND_ANONYMOUS: /* undocumented */
259 default: /* plugin sent result or no plugins called */
260 BER_BVZERO( &op->orb_edn );
262 if ( rs->sr_err == LDAP_SUCCESS ) {
264 * Plugin will have called slapi_pblock_set(LDAP_CONN_DN) which
265 * will have set conn->c_dn and conn->c_ndn
267 if ( BER_BVISNULL( &op->o_conn->c_ndn ) && prc == 1 ) {
268 /* No plugins were called; continue processing */
271 ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
272 if ( !BER_BVISEMPTY( &op->o_conn->c_ndn ) ) {
273 ber_len_t max = sockbuf_max_incoming_auth;
274 ber_sockbuf_ctrl( op->o_conn->c_sb,
275 LBER_SB_OPT_SET_MAX_INCOMING, &max );
277 ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );
279 /* log authorization identity */
280 Statslog( LDAP_DEBUG_STATS,
281 "%s BIND dn=\"%s\" mech=%s (SLAPI) ssf=0\n",
283 BER_BVISNULL( &op->o_conn->c_dn )
284 ? "<empty>" : op->o_conn->c_dn.bv_val,
285 BER_BVISNULL( &op->orb_mech )
286 ? "<empty>" : op->orb_mech.bv_val, 0, 0 );
297 slapi_op_search_callback( Operation *op, SlapReply *rs, int prc )
299 Slapi_PBlock *pb = SLAPI_OPERATION_PBLOCK( op );
300 Filter *f = op->ors_filter;
302 /* check preoperation result code */
307 rs->sr_err = LDAP_SUCCESS;
309 if ( pb->pb_intop == 0 &&
310 slapi_int_call_plugins( op->o_bd, SLAPI_PLUGIN_COMPUTE_SEARCH_REWRITER_FN, pb ) == 0 ) {
312 * The plugin can set the SLAPI_SEARCH_FILTER.
313 * SLAPI_SEARCH_STRFILER is not normative.
315 if (f != op->ors_filter) {
316 op->o_tmpfree( op->ors_filterstr.bv_val, op->o_tmpmemctx );
317 filter2bv_x( op, op->ors_filter, &op->ors_filterstr );
324 struct slapi_op_info {
325 int soi_preop; /* preoperation plugin parameter */
326 int soi_postop; /* postoperation plugin parameter */
327 int soi_internal_preop; /* internal preoperation plugin parameter */
328 int soi_internal_postop; /* internal postoperation plugin parameter */
329 int (*soi_callback)(Operation *, SlapReply *, int); /* preoperation result handler */
330 } slapi_op_dispatch_table[] = {
332 SLAPI_PLUGIN_PRE_BIND_FN,
333 SLAPI_PLUGIN_POST_BIND_FN,
334 SLAPI_PLUGIN_INTERNAL_PRE_BIND_FN,
335 SLAPI_PLUGIN_INTERNAL_POST_BIND_FN,
336 slapi_op_bind_callback
339 SLAPI_PLUGIN_PRE_UNBIND_FN,
340 SLAPI_PLUGIN_POST_UNBIND_FN,
341 SLAPI_PLUGIN_INTERNAL_PRE_UNBIND_FN,
342 SLAPI_PLUGIN_INTERNAL_POST_UNBIND_FN,
346 SLAPI_PLUGIN_PRE_SEARCH_FN,
347 SLAPI_PLUGIN_POST_SEARCH_FN,
348 SLAPI_PLUGIN_INTERNAL_PRE_SEARCH_FN,
349 SLAPI_PLUGIN_INTERNAL_POST_SEARCH_FN,
350 slapi_op_search_callback
353 SLAPI_PLUGIN_PRE_COMPARE_FN,
354 SLAPI_PLUGIN_POST_COMPARE_FN,
355 SLAPI_PLUGIN_INTERNAL_PRE_COMPARE_FN,
356 SLAPI_PLUGIN_INTERNAL_POST_COMPARE_FN,
360 SLAPI_PLUGIN_PRE_MODIFY_FN,
361 SLAPI_PLUGIN_POST_MODIFY_FN,
362 SLAPI_PLUGIN_INTERNAL_PRE_MODIFY_FN,
363 SLAPI_PLUGIN_INTERNAL_POST_MODIFY_FN,
367 SLAPI_PLUGIN_PRE_MODRDN_FN,
368 SLAPI_PLUGIN_POST_MODRDN_FN,
369 SLAPI_PLUGIN_INTERNAL_PRE_MODRDN_FN,
370 SLAPI_PLUGIN_INTERNAL_POST_MODRDN_FN,
374 SLAPI_PLUGIN_PRE_ADD_FN,
375 SLAPI_PLUGIN_POST_ADD_FN,
376 SLAPI_PLUGIN_INTERNAL_PRE_ADD_FN,
377 SLAPI_PLUGIN_INTERNAL_POST_ADD_FN,
381 SLAPI_PLUGIN_PRE_DELETE_FN,
382 SLAPI_PLUGIN_POST_DELETE_FN,
383 SLAPI_PLUGIN_INTERNAL_PRE_DELETE_FN,
384 SLAPI_PLUGIN_INTERNAL_POST_DELETE_FN,
388 SLAPI_PLUGIN_PRE_ABANDON_FN,
389 SLAPI_PLUGIN_POST_ABANDON_FN,
390 SLAPI_PLUGIN_INTERNAL_PRE_ABANDON_FN,
391 SLAPI_PLUGIN_INTERNAL_POST_ABANDON_FN,
404 slapi_tag2op( ber_tag_t tag )
415 case LDAP_REQ_DELETE:
418 case LDAP_REQ_MODRDN:
421 case LDAP_REQ_MODIFY:
424 case LDAP_REQ_COMPARE:
427 case LDAP_REQ_SEARCH:
430 case LDAP_REQ_UNBIND:
441 /* Add SLAPI_RESCONTROLS to rs->sr_ctrls, with care, because
442 * rs->sr_ctrls could be allocated on the stack */
444 slapi_over_merge_controls( Operation *op, SlapReply *rs )
446 Slapi_PBlock *pb = SLAPI_OPERATION_PBLOCK( op );
447 LDAPControl **ctrls = NULL;
448 LDAPControl **slapi_ctrls = NULL;
449 size_t n_slapi_ctrls = 0;
450 size_t n_rs_ctrls = 0;
453 slapi_pblock_get( pb, SLAPI_RESCONTROLS, (void **)&slapi_ctrls );
455 n_slapi_ctrls = slapi_int_count_controls( slapi_ctrls );
456 n_rs_ctrls = slapi_int_count_controls( rs->sr_ctrls );
458 if ( n_slapi_ctrls == 0 )
459 return LDAP_SUCCESS; /* no SLAPI controls */
461 slapi_pblock_set( pb, SLAPI_X_OLD_RESCONTROLS, (void *)rs->sr_ctrls );
463 ctrls = (LDAPControl **) op->o_tmpalloc(
464 ( n_slapi_ctrls + n_rs_ctrls + 1 ) * sizeof(LDAPControl *),
467 for ( i = 0; i < n_slapi_ctrls; i++ ) {
468 ctrls[i] = slapi_ctrls[i];
470 if ( rs->sr_ctrls != NULL ) {
471 for ( i = 0; i < n_rs_ctrls; i++ ) {
472 ctrls[n_slapi_ctrls + i] = rs->sr_ctrls[i];
475 ctrls[n_slapi_ctrls + n_rs_ctrls] = NULL;
477 rs->sr_ctrls = ctrls;
483 slapi_over_unmerge_controls( Operation *op, SlapReply *rs )
485 Slapi_PBlock *pb = SLAPI_OPERATION_PBLOCK( op );
486 LDAPControl **rs_ctrls = NULL;
488 slapi_pblock_get( pb, SLAPI_X_OLD_RESCONTROLS, (void **)&rs_ctrls );
490 if ( rs_ctrls == NULL || rs->sr_ctrls == rs_ctrls ) {
491 /* no copying done */
495 op->o_tmpfree( rs->sr_ctrls, op->o_tmpmemctx );
496 rs->sr_ctrls = rs_ctrls;
502 slapi_over_response( Operation *op, SlapReply *rs )
504 Slapi_PBlock *pb = SLAPI_OPERATION_PBLOCK( op );
505 int rc = SLAP_CB_CONTINUE;
507 if ( pb->pb_intop == 0 ) {
508 switch ( rs->sr_type ) {
512 rc = slapi_over_result( op, rs, SLAPI_PLUGIN_PRE_RESULT_FN );
515 rc = slapi_over_search( op, rs, SLAPI_PLUGIN_PRE_ENTRY_FN );
518 rc = slapi_over_search( op, rs, SLAPI_PLUGIN_PRE_REFERRAL_FN );
525 slapi_over_merge_controls( op, rs );
531 slapi_over_cleanup( Operation *op, SlapReply *rs )
533 Slapi_PBlock *pb = SLAPI_OPERATION_PBLOCK( op );
534 int rc = SLAP_CB_CONTINUE;
536 slapi_over_unmerge_controls( op, rs );
538 if ( pb->pb_intop == 0 ) {
539 switch ( rs->sr_type ) {
543 rc = slapi_over_result( op, rs, SLAPI_PLUGIN_POST_RESULT_FN );
546 rc = slapi_over_search( op, rs, SLAPI_PLUGIN_POST_ENTRY_FN );
549 rc = slapi_over_search( op, rs, SLAPI_PLUGIN_POST_REFERRAL_FN );
560 slapi_op_func( Operation *op, SlapReply *rs )
563 slap_operation_t which;
564 struct slapi_op_info *opinfo;
570 int preop_type, postop_type;
573 if ( !slapi_plugins_used )
574 return SLAP_CB_CONTINUE;
577 * Find the SLAPI operation information for this LDAP
578 * operation; this will contain the preop and postop
579 * plugin types, as well as optional callbacks for
580 * setting up the SLAPI environment.
582 which = slapi_tag2op( op->o_tag );
583 if ( which >= op_last ) {
584 /* invalid operation, but let someone else deal with it */
585 return SLAP_CB_CONTINUE;
588 opinfo = &slapi_op_dispatch_table[which];
589 if ( opinfo == NULL ) {
590 /* no SLAPI plugin types for this operation */
591 return SLAP_CB_CONTINUE;
594 internal_op = slapi_op_internal_p( op, rs, &cb );
597 preop_type = opinfo->soi_internal_preop;
598 postop_type = opinfo->soi_internal_postop;
600 preop_type = opinfo->soi_preop;
601 postop_type = opinfo->soi_postop;
604 if ( preop_type == 0 ) {
605 /* no SLAPI plugin types for this operation */
607 rc = SLAP_CB_CONTINUE;
611 pb = SLAPI_OPERATION_PBLOCK( op );
613 /* cache backend so we call correct postop plugins */
614 be = pb->pb_op->o_bd;
616 rc = slapi_int_call_plugins( be, preop_type, pb );
619 * soi_callback is responsible for examining the result code
620 * of the preoperation plugin and determining whether to
621 * abort. This is needed because of special SLAPI behaviour
622 e with bind preoperation plugins.
624 * The soi_callback function is also used to reset any values
625 * returned from the preoperation plugin before calling the
626 * backend (for the success case).
628 if ( opinfo->soi_callback == NULL ) {
629 /* default behaviour is preop plugin can abort operation */
635 rc = (opinfo->soi_callback)( op, rs, rc );
641 * Call actual backend (or next overlay in stack). We need to
642 * do this rather than returning SLAP_CB_CONTINUE and calling
643 * postoperation plugins in a response handler to match the
644 * behaviour of SLAPI in OpenLDAP 2.2, where postoperation
645 * plugins are called after the backend has completely
646 * finished processing the operation.
648 on = (slap_overinst *)op->o_bd->bd_info;
651 rc = overlay_op_walk( op, rs, which, oi, on->on_next );
654 * Call postoperation plugins
656 slapi_int_call_plugins( be, postop_type, pb );
659 if ( !internal_op ) {
660 slapi_pblock_destroy(pb);
661 cb.sc_private = NULL;
664 op->o_callback = cb.sc_next;
670 slapi_over_extended( Operation *op, SlapReply *rs )
678 slapi_int_get_extop_plugin( &op->ore_reqoid, &callback );
679 if ( callback == NULL ) {
680 return SLAP_CB_CONTINUE;
683 internal_op = slapi_op_internal_p( op, rs, &cb );
685 return SLAP_CB_CONTINUE;
688 pb = SLAPI_OPERATION_PBLOCK( op );
690 rc = (*callback)( pb );
691 if ( rc == SLAPI_PLUGIN_EXTENDED_SENT_RESULT ) {
693 } else if ( rc == SLAPI_PLUGIN_EXTENDED_NOT_HANDLED ) {
694 rc = SLAP_CB_CONTINUE;
698 assert( rs->sr_rspoid != NULL );
700 send_ldap_extended( op, rs );
703 slapi_ch_free_string( (char **)&rs->sr_rspoid );
706 if ( rs->sr_rspdata != NULL )
707 ber_bvfree( rs->sr_rspdata );
712 slapi_pblock_destroy( pb );
713 op->o_callback = cb.sc_next;
719 slapi_over_access_allowed(
722 AttributeDescription *desc,
724 slap_access_t access,
725 AccessControlState *state,
732 SlapReply rs = { REP_RESULT };
734 internal_op = slapi_op_internal_p( op, &rs, &cb );
736 cb.sc_response = NULL;
737 cb.sc_cleanup = NULL;
738 cb.sc_writewait = NULL;
740 pb = SLAPI_OPERATION_PBLOCK( op );
742 rc = slapi_int_access_allowed( op, e, desc, val, access, state );
744 rc = SLAP_CB_CONTINUE;
747 if ( !internal_op ) {
748 slapi_pblock_destroy( pb );
751 op->o_callback = cb.sc_next;
757 slapi_over_acl_group(
760 struct berval *gr_ndn,
761 struct berval *op_ndn,
762 ObjectClass *group_oc,
763 AttributeDescription *group_at )
768 BackendDB *be = op->o_bd;
770 SlapReply rs = { REP_RESULT };
772 op->o_bd = select_backend( gr_ndn, 0 );
774 for ( g = op->o_groups; g; g = g->ga_next ) {
775 if ( g->ga_be != op->o_bd || g->ga_oc != group_oc ||
776 g->ga_at != group_at || g->ga_len != gr_ndn->bv_len )
780 if ( strcmp( g->ga_ndn, gr_ndn->bv_val ) == 0 ) {
789 if ( target != NULL && dn_match( &target->e_nname, gr_ndn ) ) {
793 rc = be_entry_get_rw( op, gr_ndn, group_oc, group_at, 0, &e );
799 internal_op = slapi_op_internal_p( op, &rs, &cb );
801 cb.sc_response = NULL;
802 cb.sc_cleanup = NULL;
803 cb.sc_writewait = NULL;
805 pb = SLAPI_OPERATION_PBLOCK( op );
807 slapi_pblock_set( pb, SLAPI_X_GROUP_ENTRY, (void *)e );
808 slapi_pblock_set( pb, SLAPI_X_GROUP_OPERATION_DN, (void *)op_ndn->bv_val );
809 slapi_pblock_set( pb, SLAPI_X_GROUP_ATTRIBUTE, (void *)group_at->ad_cname.bv_val );
810 slapi_pblock_set( pb, SLAPI_X_GROUP_TARGET_ENTRY, (void *)target );
812 rc = slapi_over_call_plugins( pb, SLAPI_X_PLUGIN_PRE_GROUP_FN );
813 if ( rc >= 0 ) /* 1 means no plugins called */
814 rc = SLAP_CB_CONTINUE;
816 rc = pb->pb_rs->sr_err;
818 slapi_pblock_delete_param( pb, SLAPI_X_GROUP_ENTRY );
819 slapi_pblock_delete_param( pb, SLAPI_X_GROUP_OPERATION_DN );
820 slapi_pblock_delete_param( pb, SLAPI_X_GROUP_ATTRIBUTE );
821 slapi_pblock_delete_param( pb, SLAPI_X_GROUP_TARGET_ENTRY );
824 slapi_pblock_destroy( pb );
827 be_entry_release_r( op, e );
830 op->o_callback = cb.sc_next;
832 rc = LDAP_NO_SUCH_OBJECT; /* return SLAP_CB_CONTINUE for correctness? */
835 if ( op->o_tag != LDAP_REQ_BIND && !op->o_do_not_cache &&
836 rc != SLAP_CB_CONTINUE ) {
837 g = op->o_tmpalloc( sizeof( GroupAssertion ) + gr_ndn->bv_len,
843 g->ga_len = gr_ndn->bv_len;
844 strcpy( g->ga_ndn, gr_ndn->bv_val );
845 g->ga_next = op->o_groups;
849 * XXX don't call POST_GROUP_FN, I have no idea what the point of
850 * that plugin function was anyway
865 pb = slapi_pblock_new();
867 rc = slapi_int_call_plugins( be, SLAPI_PLUGIN_START_FN, pb );
869 slapi_pblock_destroy( pb );
882 pb = slapi_pblock_new();
884 rc = slapi_int_call_plugins( be, SLAPI_PLUGIN_CLOSE_FN, pb );
886 slapi_pblock_destroy( pb );
894 memset( &slapi, 0, sizeof(slapi) );
896 slapi.on_bi.bi_type = SLAPI_OVERLAY_NAME;
898 slapi.on_bi.bi_op_bind = slapi_op_func;
899 slapi.on_bi.bi_op_unbind = slapi_op_func;
900 slapi.on_bi.bi_op_search = slapi_op_func;
901 slapi.on_bi.bi_op_compare = slapi_op_func;
902 slapi.on_bi.bi_op_modify = slapi_op_func;
903 slapi.on_bi.bi_op_modrdn = slapi_op_func;
904 slapi.on_bi.bi_op_add = slapi_op_func;
905 slapi.on_bi.bi_op_delete = slapi_op_func;
906 slapi.on_bi.bi_op_abandon = slapi_op_func;
907 slapi.on_bi.bi_op_cancel = slapi_op_func;
909 slapi.on_bi.bi_db_open = slapi_over_db_open;
910 slapi.on_bi.bi_db_close = slapi_over_db_close;
912 slapi.on_bi.bi_extended = slapi_over_extended;
913 slapi.on_bi.bi_access_allowed = slapi_over_access_allowed;
914 slapi.on_bi.bi_operational = slapi_over_aux_operational;
915 slapi.on_bi.bi_acl_group = slapi_over_acl_group;
917 return overlay_register( &slapi );
920 int slapi_over_is_inst( BackendDB *be )
922 return overlay_is_inst( be, SLAPI_OVERLAY_NAME );
925 int slapi_over_config( BackendDB *be, ConfigReply *cr )
927 if ( slapi_over_initialized == 0 ) {
930 /* do global initialization */
931 ldap_pvt_thread_mutex_init( &slapi_hn_mutex );
932 ldap_pvt_thread_mutex_init( &slapi_time_mutex );
933 ldap_pvt_thread_mutex_init( &slapi_printmessage_mutex );
935 if ( slapi_log_file == NULL )
936 slapi_log_file = slapi_ch_strdup( LDAP_RUNDIR LDAP_DIRSEP "errors" );
938 rc = slapi_int_init_object_extensions();
942 rc = slapi_over_init();
946 slapi_over_initialized = 1;
949 return overlay_config( be, SLAPI_OVERLAY_NAME, -1, NULL, cr );
952 #endif /* LDAP_SLAPI */