}
#endif
+ sl_mem_init();
+
#ifdef HAVE_NT_SERVICE_MANAGER
{
int *i;
#endif
extops_init();
+ lutil_passwd_init();
+ slap_op_init();
#ifdef SLAPD_MODULES
if ( module_init() != 0 ) {
}
#endif
- if ( slap_init( serverMode, serverName ) != 0 ) {
- rc = 1;
- SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 18 );
- goto destroy;
- }
-
if ( slap_schema_init( ) != 0 ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, CRIT, "main: schema initialization error\n", 0, 0, 0 );
goto destroy;
}
+ if ( slap_init( serverMode, serverName ) != 0 ) {
+ rc = 1;
+ SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 18 );
+ goto destroy;
+ }
+
if ( slap_controls_init( ) != 0 ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, CRIT, "main: controls initialization error\n", 0, 0, 0 );
mal_leaktrace(1);
#endif
+ /*
+ * FIXME: moved here from slapd_daemon_task()
+ * because back-monitor db_open() needs it
+ */
+ time( &starttime );
+
if ( slap_startup( NULL ) != 0 ) {
rc = 1;
SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 21 );
module_kill();
#endif
+ slap_op_destroy();
+
extops_kill();
stop:
schema_destroy();
+ lutil_passwd_destroy();
+
#ifdef HAVE_TLS
ldap_pvt_tls_destroy();
#endif