X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fsasl.c;h=d1b195f4590b27e4802794fd860778346473dd82;hb=ecb9c3b3fb3dc595b1b0c572762ae664babeb4db;hp=b2cf4fc1f45a7fd435b71683c44d25c51a218122;hpb=f90ed5aef8f41ee90e1f67b0badbb793cb99f3ed;p=openldap diff --git a/servers/slapd/sasl.c b/servers/slapd/sasl.c index b2cf4fc1f4..d1b195f459 100644 --- a/servers/slapd/sasl.c +++ b/servers/slapd/sasl.c @@ -2,6 +2,7 @@ #ifdef HAVE_CYRUS_SASL +#include #include #include "slap.h" @@ -32,7 +33,7 @@ int sasl_init( void ) if( rc != SASL_OK ) { Debug( LDAP_DEBUG_ANY, "sasl_server_init failed\n", 0, 0, 0 ); - exit(-1); + return EXIT_FAILURE; } rc = sasl_server_new( "ldap", NULL, NULL, NULL, @@ -42,7 +43,7 @@ int sasl_init( void ) if( rc != SASL_OK ) { Debug( LDAP_DEBUG_ANY, "sasl_server_new failed\n", 0, 0, 0 ); - exit(-1); + return EXIT_FAILURE; } memset(&secprops, 0, sizeof(secprops)); @@ -55,7 +56,7 @@ int sasl_init( void ) if( rc != SASL_OK ) { Debug( LDAP_DEBUG_ANY, "sasl_setprop failed\n", 0, 0, 0 ); - exit(-1); + return EXIT_FAILURE; } rc = sasl_listmech( server, NULL, NULL, ",", NULL, @@ -64,13 +65,13 @@ int sasl_init( void ) if( rc != SASL_OK ) { Debug( LDAP_DEBUG_ANY, "sasl_listmech failed: %d\n", rc, 0, 0 ); - exit(-1); + return EXIT_FAILURE; } Debug( LDAP_DEBUG_TRACE, "SASL mechanisms: %s\n", data, 0, 0 ); - return 0; + return EXIT_SUCCESS; } int sasl_destory( void )