From: Kern Sibbald Date: Thu, 22 Feb 2007 15:36:17 +0000 (+0000) Subject: kes Fix a few places in lib/message.c where the open fd may X-Git-Tag: Release-2.0.3~27 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9879adf1e1eea08f87e9c6b617a7c5180e092091;p=bacula%2Fbacula kes Fix a few places in lib/message.c where the open fd may not be zeroed. 21Feb07 kes Add LANG=C to autoconf/randpass so it works with languages other than English. Fixes bug #788. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.0@4235 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/autoconf/randpass b/bacula/autoconf/randpass index af30bfb929..2294a23331 100755 --- a/bacula/autoconf/randpass +++ b/bacula/autoconf/randpass @@ -3,6 +3,7 @@ # Generate a random password, written to standard output # By John Walker # +LANG=C if test "x$1" = "x" ; then PWL=48 # Password length in characters else diff --git a/bacula/src/lib/message.c b/bacula/src/lib/message.c index 9b0f3069e5..e4cef4e6ac 100755 --- a/bacula/src/lib/message.c +++ b/bacula/src/lib/message.c @@ -9,7 +9,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2006 Free Software Foundation Europe e.V. + Copyright (C) 2000-2007 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. @@ -33,6 +33,14 @@ (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich, Switzerland, email:ftf@fsfeurope.org. */ +/* + * Bacula message handling routines + * + * Kern Sibbald, April 2000 + * + * Version $Id$ + * + */ #include "bacula.h" @@ -426,6 +434,7 @@ void close_msg(JCR *jcr) case MD_APPEND: if (d->fd) { fclose(d->fd); /* close open file descriptor */ + d->fd = NULL; } break; case MD_MAIL: @@ -486,6 +495,7 @@ void close_msg(JCR *jcr) rem_temp_file: /* Remove temp file */ fclose(d->fd); + d->fd = NULL; unlink(d->mail_filename); free_pool_memory(d->mail_filename); d->mail_filename = NULL; @@ -747,6 +757,7 @@ send_to_file: /* On error, we close and reopen to handle log rotation */ if (ferror(d->fd)) { fclose(d->fd); + d->fd = NULL; if (open_dest_file(jcr, d, mode)) { fputs(dt, d->fd); fputs(msg, d->fd); diff --git a/bacula/src/version.h b/bacula/src/version.h index 42ec7035f2..c03c05e0c9 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -4,8 +4,8 @@ #undef VERSION #define VERSION "2.0.3" -#define BDATE "19 February 2007" -#define LSMDATE "19Feb07" +#define BDATE "22 February 2007" +#define LSMDATE "22Feb07" #define PROG_COPYRIGHT "Copyright (C) %d-2007 Free Software Foundation Europe e.V.\n" #define BYEAR "2007" /* year for copyright messages in progs */ diff --git a/bacula/technotes-2.0 b/bacula/technotes-2.0 index 39f37a65c9..b1af0488f5 100644 --- a/bacula/technotes-2.0 +++ b/bacula/technotes-2.0 @@ -1,6 +1,12 @@ Technical notes on version 2.0 General: +22Feb07 +kes Fix a few places in lib/message.c where the open fd may + not be zeroed. +21Feb07 +kes Add LANG=C to autoconf/randpass so it works with languages other + than English. Fixes bug #788. 20Feb07 ebl Revert ClientRunBeforeJob as it was in 1.38.x This fixes bug #780