Skip to content
Snippets Groups Projects
Commit bfb609a6 authored by Timo Sirainen's avatar Timo Sirainen
Browse files

lib-sieve: storage: ldap: Drop ldap_sasl_bind setting

SASL binding is now used if ldap_sasl_mech is non-empty.
parent a8a4db55
No related branches found
No related tags found
No related merge requests found
......@@ -712,9 +712,9 @@ static int db_ldap_set_options(struct ldap_connection *conn)
#endif
if (set->ldap_version < 3) {
if (set->sasl_bind) {
if (set->sasl_mech[0] != '\0') {
e_error(storage->event,
"db: sasl_bind=yes requires ldap_version=3");
"db: sasl_mech requires ldap_version=3");
return -1;
}
if (set->starttls) {
......@@ -785,7 +785,7 @@ int sieve_ldap_db_connect(struct ldap_connection *conn)
#endif
}
if (set->sasl_bind) {
if (set->sasl_mech[0]) {
#ifdef HAVE_LDAP_SASL
struct db_ldap_sasl_bind_context context;
......@@ -805,7 +805,7 @@ int sieve_ldap_db_connect(struct ldap_connection *conn)
return -1;
#else
e_error(storage->event, "db: "
"sasl_bind=yes but no SASL support compiled in");
"sasl_mech is set, but no SASL support compiled in");
return -1;
#endif
conn->conn_state = LDAP_CONN_STATE_BOUND;
......
......@@ -29,7 +29,6 @@ static const struct setting_define sieve_ldap_setting_defines[] = {
DEF(STR, auth_dn),
DEF(STR, auth_dn_password),
DEF(BOOL, starttls),
DEF(BOOL, sasl_bind),
DEF(STR, sasl_mech),
DEF(STR, sasl_realm),
DEF(STR, sasl_authz_id),
......@@ -54,7 +53,6 @@ const struct sieve_ldap_settings sieve_ldap_default_settings = {
.auth_dn = "",
.auth_dn_password = "",
.starttls = FALSE,
.sasl_bind = FALSE,
.sasl_mech = "",
.sasl_realm = "",
.sasl_authz_id = "",
......
......@@ -9,7 +9,6 @@ struct sieve_ldap_settings {
const char *auth_dn_password;
bool starttls;
bool sasl_bind;
const char *sasl_mech;
const char *sasl_realm;
const char *sasl_authz_id;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.