Now that we have Cleartext-Password and Password-With-Header, use
[freeradius.git] / src / modules / rlm_eap / types / rlm_eap_gtc / rlm_eap_gtc.c
index b6b50f6..c6b55d5 100644 (file)
@@ -155,7 +155,7 @@ static int gtc_authenticate(void *type_data, EAP_HANDLER *handler)
        rlm_eap_gtc_t *inst = (rlm_eap_gtc_t *) type_data;
 
        /*
-        *      Get the User-Password for this user.
+        *      Get the Cleartext-Password for this user.
         */
        rad_assert(handler->request != NULL);
        rad_assert(handler->stage == AUTHENTICATE);
@@ -191,9 +191,9 @@ static int gtc_authenticate(void *type_data, EAP_HANDLER *handler)
                /*
                 *      For now, do clear-text password authentication.
                 */
-               vp = pairfind(handler->request->config_items, PW_PASSWORD);
+               vp = pairfind(handler->request->config_items, PW_CLEARTEXT_PASSWORD);
                if (!vp) {
-                       DEBUG2("  rlm_eap_gtc: ERROR: Clear-test User-Password is required for authentication.");
+                       DEBUG2("  rlm_eap_gtc: ERROR: Cleartext-Password is required for authentication.");
                        eap_ds->request->code = PW_EAP_FAILURE;
                        return 0;
                }
@@ -222,7 +222,7 @@ static int gtc_authenticate(void *type_data, EAP_HANDLER *handler)
                 *      If there was a User-Password in the request,
                 *      why the heck are they using EAP-GTC?
                 */
-               rad_assert(handler->request->password == NULL);
+               pairdelete(&handler->request->packet->vps, PW_USER_PASSWORD);
 
                vp = pairmake("User-Password", "", T_OP_EQ);
                if (!vp) {