]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/main.c
Don't reeval expression
[openldap] / servers / slapd / main.c
index 1dc199c838d8910bc5d9cdb46ff1c6899725bd8d..40a036ce8928174ac48e5ae7c1836c922dd9d8b4 100644 (file)
@@ -4,6 +4,7 @@
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 #include "portable.h"
+#include "slapi_common.h"
 
 #include <stdio.h>
 
@@ -16,7 +17,9 @@
 
 #include "ldap_pvt.h"
 
+
 #include "slap.h"
+#include "slapi.h"
 #include "lutil.h"
 #include "ldif.h"
 
@@ -405,6 +408,20 @@ int main( int argc, char **argv )
        (void) ldap_pvt_tls_set_option( NULL, LDAP_OPT_X_TLS_REQUIRE_CERT, &rc );
 #endif
 
+#ifdef LDAP_SLAPI
+       if ( slapi_init() != 0 ) {
+#ifdef NEW_LOGGING
+               LDAP_LOG( OPERATION, CRIT, "main: slapi initialization error\n", 0, 0, 0 );
+#else
+               Debug( LDAP_DEBUG_ANY,
+                   "slapi initialization error\n",
+                   0, 0, 0 );
+#endif
+
+               goto destroy;
+       }
+#endif /* LDAP_SLAPI */
+
        if ( read_config( configfile, 0 ) != 0 ) {
                rc = 1;
                SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 19 );