Mercurial > dropbear
comparison svr-auth.c @ 247:c07de41b53d7 contrib-blacklist
propagate from branch 'au.asn.ucc.matt.dropbear' (head c9347a030ac9ef5454b7a84f4915e91dc44efd6c)
to branch 'au.asn.ucc.matt.dropbear.contrib.blacklist' (head 8662c7148e4b738e2511a6fce9a4cbd959ecb6b8)
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 06 Sep 2005 04:57:14 +0000 |
parents | f4cf0415fec1 |
children |
comparison
equal
deleted
inserted
replaced
245:b24730e11c83 | 247:c07de41b53d7 |
---|---|
31 #include "buffer.h" | 31 #include "buffer.h" |
32 #include "ssh.h" | 32 #include "ssh.h" |
33 #include "packet.h" | 33 #include "packet.h" |
34 #include "auth.h" | 34 #include "auth.h" |
35 #include "runopts.h" | 35 #include "runopts.h" |
36 #include "blacklist.h" | |
36 | 37 |
37 static void authclear(); | 38 static void authclear(); |
38 static int checkusername(unsigned char *username, unsigned int userlen); | 39 static int checkusername(unsigned char *username, unsigned int userlen); |
39 static void send_msg_userauth_banner(); | 40 static void send_msg_userauth_banner(); |
40 | 41 |
336 if (ses.authstate.printableuser == NULL) { | 337 if (ses.authstate.printableuser == NULL) { |
337 userstr = "is invalid"; | 338 userstr = "is invalid"; |
338 } else { | 339 } else { |
339 userstr = ses.authstate.printableuser; | 340 userstr = ses.authstate.printableuser; |
340 } | 341 } |
342 blacklist(svr_ses.addrstring); | |
341 dropbear_exit("Max auth tries reached - user '%s' from %s", | 343 dropbear_exit("Max auth tries reached - user '%s' from %s", |
342 userstr, svr_ses.addrstring); | 344 userstr, svr_ses.addrstring); |
343 } | 345 } |
344 | 346 |
345 TRACE(("leave send_msg_userauth_failure")) | 347 TRACE(("leave send_msg_userauth_failure")) |