|
Lines 219-224
Link Here
|
| 219 |
} |
219 |
} |
| 220 |
void |
220 |
void |
|
|
221 |
update_trusted_badlogins(char *username) |
| 222 |
{ |
| 223 |
if(iscomsec()){ |
| 224 |
struct pr_passwd *pr,*putpr; |
| 225 |
pr=getprpwnam((char *)username); |
| 226 |
putpr=pr; |
| 227 |
if(putpr != NULL) { |
| 228 |
if(!putpr->uflg.fg_nlogins) |
| 229 |
putpr->uflg.fg_nlogins=1; |
| 230 |
putpr->ufld.fd_nlogins++; |
| 231 |
putprpwnam(username,putpr); |
| 232 |
} |
| 233 |
} |
| 234 |
} |
| 235 |
|
| 236 |
|
| 237 |
void |
| 221 |
auth_log(Authctxt *authctxt, int authenticated, char *method, char *info) |
238 |
auth_log(Authctxt *authctxt, int authenticated, char *method, char *info) |
| 222 |
{ |
239 |
{ |
| 223 |
void (*authlog) (const char *fmt,...) = verbose; |
240 |
void (*authlog) (const char *fmt,...) = verbose; |
|
Lines 245-250
Link Here
|
| 245 |
get_remote_port(), |
262 |
get_remote_port(), |
| 246 |
info); |
263 |
info); |
|
|
264 |
|
| 247 |
#ifdef CUSTOM_FAILED_LOGIN |
265 |
#ifdef CUSTOM_FAILED_LOGIN |
| 248 |
if (authenticated == 0 && !authctxt->postponed && |
266 |
if (authenticated == 0 && !authctxt->postponed && |
| 249 |
(strcmp(method, "password") == 0 || |
267 |
(strcmp(method, "password") == 0 || |
|
Lines 252-257
Link Here
|
| 252 |
strcmp(method, "challenge-response") == 0)) |
270 |
strcmp(method, "challenge-response") == 0)) |
| 253 |
record_failed_login(authctxt->user, |
271 |
record_failed_login(authctxt->user, |
| 254 |
get_canonical_hostname(options.use_dns), "ssh"); |
272 |
get_canonical_hostname(options.use_dns), "ssh"); |
|
|
273 |
else |
| 274 |
if (authenticated == 0 && !authctxt->postponed && options.use_pam && strcmp(method, "none")) |
| 275 |
PRIVSEP(update_trusted_badlogins(authctxt->user)); |
| 255 |
#endif |
276 |
#endif |
| 256 |
#ifdef SSH_AUDIT_EVENTS |
277 |
#ifdef SSH_AUDIT_EVENTS |
| 257 |
if (authenticated == 0 && !authctxt->postponed) { |
278 |
if (authenticated == 0 && !authctxt->postponed) { |