From d3e513d6eea96c10c4e0d3f62f47170cef6fa001 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 25 Jan 2008 18:40:14 +0000 Subject: [PATCH] kes Apply patch from Martin to correct bug #1040, bscan sets existing ClientId to zero. kes Fixed important spelling error in doc -- bug #1045. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.2@6309 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/ChangeLog | 15 +++++++++++++++ bacula/src/lib/bnet.c | 5 +++-- bacula/src/stored/bscan.c | 9 +++++++++ bacula/technotes-2.1 | 4 ++++ 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/bacula/ChangeLog b/bacula/ChangeLog index ffdfca05a5..47ac66bfa1 100644 --- a/bacula/ChangeLog +++ b/bacula/ChangeLog @@ -1,6 +1,21 @@ Technical notes on version 2.2.x General: +Release Version 2.2.8 +25Jan08 +kes Apply patch from Martin to correct bug #1040, bscan sets existing + ClientId to zero. +kes Fixed important spelling error in doc -- bug #1045. +23Jan08 +kes Move initialization of read/write res lock earlier in the code. + This fixes the crash with a null conf file. This fixes bug + #1030. +kes Redefine CURES in lib/parse_conf to be URES and move it all + into lib/parse_conf.c -- this responds to bug #1042, but does + not fix it. The fix is not to compile with FORTIFY_SOURCE. +kes Backport fix de-referencing a NULL pointer in the scanner from + the trunk SVN. I don't think this was reported as a bug. + Beta release Version 2.2.8 09Jan08 kes Re-enable the new job code editing (%f). diff --git a/bacula/src/lib/bnet.c b/bacula/src/lib/bnet.c index 08481133c0..d5aed8a57d 100644 --- a/bacula/src/lib/bnet.c +++ b/bacula/src/lib/bnet.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2006 Free Software Foundation Europe e.V. + Copyright (C) 2000-2008 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -261,6 +261,7 @@ bool bnet_tls_server(TLS_CONTEXT *ctx, BSOCK * bsock, alist *verify_list) goto err; } } + Dmsg0(50, "TLS server negotiation established.\n"); return true; err: @@ -307,7 +308,7 @@ bool bnet_tls_client(TLS_CONTEXT *ctx, BSOCK * bsock, alist *verify_list) goto err; } } - + Dmsg0(50, "TLS client negotiation established.\n"); return true; err: diff --git a/bacula/src/stored/bscan.c b/bacula/src/stored/bscan.c index 85ddc1d399..fd11d7ff41 100644 --- a/bacula/src/stored/bscan.c +++ b/bacula/src/stored/bscan.c @@ -972,7 +972,16 @@ static int create_pool_record(B_DB *db, POOL_DBR *pr) */ static int create_client_record(B_DB *db, CLIENT_DBR *cr) { + /* + * Note, update_db can temporarily be set false while + * updating the database, so we must ensure that ClientId is non-zero. + */ if (!update_db) { + cr->ClientId = 0; + if (!db_get_client_record(bjcr, db, cr)) { + Pmsg1(0, _("Could not get Client record. ERR=%s\n"), db_strerror(db)); + return 0; + } return 1; } if (!db_create_client_record(bjcr, db, cr)) { diff --git a/bacula/technotes-2.1 b/bacula/technotes-2.1 index 454820fba8..585a3d8868 100644 --- a/bacula/technotes-2.1 +++ b/bacula/technotes-2.1 @@ -2,6 +2,10 @@ General: Release Version 2.2.8 +25Jan08 +kes Apply patch from Martin to correct bug #1040, bscan sets existing + ClientId to zero. +kes Fixed important spelling error in doc -- bug #1045. 23Jan08 kes Move initialization of read/write res lock earlier in the code. This fixes the crash with a null conf file. This fixes bug -- 2.39.5