DEBUG2("auth: type Crypt");
if (password_pair == NULL) {
DEBUG2("No Crypt-Password configured for the user");
- rad_authlog("No Crypt-Password configured for the user", request, 0);
+ rad_authlog("Login incorrect "
+ "(No Crypt-Password configured for the user)", request, 0);
return -1;
}
*/
if (password_pair == NULL) {
DEBUG2("auth: No password configured for the user");
- rad_authlog("No password configured for the user", request, 0);
+ rad_authlog("Login incorrect "
+ "(No password configured for the user)", request, 0);
return -1;
}
} else if (auth_item->attribute != PW_CHAP_PASSWORD) {
DEBUG2("The user did not supply a User-Password or a CHAP-Password attribute");
- rad_authlog("The user did not supply a User-Password or a CHAP-Password attribute", request, 0);
+ rad_authlog("Login incorrect "
+ "(no User-Password or CHAP-Password attribute)", request, 0);
return -1;
}
*/
if ((request->proxy_reply->code != PW_AUTHENTICATION_ACK) &&
(request->proxy_reply->code != PW_ACCESS_CHALLENGE)) {
- rad_authlog("Home server says invalid user", request, 0);
+ rad_authlog("Login incorrect (Home Server says so)", request, 0);
request->reply->code = PW_AUTHENTICATION_REJECT;
return RLM_MODULE_REJECT;
}
}
request->reply->code = PW_AUTHENTICATION_REJECT;
}
+
/*
* Hope that the module returning REJECT is smart
* enough to do pairfre(&request->reply->vps)...
request->reply->code = PW_AUTHENTICATION_REJECT;
/*
- * They're trying to log in too many times.
- * Remove ALL reply attributes.
- */
+ * They're trying to log in too many times.
+ * Remove ALL reply attributes.
+ */
pairfree(&request->reply->vps);
tmp = pairmake("Reply-Message", user_msg, T_OP_SET);
request->reply->vps = tmp;
}
if (result >= 0 &&
- (check_item = pairfind(request->config_items, PW_LOGIN_TIME)) != NULL) {
+ (check_item = pairfind(request->config_items, PW_LOGIN_TIME)) != NULL) {
/*
* Authentication is OK. Now see if this
* vp->addport is set.
*/
if (((tmp = pairfind(request->reply->vps,
- PW_FRAMED_IP_ADDRESS)) != NULL) &&
+ PW_FRAMED_IP_ADDRESS)) != NULL) &&
(tmp->flags.addport != 0)) {
VALUE_PAIR *vpPortId;
PW_NAS_PORT_ID)) != NULL) {
tmp->lvalue = htonl(ntohl(tmp->lvalue) + vpPortId->lvalue);
tmp->flags.addport = 0;
+ } else {
+ DEBUG2("WARNING: No NAS-Port attribute in request. CANNOT return a Framed-IP-Address + NAS-Port.\n");
+ pairdelete(&request->reply->vps, PW_FRAMED_IP_ADDRESS);
}
}