From 67a5233e607154016353ba27147766edc64476c2 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Thu, 3 Apr 2003 16:11:17 +0000 Subject: [PATCH] Print length if Hello to short or long git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@415 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/kernstodo | 3 ++- bacula/src/dird/authenticate.c | 4 ++-- bacula/src/filed/authenticate.c | 2 +- bacula/src/stored/authenticate.c | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bacula/kernstodo b/bacula/kernstodo index 247851c8a4..4d6d5afe17 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -1,5 +1,5 @@ Kern's ToDo List - 28 March 2003 + 3 April 2003 Documentation to do: (a little bit at a time) - Document running a test version. @@ -20,6 +20,7 @@ Testing to do: (painful) - multiple simultaneous Volumes For 1.30 release: +- Make non-zero status from RunJobBefore/After error the job. - Remove kern and kelvin from mysql_grant... - Install grant_mysql... - Look at Python for a Bacula scripting language -- www.python.org diff --git a/bacula/src/dird/authenticate.c b/bacula/src/dird/authenticate.c index 8cb06f6165..f6a11fb325 100644 --- a/bacula/src/dird/authenticate.c +++ b/bacula/src/dird/authenticate.c @@ -127,10 +127,10 @@ int authenticate_file_daemon(JCR *jcr) int authenticate_user_agent(BSOCK *ua) { char name[MAXSTRING]; - int ok = 0; + int ok; if (ua->msglen < 16 || ua->msglen >= MAXSTRING-1) { - Emsg0(M_ERROR, 0, _("UA Hello is invalid.\n")); + Emsg1(M_ERROR, 0, _("UA Hello is invalid. Len=%d\n"), ua->msglen); return 0; } diff --git a/bacula/src/filed/authenticate.c b/bacula/src/filed/authenticate.c index 9c4440c1ca..93ea4195e2 100644 --- a/bacula/src/filed/authenticate.c +++ b/bacula/src/filed/authenticate.c @@ -46,7 +46,7 @@ static int authenticate(int rcode, BSOCK *bs) return 0; } if (bs->msglen < 25 || bs->msglen > 200) { - Emsg0(M_FATAL, 0, _("Bad Hello command from Director.\n")); + Emsg1(M_FATAL, 0, _("Bad Hello command from Director. Len=%d.\n"), bs->msglen); return 0; } dirname = get_pool_memory(PM_MESSAGE); diff --git a/bacula/src/stored/authenticate.c b/bacula/src/stored/authenticate.c index 5d4d670901..46cc07818b 100644 --- a/bacula/src/stored/authenticate.c +++ b/bacula/src/stored/authenticate.c @@ -47,7 +47,7 @@ static int authenticate(int rcode, BSOCK *bs) return 0; } if (bs->msglen < 25 || bs->msglen > 200) { - Emsg0(M_FATAL, 0, _("Bad Hello command from Director.\n")); + Emsg1(M_FATAL, 0, _("Bad Hello command from Director. Len=%d.\n"), bs->msglen); return 0; } dirname = get_pool_memory(PM_MESSAGE); -- 2.39.5