Don't set auth-type. It's almost always wrong
authoraland <aland>
Wed, 3 Aug 2005 17:19:39 +0000 (17:19 +0000)
committeraland <aland>
Wed, 3 Aug 2005 17:19:39 +0000 (17:19 +0000)
man/man5/rlm_passwd.5
raddb/radiusd.conf.in
src/modules/rlm_passwd/rlm_passwd.c

index 214ef1e..764d025 100644 (file)
@@ -35,9 +35,6 @@ default) the module will warn about duplicated records.
 .IP ignorenislike
 If set to 'yes', then all records from the file beginning with the '+'
 sign will be ignored.  The default is 'no'.
-.IP authtype
-If an entry matches, the Auth-Type for the request will be set to the
-one specified here.
 .IP format
 The format of the fields in the file, given as an example line from
 the file, with the content of the fields as the RADIUS attributes
index d4c8bd2..e24be7b 100644 (file)
@@ -870,8 +870,6 @@ $INCLUDE ${confdir}/eap.conf
        #
        #            Field marked as ',' may contain a comma separated list
        #            of attributes.
-       #   authtype - if record found this Auth-Type is used to authenticate
-       #            user
        #   hashsize - hashtable size. If 0 or not specified records are not
        #            stored in memory and file is red on every request.
        #   allowmultiplekeys - if few records for every key are allowed
@@ -886,7 +884,6 @@ $INCLUDE ${confdir}/eap.conf
        #passwd etc_smbpasswd {
        #       filename = /etc/smbpasswd
        #       format = "*User-Name::LM-Password:NT-Password:SMB-Account-CTRL-TEXT::"
-       #       authtype = MS-CHAP
        #       hashsize = 100
        #       ignorenislike = no
        #       allowmultiplekeys = no
index 32b4636..7a2307c 100644 (file)
@@ -341,7 +341,6 @@ struct passwd_instance {
        struct mypasswd *pwdfmt;
        char *filename;
        char *format;
-       char *authtype;
        char * delimiter;
        int allowmultiple;
        int ignorenislike;
@@ -359,8 +358,6 @@ static const CONF_PARSER module_config[] = {
           offsetof(struct passwd_instance, filename), NULL,  NULL },
        { "format",   PW_TYPE_STRING_PTR,
           offsetof(struct passwd_instance, format), NULL,  NULL },
-       { "authtype",   PW_TYPE_STRING_PTR,
-          offsetof(struct passwd_instance, authtype), NULL,  NULL },
        { "delimiter",   PW_TYPE_STRING_PTR,
           offsetof(struct passwd_instance, delimiter), NULL,  ":" },
        { "ignorenislike",   PW_TYPE_BOOLEAN,
@@ -482,7 +479,6 @@ static int passwd_detach (void *instance) {
        if(inst->ht) release_ht(inst->ht);
         if (inst->filename != NULL)    free(inst->filename);
         if (inst->format != NULL)      free(inst->format);
-        if (inst->authtype != NULL )   free(inst->authtype);
         if (inst->delimiter != NULL)   free(inst->delimiter);
        free(instance);
        return 0;
@@ -545,17 +541,6 @@ static int passwd_authorize(void *instance, REQUEST *request)
        if(!found) {
                return RLM_MODULE_NOTFOUND;
        }
-       if (inst->authtype &&
-           (key = pairmake ("Auth-Type", inst->authtype, T_OP_EQ))) {
-               DEBUG("rlm_passwd: Adding \"Auth-Type = %s\"",
-                     inst->authtype);
-               /*
-                *      Don't call pairadd.  pairmove doesn't
-                *      over-write existing attributes.
-                */
-               pairmove(&request->config_items, &key);
-               pairfree(&key); /* pairmove may have NOT moved it */
-       }
        return RLM_MODULE_OK;
 
 #undef inst