comparison svr-auth.c @ 246:f4cf0415fec1 contrib-blacklist

- blacklisting patch from Michael Deiters
author Matt Johnston <matt@ucc.asn.au>
date Tue, 06 Sep 2005 04:52:46 +0000
parents 0cfba3034be5
children
comparison
equal deleted inserted replaced
224:1dbd2473482f 246:f4cf0415fec1
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"))