From 51f83f6710f79e0f103342e43949f11d727be5f6 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 28 Jan 2012 18:26:27 +0100 Subject: [PATCH] Add wait on bad connection for security --- bacula/src/stored/dircmd.c | 2 ++ 1 file changed, 2 insertions(+) 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; } -- 2.39.5