From 5a4daa26444f7fdd6da5d287ccfeb681e137cfdc 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