]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-ldap: ldap_client_settings - Rename bind_dn into auth_dn
authorMarco Bettini <marco.bettini@open-xchange.com>
Fri, 20 Sep 2024 13:15:59 +0000 (13:15 +0000)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 17 Jan 2025 08:40:01 +0000 (10:40 +0200)
src/lib-dict-backend/dict-ldap.c
src/lib-ldap/ldap-client.h
src/lib-ldap/ldap-connection.c

index 7e97ac6de3919d8a2764ffa6839ea3be55455f17..d232bdb016e6e910e4d8244588e003076e9c0729 100644 (file)
@@ -124,7 +124,7 @@ int dict_ldap_connect(struct ldap_dict *dict, const char **error_r)
        struct ldap_client_settings set;
        i_zero(&set);
        set.uri = dict->set->uri;
-       set.bind_dn = dict->set->bind_dn;
+       set.auth_dn = dict->set->bind_dn;
        set.auth_dn_password = dict->set->password;
        set.timeout_secs = dict->set->timeout;
        set.max_idle_time_secs = dict->set->max_idle_time;
index 193b3d3f998ad8258bace14d2e5f1a24c00dec54..4e02f99d157a89f58ce4d04ee87ce1564d005167 100644 (file)
@@ -22,7 +22,7 @@ struct ldap_client_settings {
        /* NOTE: when adding here, remember to update
           ldap_connection_have_settings() and ldap_connection_init() */
        const char *uri;
-       const char *bind_dn;
+       const char *auth_dn;
        const char *auth_dn_password;
 
        struct event *event_parent;
index 6fc28c29c45f5f48f9b1c9ef5fc96687877e61bd..1f56d6ea2863ae2f306500895acad1b3a0462138 100644 (file)
@@ -121,7 +121,7 @@ bool ldap_connection_have_settings(struct ldap_connection *conn,
 
        if (strcmp(conn_set->uri, set->uri) != 0)
                return FALSE;
-       if (null_strcmp(conn_set->bind_dn, set->bind_dn) != 0)
+       if (null_strcmp(conn_set->auth_dn, set->auth_dn) != 0)
                return FALSE;
        if (null_strcmp(conn_set->auth_dn_password, set->auth_dn_password) != 0)
                return FALSE;
@@ -176,7 +176,7 @@ int ldap_connection_init(struct ldap_client *client,
        conn->set = *set;
        /* deep copy relevant strings */
        conn->set.uri = p_strdup(pool, set->uri);
-       conn->set.bind_dn = p_strdup(pool, set->bind_dn);
+       conn->set.auth_dn = p_strdup(pool, set->auth_dn);
        if (*set->auth_dn_password != '\0') {
                conn->set.auth_dn_password = p_strdup(pool, set->auth_dn_password);
                ber_str2bv(conn->set.auth_dn_password, strlen(conn->set.auth_dn_password), 0, &conn->cred);
@@ -519,7 +519,7 @@ ldap_connect_next_message(struct ldap_connection *conn,
                /* fall through */
        case LDAP_STATE_AUTH:
                ret = ldap_sasl_bind(conn->conn,
-                       conn->set.bind_dn,
+                       conn->set.auth_dn,
                        LDAP_SASL_SIMPLE,
                        &conn->cred,
                        NULL,
@@ -528,7 +528,7 @@ ldap_connect_next_message(struct ldap_connection *conn,
                if (ret != LDAP_SUCCESS) {
                        ldap_connection_result_failure(conn, req, ret, t_strdup_printf(
                                "ldap_sasl_bind(uri=%s, dn=%s) failed: %s",
-                               conn->set.uri, conn->set.bind_dn, ldap_err2string(ret)));
+                               conn->set.uri, conn->set.auth_dn, ldap_err2string(ret)));
                        return ret;
                }
                break;