From a4393cf69b07b32222d56d464f952a57605669fc Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 19 Oct 2007 15:31:45 +0000 Subject: [PATCH] kes Set default debug_level to zero. This corrects bugs #991 and #993. kes Fix a crash in bat when it cannot connect to the Director for example if the Director is not running. kes Remove redundant INDEX (JobId) from File table in the trunk. This fixes bug #992. kes Make explicit exception to GPL in LICENSE to permit linking the Win32 FD with Microsoft VSS code. kes Apply the Solaris package patch from Masopust, Christian kes Apply the patch to optionally add a timestamp in the debug output submitted by Mariusz Czulada . git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5772 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/LICENSE | 9 ++++++- bacula/patches/2.2.5-deamon.patch | 40 +++++++++++++++++++++++++++++++ bacula/src/lib/message.c | 2 +- bacula/technotes-2.3 | 5 ++++ 4 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 bacula/patches/2.2.5-deamon.patch diff --git a/bacula/LICENSE b/bacula/LICENSE index 751103f54a..12d4c662a9 100644 --- a/bacula/LICENSE +++ b/bacula/LICENSE @@ -13,7 +13,7 @@ License: For the most part, Bacula is licensed under the GPL version 2 this code is listed under Copyright Free Software Foundation Europe e.V. What follows is the addition(s) to the GPL version 2 license, that -applys to code that is copyrighted by the Free Software Foundation +applies to code that is copyrighted by the Free Software Foundation Europe e.V. Linking: @@ -31,6 +31,13 @@ and distribute the linked executables. You must obey the GNU General Public License in all respects for all of the code used other than for the Microsoft VSS code, where you must obey their license terms. +The Bacula Project gives permission for plugins with GPLv2 compatible +licenses to be loaded and distributed with the Bacula executables as +long as the combined work is distributed under the terms listed in the +Bacula LICENSE file. A full list of GPLv2 compatible licenses can be +found at: http://www.fsf.org/licensing/licenses/. If you wish to load +or distribute plugins with different licensing terms please contact +the Bacula Project at: license@bacula.org =================================== diff --git a/bacula/patches/2.2.5-deamon.patch b/bacula/patches/2.2.5-deamon.patch new file mode 100644 index 0000000000..6e82f1ea87 --- /dev/null +++ b/bacula/patches/2.2.5-deamon.patch @@ -0,0 +1,40 @@ + + This patch fixes the default behavior of a non-DEVELOPER version of Bacula + to close STDIN, STDOUT, and STDERR so that an ssh that starts bacula + will not hang. It also fixes a crash in bat when bat is executed and + cannot connect to the Director (e.g. it is not running). + This patch fixes bugs #991 and #993. + + Apply this fix to Bacula version 2.2.5 with: + + cd + patch -p0 <2.2.5-daemon.patch + ./configure (your options) + make + ... + make install + + +Index: src/lib/message.c +=================================================================== +--- src/lib/message.c (revision 5744) ++++ src/lib/message.c (working copy) +@@ -52,7 +52,8 @@ + */ + const char *working_directory = NULL; /* working directory path stored here */ + int verbose = 0; /* increase User messages */ +-int debug_level = 1; /* debug level */ ++/* Keep debug level set to zero by default */ ++int debug_level = 0; /* debug level */ + time_t daemon_start_time = 0; /* Daemon start time */ + const char *version = VERSION " (" BDATE ")"; + char my_name[30]; /* daemon name is stored here */ +@@ -1338,7 +1339,7 @@ + jcr = get_jcr_from_tsd(); + } + /* If no jcr or dequeuing send to daemon to avoid recursion */ +- if (!jcr || jcr->dequeuing) { ++ if ((jcr && !jcr->msg_queue) || !jcr || jcr->dequeuing) { + /* jcr==NULL => daemon message, safe to send now */ + Jmsg(jcr, item->type, item->mtime, "%s", item->msg); + free(item); diff --git a/bacula/src/lib/message.c b/bacula/src/lib/message.c index 7546caf202..91a34cf417 100644 --- a/bacula/src/lib/message.c +++ b/bacula/src/lib/message.c @@ -49,7 +49,7 @@ sql_escape p_sql_escape = NULL; */ const char *working_directory = NULL; /* working directory path stored here */ int verbose = 0; /* increase User messages */ -int debug_level = 1; /* debug level */ +int debug_level = 0; /* debug level */ bool dbg_timestamp = false; /* print timestamp in debug output */ time_t daemon_start_time = 0; /* Daemon start time */ const char *version = VERSION " (" BDATE ")"; diff --git a/bacula/technotes-2.3 b/bacula/technotes-2.3 index a399c21ca0..ab0169ce3c 100644 --- a/bacula/technotes-2.3 +++ b/bacula/technotes-2.3 @@ -2,6 +2,11 @@ General: 19Oct07 +kes Set default debug_level to zero. This corrects bugs #991 and #993. +kes Fix a crash in bat when it cannot connect to the Director for example + if the Director is not running. +kes Remove redundant INDEX (JobId) from File table in the trunk. + This fixes bug #992. kes Make explicit exception to GPL in LICENSE to permit linking the Win32 FD with Microsoft VSS code. kes Apply the Solaris package patch from -- 2.39.5