Remove "auto_header" flag.
authorAlan T. DeKok <aland@freeradius.org>
Mon, 5 Jul 2010 08:49:10 +0000 (10:49 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 5 Jul 2010 08:49:10 +0000 (10:49 +0200)
raddb/modules/ldap
src/modules/rlm_ldap/rlm_ldap.c

index 8a2077a..34b4a86 100644 (file)
@@ -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.
 }
index 4933a0e..6ac45c5 100644 (file)
@@ -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,