dovecot: Removed deprecated pass_attrs and user_attrs configurat...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Jul 25 09:21:42 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/668a768fc8fd
changeset: 6148:668a768fc8fd
user: Timo Sirainen <tss at iki.fi>
date: Wed Jul 25 09:11:43 2007 +0300
description:
Removed deprecated pass_attrs and user_attrs configuration method.
diffstat:
4 files changed, 5 insertions(+), 20 deletions(-)
src/auth/db-ldap.c | 12 +++---------
src/auth/db-ldap.h | 1 -
src/auth/passdb-ldap.c | 6 +-----
src/auth/userdb-ldap.c | 6 +-----
diffs (93 lines):
diff -r 45a12a1bd299 -r 668a768fc8fd src/auth/db-ldap.c
--- a/src/auth/db-ldap.c Wed Jul 25 09:04:40 2007 +0300
+++ b/src/auth/db-ldap.c Wed Jul 25 09:11:43 2007 +0300
@@ -619,7 +619,6 @@ static void ldap_conn_close(struct ldap_
void db_ldap_set_attrs(struct ldap_connection *conn, const char *attrlist,
char ***attr_names_r, struct hash_table *attr_map,
- const char *const default_attr_map[],
const char *skip_attr)
{
const char *const *attr;
@@ -638,11 +637,9 @@ void db_ldap_set_attrs(struct ldap_conne
for (i = j = 0; i < size; i++) {
p = strchr(attr[i], '=');
- if (p == NULL) {
- name = p_strdup(conn->pool, attr[i]);
- value = *default_attr_map == NULL ? name :
- p_strdup(conn->pool, *default_attr_map);
- } else {
+ if (p == NULL)
+ name = value = p_strdup(conn->pool, attr[i]);
+ else {
name = p_strdup_until(conn->pool, attr[i], p);
value = p_strdup(conn->pool, p + 1);
}
@@ -652,9 +649,6 @@ void db_ldap_set_attrs(struct ldap_conne
hash_insert(attr_map, name, value);
(*attr_names_r)[j++] = name;
}
-
- if (*default_attr_map != NULL)
- default_attr_map++;
}
t_pop();
}
diff -r 45a12a1bd299 -r 668a768fc8fd src/auth/db-ldap.h
--- a/src/auth/db-ldap.h Wed Jul 25 09:04:40 2007 +0300
+++ b/src/auth/db-ldap.h Wed Jul 25 09:11:43 2007 +0300
@@ -99,7 +99,6 @@ void db_ldap_search(struct ldap_connecti
void db_ldap_set_attrs(struct ldap_connection *conn, const char *attrlist,
char ***attr_names_r, struct hash_table *attr_map,
- const char *const default_attr_map[],
const char *skip_attr);
struct ldap_connection *db_ldap_init(const char *config_path);
diff -r 45a12a1bd299 -r 668a768fc8fd src/auth/passdb-ldap.c
--- a/src/auth/passdb-ldap.c Wed Jul 25 09:04:40 2007 +0300
+++ b/src/auth/passdb-ldap.c Wed Jul 25 09:11:43 2007 +0300
@@ -14,10 +14,6 @@
#include <ldap.h>
#include <stdlib.h>
-
-static const char *default_attr_map[] = {
- "user", "password", NULL
-};
struct ldap_passdb_module {
struct passdb_module module;
@@ -434,7 +430,7 @@ passdb_ldap_preinit(struct auth_passdb *
if (conn->set.auth_bind_userdn != NULL)
conn->set.auth_bind = TRUE;
db_ldap_set_attrs(conn, conn->set.pass_attrs, &conn->pass_attr_names,
- conn->pass_attr_map, default_attr_map,
+ conn->pass_attr_map,
conn->set.auth_bind ? "password" : NULL);
module->module.cache_key =
auth_cache_parse_key(auth_passdb->auth->pool,
diff -r 45a12a1bd299 -r 668a768fc8fd src/auth/userdb-ldap.c
--- a/src/auth/userdb-ldap.c Wed Jul 25 09:04:40 2007 +0300
+++ b/src/auth/userdb-ldap.c Wed Jul 25 09:11:43 2007 +0300
@@ -24,10 +24,6 @@ struct userdb_ldap_request {
struct ldap_request request;
struct auth_request *auth_request;
userdb_callback_t *userdb_callback;
-};
-
-static const char *default_attr_map[] = {
- "", "home", "mail", "system_user", "uid", "gid", NULL
};
static void
@@ -141,7 +137,7 @@ userdb_ldap_preinit(struct auth_userdb *
(hash_cmp_callback_t *)strcmp);
db_ldap_set_attrs(conn, conn->set.user_attrs, &conn->user_attr_names,
- conn->user_attr_map, default_attr_map, NULL);
+ conn->user_attr_map, NULL);
module->module.cache_key =
auth_cache_parse_key(auth_userdb->auth->pool,
conn->set.user_filter);
More information about the dovecot-cvs
mailing list