From 1c2f4ef78bfe6db9dc559dbd213084191229042a Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Mon, 5 Jul 2010 10:49:10 +0200 Subject: [PATCH] Remove "auto_header" flag. --- raddb/modules/ldap | 4 ++++ src/modules/rlm_ldap/rlm_ldap.c | 22 +--------------------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/raddb/modules/ldap b/raddb/modules/ldap index 8a2077a..34b4a86 100644 --- a/raddb/modules/ldap +++ b/raddb/modules/ldap @@ -166,4 +166,8 @@ ldap { # default: 0x0000 (no debugging messages) # Example:(LDAP_DEBUG_FILTER+LDAP_DEBUG_CONNS) #ldap_debug = 0x0028 + + # As of version 2.2.0, the "auto_header" configuration item + # has been removed. Since it was deprecated long ago, this + # change should not affect anyone. } diff --git a/src/modules/rlm_ldap/rlm_ldap.c b/src/modules/rlm_ldap/rlm_ldap.c index 4933a0e..6ac45c5 100644 --- a/src/modules/rlm_ldap/rlm_ldap.c +++ b/src/modules/rlm_ldap/rlm_ldap.c @@ -148,7 +148,6 @@ typedef struct { char *access_attr; char *passwd_hdr; char *passwd_attr; - int auto_header; char *dictionary_mapping; char *groupname_attr; char *groupmemb_filt; @@ -263,8 +262,6 @@ static const CONF_PARSER module_config[] = { offsetof(ldap_instance,passwd_hdr), NULL, NULL}, {"password_attribute", PW_TYPE_STRING_PTR, offsetof(ldap_instance,passwd_attr), NULL, NULL}, - {"auto_header", PW_TYPE_BOOLEAN, - offsetof(ldap_instance,auto_header), NULL, "no"}, /* * Access limitations @@ -1504,24 +1501,7 @@ static int ldap_authorize(void *instance, REQUEST * request) value = passwd_vals[i]; - if (inst->auto_header) { - char *p; - char autobuf[16]; - - p = strchr(value, '}'); - if (!p) continue; - if ((size_t)(p - value + 1) >= sizeof(autobuf)) - continue; /* paranoia */ - memcpy(autobuf, value, p - value + 1); - autobuf[p - value + 1] = '\0'; - - attr = fr_str2int(header_names, - autobuf, 0); - if (!attr) continue; - value = p + 1; - goto create_attr; - - } else if (inst->passwd_hdr && + if (inst->passwd_hdr && strlen(inst->passwd_hdr)) { if (strncasecmp(value, inst->passwd_hdr, -- 2.1.4