]> git.sur5r.net Git - bacula/bacula/commitdiff
Add wait on bad connection for security
authorKern Sibbald <kern@sibbald.com>
Sat, 28 Jan 2012 17:26:27 +0000 (18:26 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:50:31 +0000 (14:50 +0200)
bacula/src/stored/dircmd.c

index 1792599d627aedf417c11f8199bd6de94b57a653..65fcefed25e41dc64007e737401222bb00a15986 100644 (file)
@@ -153,6 +153,7 @@ void *handle_connection_request(void *arg)
 
    if (bs->recv() <= 0) {
       Emsg1(M_ERROR, 0, _("Connection request from %s failed.\n"), bs->who());
+      bmicrosleep(5, 0);   /* make user wait 5 seconds */
       bs->close();
       return NULL;
    }
@@ -163,6 +164,7 @@ void *handle_connection_request(void *arg)
    if (bs->msglen < 25 || bs->msglen > (int)sizeof(name)) {
       Dmsg1(000, "<filed: %s", bs->msg);
       Emsg2(M_ERROR, 0, _("Invalid connection from %s. Len=%d\n"), bs->who(), bs->msglen);
+      bmicrosleep(5, 0);   /* make user wait 5 seconds */
       bs->close();
       return NULL;
    }