From: Kern Sibbald Date: Sat, 28 Jan 2012 17:26:27 +0000 (+0100) Subject: Add wait on bad connection for security X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=51f83f6710f79e0f103342e43949f11d727be5f6;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; }