From: Arran Cudbard-Bell Date: Sat, 20 May 2023 17:38:07 +0000 (-0400) Subject: ldap: Fix SASLless build X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6dcf757424a2c6622420e1c823fabe7e2d768acc;p=thirdparty%2Ffreeradius-server.git ldap: Fix SASLless build --- diff --git a/src/lib/ldap/base.h b/src/lib/ldap/base.h index 5c436c21295..7d102cc0da8 100644 --- a/src/lib/ldap/base.h +++ b/src/lib/ldap/base.h @@ -515,7 +515,9 @@ typedef struct { typedef enum { LDAP_BIND_SIMPLE = 0, +#ifdef WITH_SASL LDAP_BIND_SASL +#endif } fr_ldap_bind_type_t; typedef struct ldap_filter_s ldap_filter_t; diff --git a/src/lib/ldap/connection.c b/src/lib/ldap/connection.c index 575caf9500a..dedf3cf55b3 100644 --- a/src/lib/ldap/connection.c +++ b/src/lib/ldap/connection.c @@ -1120,6 +1120,7 @@ static void ldap_trunk_bind_auth_mux(UNUSED fr_event_list_t *el, fr_trunk_connec } break; +#ifdef WITH_SASL case LDAP_BIND_SASL: { fr_ldap_sasl_ctx_t *sasl_ctx = bind->sasl_ctx; @@ -1150,6 +1151,7 @@ static void ldap_trunk_bind_auth_mux(UNUSED fr_event_list_t *el, fr_trunk_connec break; } } +#endif break; } /* @@ -1295,6 +1297,7 @@ static void ldap_bind_auth_cancel_mux(UNUSED fr_event_list_t *el, fr_trunk_conne while ((fr_trunk_connection_pop_cancellation(&treq, tconn)) == 0) { bind = talloc_get_type_abort(treq->preq, fr_ldap_bind_auth_ctx_t); +#ifdef WITH_SASL if (bind->type == LDAP_BIND_SASL) { /* * With SASL binds, abandoning the bind part way through @@ -1303,8 +1306,11 @@ static void ldap_bind_auth_cancel_mux(UNUSED fr_event_list_t *el, fr_trunk_conne */ fr_trunk_connection_signal_reconnect(tconn, FR_CONNECTION_FAILED); } else { +#endif ldap_abandon_ext(ldap_conn->handle, bind->msgid, NULL, NULL); +#ifdef WITH_SASL } +#endif fr_trunk_request_signal_cancel_complete(treq); } }