X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fmain.c;h=40a036ce8928174ac48e5ae7c1836c922dd9d8b4;hb=75757a5c82fc6a9333807517705c99e090428142;hp=1dc199c838d8910bc5d9cdb46ff1c6899725bd8d;hpb=0491710fa74abac1b56db13a013e828bafe3948e;p=openldap diff --git a/servers/slapd/main.c b/servers/slapd/main.c index 1dc199c838..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 );