diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/providers/ldap/sdap.c | 2 | ||||
-rw-r--r-- | server/providers/ldap/sdap_async.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/server/providers/ldap/sdap.c b/server/providers/ldap/sdap.c index d0ea9ffd..94cea885 100644 --- a/server/providers/ldap/sdap.c +++ b/server/providers/ldap/sdap.c @@ -395,6 +395,8 @@ bool sdap_rootdse_sasl_mech_is_supported(struct sysdb_attrs *rootdse, struct ldb_val *val; int i; + if (!sasl_mech) return false; + for (i = 0; i < rootdse->num; i++) { if (strcasecmp(rootdse->a[i].name, "supportedSASLMechanisms")) { continue; diff --git a/server/providers/ldap/sdap_async.c b/server/providers/ldap/sdap_async.c index ae6806f4..dfdd267e 100644 --- a/server/providers/ldap/sdap_async.c +++ b/server/providers/ldap/sdap_async.c @@ -3405,7 +3405,7 @@ static void sdap_cli_connect_done(struct tevent_req *subreq) sasl_mech = dp_opt_get_string(state->opts->basic, SDAP_SASL_MECH); - if (state->use_rootdse) { + if (sasl_mech && state->use_rootdse) { /* check if server claims to support GSSAPI */ if (!sdap_rootdse_sasl_mech_is_supported(state->rootdse, sasl_mech)) { @@ -3468,7 +3468,7 @@ static void sdap_cli_rootdse_done(struct tevent_req *subreq) sasl_mech = dp_opt_get_string(state->opts->basic, SDAP_SASL_MECH); - if (state->use_rootdse) { + if (sasl_mech && state->use_rootdse) { /* check if server claims to support GSSAPI */ if (!sdap_rootdse_sasl_mech_is_supported(state->rootdse, sasl_mech)) { |