From: Kern Sibbald Date: Sat, 28 Jan 2012 17:26:27 +0000 (+0100) Subject: Add wait on bad connection for security X-Git-Tag: Release-7.0.0~300 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5a4daa26444f7fdd6da5d287ccfeb681e137cfdc;p=bacula%2Fbacula Add wait on bad connection for security --- diff --git a/bacula/src/stored/dircmd.c b/bacula/src/stored/dircmd.c index 1792599d62..65fcefed25 100644 --- a/bacula/src/stored/dircmd.c +++ b/bacula/src/stored/dircmd.c @@ -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, "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; }