60
60
* Make sure user/pass are clean
61
61
* and then log them
63
static int rad_authlog(const char *msg, REQUEST *request, int goodpass) {
63
static int rad_authlog(const char *msg, REQUEST *request, int goodpass)
66
const char *extra_msg = NULL;
65
67
char clean_password[1024];
66
68
char clean_username[1024];
68
71
VALUE_PAIR *username = NULL;
70
73
if (!request->root->log_auth) {
120
radlog_request(L_AUTH, 0, request, "%s: [%s%s%s] (%s)",
123
request->root->log_auth_goodpass ? "/" : "",
124
request->root->log_auth_goodpass ? clean_password : "",
125
auth_name(buf, sizeof(buf), request, 1));
127
radlog_request(L_AUTH, 0, request, "%s: [%s%s%s] (%s)",
130
request->root->log_auth_badpass ? "/" : "",
131
request->root->log_auth_badpass ? clean_password : "",
132
auth_name(buf, sizeof(buf), request, 1));
123
logit = request->root->log_auth_goodpass;
124
extra_msg = request->root->auth_goodpass_msg;
126
logit = request->root->log_auth_badpass;
127
extra_msg = request->root->auth_badpass_msg;
132
radius_xlat(extra + 1, sizeof(extra) - 1, extra_msg, request,
138
radlog_request(L_AUTH, 0, request, "%s: [%s%s%s] (%s)%s",
142
logit ? clean_password : "",
143
auth_name(buf, sizeof(buf), request, 1),
494
505
* done by the server, by rejecting them here.
496
507
case PW_AUTHENTICATION_REJECT:
498
508
rad_authlog("Login incorrect (Home Server says so)",
500
510
request->reply->code = PW_AUTHENTICATION_REJECT;
501
511
return RLM_MODULE_REJECT;
514
rad_authlog("Login incorrect (Home Server failed to respond)",
516
return RLM_MODULE_REJECT;