From dc8c95ac4206814f381d10c0a425d76f45d8bdc4 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 1 Aug 2006 08:20:29 +0000 Subject: [PATCH] kes Update copyright date in program files, and for the most part put it on a #define. kes Implement %q in bsnprintf.c apparently I forgot it. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3217 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/kes-1.39 | 4 ++++ bacula/src/console/console.c | 4 ++-- bacula/src/dird/dird.c | 4 ++-- bacula/src/filed/filed.c | 6 ++--- bacula/src/lib/bsnprintf.c | 17 +++++++++----- bacula/src/stored/bcopy.c | 6 ++--- bacula/src/stored/bextract.c | 4 ++-- bacula/src/stored/bls.c | 4 ++-- bacula/src/stored/bscan.c | 4 ++-- bacula/src/stored/btape.c | 16 ++++++------- bacula/src/stored/device.c | 2 +- bacula/src/stored/stored.c | 4 ++-- bacula/src/tools/fstype.c | 2 +- bacula/src/tray-monitor/tray-monitor.c | 31 +++++++++++--------------- bacula/src/version.h | 1 + bacula/src/wx-console/main.cpp | 2 +- 16 files changed, 59 insertions(+), 52 deletions(-) diff --git a/bacula/kes-1.39 b/bacula/kes-1.39 index 5d673cef47..39f2b9812f 100644 --- a/bacula/kes-1.39 +++ b/bacula/kes-1.39 @@ -2,6 +2,10 @@ Kern Sibbald General: +01Aug06 +kes Update copyright date in program files, and for the most part + put it on a #define. +kes Implement %q in bsnprintf.c apparently I forgot it. 31Jul06 kes Make disk-changer sed command compatible with FreeBSD. kes Make a first cut at a ReleaseNotes and ChangeLog for a diff --git a/bacula/src/console/console.c b/bacula/src/console/console.c index 09af970615..8749296dd5 100644 --- a/bacula/src/console/console.c +++ b/bacula/src/console/console.c @@ -92,7 +92,7 @@ static int sleepcmd(FILE *input, BSOCK *UA_sock); static void usage() { fprintf(stderr, _( -"Copyright (C) 2000-2005 Kern Sibbald\n" +"Copyright (C) 2000-%s Kern Sibbald\n" "\nVersion: " VERSION " (" BDATE ") %s %s %s\n\n" "Usage: bconsole [-s] [-c config_file] [-d debug_level]\n" " -c set configuration file to file\n" @@ -100,7 +100,7 @@ static void usage() " -s no signals\n" " -t test - read configuration and exit\n" " -? print this message.\n" -"\n"), HOST_OS, DISTNAME, DISTVER); +"\n"), BYEAR, HOST_OS, DISTNAME, DISTVER); } diff --git a/bacula/src/dird/dird.c b/bacula/src/dird/dird.c index db10ddb919..df1efeb848 100644 --- a/bacula/src/dird/dird.c +++ b/bacula/src/dird/dird.c @@ -75,7 +75,7 @@ extern URES res_all; static void usage() { fprintf(stderr, _( -"Copyright (C) 2000-2005 Kern Sibbald.\n" +"Copyright (C) 2000-%s Kern Sibbald.\n" "\nVersion: %s (%s)\n\n" "Usage: dird [-f -s] [-c config_file] [-d debug_level] [config_file]\n" " -c set configuration file to file\n" @@ -88,7 +88,7 @@ static void usage() " -u userid\n" " -v verbose user messages\n" " -? print this message.\n" -"\n"), VERSION, BDATE); +"\n"), BYEAR, VERSION, BDATE); exit(1); } diff --git a/bacula/src/filed/filed.c b/bacula/src/filed/filed.c index 623de061a3..2a0de9878f 100644 --- a/bacula/src/filed/filed.c +++ b/bacula/src/filed/filed.c @@ -47,8 +47,8 @@ static pthread_t server_tid; static void usage() { - Pmsg2(-1, _( -"Copyright (C) 2000-2005 Kern Sibbald\n" + Pmsg3(-1, _( +"Copyright (C) 2000-%s Kern Sibbald\n" "\nVersion: %s (%s)\n\n" "Usage: bacula-fd [-f -s] [-c config_file] [-d debug_level]\n" " -c use as configuration file\n" @@ -61,7 +61,7 @@ static void usage() " -u userid\n" " -v verbose user messages\n" " -? print this message.\n" -"\n"), VERSION, BDATE); +"\n"), BYEAR, VERSION, BDATE); exit(1); } diff --git a/bacula/src/lib/bsnprintf.c b/bacula/src/lib/bsnprintf.c index 57f556df9d..77e320c9ae 100644 --- a/bacula/src/lib/bsnprintf.c +++ b/bacula/src/lib/bsnprintf.c @@ -7,7 +7,8 @@ * * Adapted for Bacula -- note there were lots of bugs in * the original code: %lld and %s were seriously broken, and - * with FP turned off %f seg faults. + * with FP turned off %f seg faulted. + * * Kern Sibbald, November MMV * * Version $Id$ @@ -16,11 +17,13 @@ #include "bacula.h" #define FP_OUTPUT 1 /* Bacula uses floating point */ - -/* - Temp only for me -- NOT YET READY FOR USE -- seems to work fine - on Linux, but doesn't build correctly on Win32 +/* Define the following if you want all the features of + * normal printf, but with all the security problems. + * For Bacula we turn this off, and it silently ignores + * formats that could pose a security problem. */ +#undef SECURITY_PROBLEM + #ifdef USE_BSNPRINTF #ifdef HAVE_LONG_DOUBLE @@ -218,6 +221,10 @@ int bvsnprintf(char *buffer, int32_t maxlen, const char *format, va_list args) cflags = DP_C_LDOUBLE; ch = *format++; break; + case 'q': /* same as long long */ + cflags = DP_C_INT64; + ch = *format++; + break; default: break; } diff --git a/bacula/src/stored/bcopy.c b/bacula/src/stored/bcopy.c index a23cd2547a..62efd325aa 100644 --- a/bacula/src/stored/bcopy.c +++ b/bacula/src/stored/bcopy.c @@ -8,7 +8,7 @@ * Version $Id$ */ /* - Copyright (C) 2002-2005 Kern Sibbald + Copyright (C) 2002-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -55,7 +55,7 @@ pthread_cond_t wait_device_release = PTHREAD_COND_INITIALIZER; static void usage() { fprintf(stderr, _( -"Copyright (C) 2002-2005 Kern Sibbald.\n" +"Copyright (C) 2002-%s Kern Sibbald.\n" "\nVersion: %s (%s)\n\n" "Usage: bcopy [-d debug_level] \n" " -b bootstrap specify a bootstrap file\n" @@ -66,7 +66,7 @@ static void usage() " -p proceed inspite of errors\n" " -v verbose\n" " -w specify working directory (default /tmp)\n" -" -? print this message\n\n"), VERSION, BDATE); +" -? print this message\n\n"), BYEAR, VERSION, BDATE); exit(1); } diff --git a/bacula/src/stored/bextract.c b/bacula/src/stored/bextract.c index 71a0b2512a..8251f90e61 100644 --- a/bacula/src/stored/bextract.c +++ b/bacula/src/stored/bextract.c @@ -61,7 +61,7 @@ pthread_cond_t wait_device_release = PTHREAD_COND_INITIALIZER; static void usage() { fprintf(stderr, _( -"Copyright (C) 2000-2005 Kern Sibbald.\n" +"Copyright (C) 2000-%s Kern Sibbald.\n" "\nVersion: %s (%s)\n\n" "Usage: bextract \n" " -b specify a bootstrap file\n" @@ -72,7 +72,7 @@ static void usage() " -p proceed inspite of I/O errors\n" " -v verbose\n" " -V specify Volume names (separated by |)\n" -" -? print this message\n\n"), VERSION, BDATE); +" -? print this message\n\n"), BYEAR, VERSION, BDATE); exit(1); } diff --git a/bacula/src/stored/bls.c b/bacula/src/stored/bls.c index e12f6d47cf..5d671f232d 100644 --- a/bacula/src/stored/bls.c +++ b/bacula/src/stored/bls.c @@ -59,7 +59,7 @@ static BSR *bsr = NULL; static void usage() { fprintf(stderr, _( -"Copyright (C) 2000-2005 Kern Sibbald.\n" +"Copyright (C) 2000-%s Kern Sibbald.\n" "\nVersion: %s (%s)\n\n" "Usage: bls [options] \n" " -b specify a bootstrap file\n" @@ -74,7 +74,7 @@ static void usage() " -p proceed inspite of errors\n" " -v be verbose\n" " -V specify Volume names (separated by |)\n" -" -? print this message\n\n"), VERSION, BDATE); +" -? print this message\n\n"), BYEAR, VERSION, BDATE); exit(1); } diff --git a/bacula/src/stored/bscan.c b/bacula/src/stored/bscan.c index fd5e49236f..16b17d291d 100644 --- a/bacula/src/stored/bscan.c +++ b/bacula/src/stored/bscan.c @@ -98,7 +98,7 @@ pthread_cond_t wait_device_release = PTHREAD_COND_INITIALIZER; static void usage() { fprintf(stderr, _( -"Copyright (C) 2001-2005 Kern Sibbald.\n" +"Copyright (C) 2001-%s Kern Sibbald.\n" "\nVersion: %s (%s)\n\n" "Usage: bscan [ options ] \n" " -b bootstrap specify a bootstrap file\n" @@ -116,7 +116,7 @@ static void usage() " -v verbose\n" " -V specify Volume names (separated by |)\n" " -w specify working directory (default from conf file)\n" -" -? print this message\n\n"), VERSION, BDATE); +" -? print this message\n\n"), BYEAR, VERSION, BDATE); exit(1); } diff --git a/bacula/src/stored/btape.c b/bacula/src/stored/btape.c index b4adea4eed..9eabe54198 100644 --- a/bacula/src/stored/btape.c +++ b/bacula/src/stored/btape.c @@ -178,7 +178,8 @@ int main(int margc, char *margv[]) bsnprintf(buf, sizeof(buf), "%" llu, x64); i = bsscanf(buf, "%llu", &y64); if (i != 1 || x64 != y64) { - Pmsg3(-1, _("64 bit printf/scanf problem. i=%d x64=%" llu " y64=%" llu "\n"), i, x64, y64); + Pmsg3(-1, _("64 bit printf/scanf problem. i=%d x64=%" llu " y64=%" llu "\n"), + i, x64, y64); exit(1); } @@ -2572,7 +2573,7 @@ do_tape_cmds() unsigned int i; bool found; - while (get_cmd("*")) { + while (!quit && get_cmd("*")) { sm_check(__FILE__, __LINE__, false); found = false; parse_args(cmd, &args, &argc, argk, argv, MAX_CMD_ARGS); @@ -2582,10 +2583,9 @@ do_tape_cmds() found = true; break; } - if (!found) - Pmsg1(0, _("%s is an illegal command\n"), cmd); - if (quit) - break; + if (!found) { + Pmsg1(0, _("\"%s\" is an illegal command\n"), cmd); + } } } @@ -2603,7 +2603,7 @@ static void helpcmd() static void usage() { fprintf(stderr, _( -"Copyright (C) 2000-2005 Kern Sibbald.\n" +"Copyright (C) 2000-%s Kern Sibbald.\n" "\nVersion: %s (%s)\n\n" "Usage: btape \n" " -b specify bootstrap file\n" @@ -2613,7 +2613,7 @@ static void usage() " -s turn off signals\n" " -v be verbose\n" " -? print this message.\n" -"\n"), VERSION, BDATE); +"\n"), BYEAR, VERSION, BDATE); } diff --git a/bacula/src/stored/device.c b/bacula/src/stored/device.c index be6ef15fb1..1229daeec3 100644 --- a/bacula/src/stored/device.c +++ b/bacula/src/stored/device.c @@ -29,7 +29,7 @@ * Version $Id$ */ /* - Copyright (C) 2000-2005 Kern Sibbald + Copyright (C) 2000-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License diff --git a/bacula/src/stored/stored.c b/bacula/src/stored/stored.c index b72b9208fa..26205e2024 100644 --- a/bacula/src/stored/stored.c +++ b/bacula/src/stored/stored.c @@ -62,7 +62,7 @@ static workq_t dird_workq; /* queue for processing connections */ static void usage() { fprintf(stderr, _( -"Copyright (C) 2000-2005 Kern Sibbald.\n" +"Copyright (C) 2000-%s Kern Sibbald.\n" "\nVersion: %s (%s)\n\n" "Usage: stored [options] [-c config_file] [config_file]\n" " -c use as configuration file\n" @@ -75,7 +75,7 @@ static void usage() " -u userid to \n" " -v verbose user messages\n" " -? print this message.\n" -"\n"), VERSION, BDATE); +"\n"), BYEAR, VERSION, BDATE); exit(1); } diff --git a/bacula/src/tools/fstype.c b/bacula/src/tools/fstype.c index 3f1430a72a..807d60fa46 100644 --- a/bacula/src/tools/fstype.c +++ b/bacula/src/tools/fstype.c @@ -7,7 +7,7 @@ * */ /* - Copyright (C) 2004-2005 Kern Sibbald + Copyright (C) 2004-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License diff --git a/bacula/src/tray-monitor/tray-monitor.c b/bacula/src/tray-monitor/tray-monitor.c index e442ca5465..90156163ab 100644 --- a/bacula/src/tray-monitor/tray-monitor.c +++ b/bacula/src/tray-monitor/tray-monitor.c @@ -8,22 +8,17 @@ */ /* - Copyright (C) 2004-2005 Kern Sibbald + Copyright (C) 2004-2006 Kern Sibbald - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as amended with additional clauses defined in the + file LICENSE in the main source directory. - This library is distributed in the hope that it will be useful, + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, - MA 02111-1307, USA. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + the file LICENSE for additional details. */ @@ -99,7 +94,7 @@ static gboolean blinkstate = TRUE; static void usage() { fprintf(stderr, _( -"Copyright (C) 2000-2004 Kern Sibbald and John Walker\n" +"Copyright (C) 2000-%s Kern Sibbald\n" "Written by Nicolas Boichat (2004)\n" "\nVersion: %s (%s) %s %s %s\n\n" "Usage: tray-monitor [-c config_file] [-d debug_level]\n" @@ -107,7 +102,7 @@ static void usage() " -dnn set debug level to nn\n" " -t test - read configuration and exit\n" " -? print this message.\n" -"\n"), VERSION, BDATE, HOST_OS, DISTNAME, DISTVER); +"\n"), BYEAR, VERSION, BDATE, HOST_OS, DISTNAME, DISTVER); } static GtkWidget *new_image_button(const gchar *stock_id, @@ -500,7 +495,7 @@ static void MonitorAbout(GtkWidget *widget, gpointer data) { "%s" "\n%s: %s (%s) %s %s %s", _("Bacula Tray Monitor"), - _("Copyright (C) 2004-2005 Kern Sibbald\n" + _("Copyright (C) 2004-2006 Kern Sibbald\n" "Written by Nicolas Boichat\n"), _("Version:"), VERSION, BDATE, HOST_OS, DISTNAME, DISTVER); @@ -510,10 +505,10 @@ static void MonitorAbout(GtkWidget *widget, gpointer data) { "%s" "\n%s %s (%s) %s %s %s", _("Bacula Tray Monitor"), - _("Copyright (C) 2004-2005 Kern Sibbald\n" + _("Copyright (C) 2004-2006 Kern Sibbald\n" "Written by Nicolas Boichat\n"), _("Version:"), - VERSION, BDATE, HOST_OS, DISTNAME, DISTVER); + BYEAR, VERSION, BDATE, HOST_OS, DISTNAME); #endif gtk_dialog_run(GTK_DIALOG(about)); gtk_widget_destroy(about); diff --git a/bacula/src/version.h b/bacula/src/version.h index 20acb2777a..4d3b26caf8 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -6,6 +6,7 @@ #define VERSION "1.39.18" #define BDATE "31 July 2006" #define LSMDATE "31Jul06" +#define BYEAR "2006" /* year for copyright messages in progs */ /* Debug flags */ #undef DEBUG diff --git a/bacula/src/wx-console/main.cpp b/bacula/src/wx-console/main.cpp index 5224ac67e6..e07fd0331b 100644 --- a/bacula/src/wx-console/main.cpp +++ b/bacula/src/wx-console/main.cpp @@ -7,7 +7,7 @@ * Version $Id$ */ /* - Copyright (C) 2004-2005 Kern Sibbald + Copyright (C) 2004-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License -- 2.39.5