{
Connection *c;
- if ( connection_init( s, l, "", "", CONN_IS_CLIENT, 0, "" ) < 0 ) {
+ if ( connection_init( s, l, "", "", CONN_IS_CLIENT, 0, NULL ) < 0 ) {
return -1;
}
(SASL_VERSION_MINOR << 8) | SASL_VERSION_STEP)
static sasl_security_properties_t sasl_secprops;
-#else
+#elif defined( SLAP_BUILTIN_SASL )
/*
* built-in SASL implementation
* only supports EXTERNAL
sc = slap_sasl_err2ldap( sc );
-#else
+#elif defined(SLAP_BUILTIN_SASL)
/* built-in SASL implementation */
SASL_CTX *ctx = (SASL_CTX *) SLAP_MALLOC(sizeof(SASL_CTX));
if( ctx == NULL ) return -1;
if ( sc != SASL_OK ) {
return LDAP_OTHER;
}
-#else
+#elif defined(SLAP_BUILTIN_SASL)
/* built-in SASL implementation */
SASL_CTX *ctx = conn->c_sasl_authctx;
if ( ctx == NULL ) return LDAP_UNAVAILABLE;
ch_free( mechstr );
#endif
}
-#else
+#elif defined(SLAP_BUILTIN_SASL)
/* builtin SASL implementation */
SASL_CTX *ctx = conn->c_sasl_authctx;
if ( ctx != NULL && ctx->sc_external_id.bv_val ) {
free( conn->c_sasl_extra );
conn->c_sasl_extra = NULL;
-#else
+#elif defined(SLAP_BUILTIN_SASL)
SASL_CTX *ctx = conn->c_sasl_authctx;
if( ctx ) {
if( ctx->sc_external_id.bv_val ) {
Debug(LDAP_DEBUG_TRACE, "<== slap_sasl_bind: rc=%d\n", rs->sr_err, 0, 0);
#endif
-
-#else
+#elif defined(SLAP_BUILTIN_SASL)
/* built-in SASL implementation */
SASL_CTX *ctx = op->o_conn->c_sasl_authctx;
send_ldap_error( op, rs, LDAP_AUTH_METHOD_NOT_SUPPORTED,
"requested SASL mechanism not supported" );
}
+#else
+ send_ldap_error( op, rs, LDAP_AUTH_METHOD_NOT_SUPPORTED,
+ "SASL not supported" );
#endif
return rs->sr_err;