X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fmain.c;h=40a036ce8928174ac48e5ae7c1836c922dd9d8b4;hb=75757a5c82fc6a9333807517705c99e090428142;hp=bda792fbf84ae5785885c99288fd3f7a3dc549df;hpb=ac66a219d090c1445f76f8e7df92f6e9e132cd82;p=openldap diff --git a/servers/slapd/main.c b/servers/slapd/main.c index bda792fbf8..40a036ce89 100644 --- a/servers/slapd/main.c +++ b/servers/slapd/main.c @@ -4,6 +4,7 @@ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ #include "portable.h" +#include "slapi_common.h" #include @@ -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 ); @@ -467,7 +484,7 @@ int main( int argc, char **argv ) #else Debug( LDAP_DEBUG_ANY, "main: TLS init def ctx failed: %d\n", - 0, 0, 0 ); + rc, 0, 0 ); #endif rc = 1; SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 20 );