]> git.sur5r.net Git - bacula/bacula/commitdiff
- Tweak license to include Microsoft restrictions.
authorKern Sibbald <kern@sibbald.com>
Sat, 8 Apr 2006 14:27:35 +0000 (14:27 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 8 Apr 2006 14:27:35 +0000 (14:27 +0000)
- Move mysql.reconnect to after real_connect().  Thanks to
  Frank Sweetser for the patch.
- Disallow a backslash in a File = directive (Windows junk)
  unless the string is quoted.
- Apply Eric's patch to ua_label.c so that daemon protocol
  is not translated.
- Add NT_ definition for strings that should not be translated.
- Apply NT_() to ua_label.c

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2888 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/LICENSE
bacula/kes-1.39
bacula/patches/1.38.7-mysql.patch [new file with mode: 0644]
bacula/src/baconfig.h
bacula/src/cats/mysql.c
bacula/src/dird/inc_conf.c
bacula/src/dird/ua_label.c
bacula/src/stored/btape.c
bacula/src/version.h

index 029ef03d390b4f493dec6021780fdbab2fa8f1a5..56a74ef734afe7c39d188660b36b9a67c62dfa0d 100644 (file)
@@ -7,7 +7,7 @@ License:
 For the most part, Bacula is licensed under the GPL version 2         
 and any code that is Copyright Kern Sibbald and John Walker or
 Copyright Kern Sibbald (after November 2004) with the GPL
-indication is so licensed, but with the following four additions:
+indication is so licensed, but with the following five additions:
 
 Linking: 
 Bacula may be linked with any libraries permitted under the GPL,
@@ -51,7 +51,7 @@ the copyright license set forth in this Agreement.
 
 Code falling under the above conditions will be marked as follows:
 
-   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 as
@@ -68,6 +68,20 @@ Code falling under the above conditions will be marked as follows:
    Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
    MA 02111-1307, USA.
 
+Windows:
+Certain source code used to build the Windows version of the Bacula
+File daemon is copyrighted and or trademarked by Microsoft and may
+contain Microsoft intellectual property (examples: Microsoft VC++, the
+source to the VSS libraries, the Microsoft C runtime libraries).  As
+such we cannot and do not distribute that software. The compiler is
+available for purchase, and Microsoft provides a free version of the
+compiler. The source code and libraries are available for download from
+Microsoft public Web servers.  We have documented in the src/win32
+directory how we build the Windows File daemon and many users have
+succeeded in doing so themselves.  Our intention is to respect as
+closely as possible Open Source practices while maintaining full
+respect for proprietary and copyrighted code.
+
 =====================================
 
 The entire GPL is reproduced in the manuals distributed with the
index f751dd15ee6a8eb0685afb7ac7f8b5ed06f23d0d..5f893ad4712612947a0eb989307575a9996909b2 100644 (file)
@@ -2,6 +2,17 @@
                         Kern Sibbald
 
 General:
+08Apr06
+- Tweak license to include Microsoft restrictions.
+- Move mysql.reconnect to after real_connect().  Thanks to
+  Frank Sweetser for the patch.
+- Disallow a backslash in a File = directive (Windows junk)
+  unless the string is quoted.                     
+- Apply Eric's patch to ua_label.c so that daemon protocol
+  is not translated.
+- Add NT_ definition for strings that should not be translated.
+- Apply NT_() to ua_label.c
+
 - Remove timed wait for VSS on Win2K3 as it is not yet
   implemented.
 - Correct bacula.in script to reference bacula-ctl-xx in the
diff --git a/bacula/patches/1.38.7-mysql.patch b/bacula/patches/1.38.7-mysql.patch
new file mode 100644 (file)
index 0000000..43e18a1
--- /dev/null
@@ -0,0 +1,34 @@
+
+This patch (thanks to Frank Sweetser) should fix the timeout problem
+users are experiencing with MySQL versions greater than 5.0.13.  
+It can be applied to Bacula version 1.38.7 (and possibly 1.38.5 and 1.38.6)
+with:
+
+  cd <bacula-source>
+  patch -p0 <1.38.7-mysql.patch
+  make
+  make install
+
+Index: src/cats/mysql.c
+===================================================================
+RCS file: /cvsroot/bacula/bacula/src/cats/mysql.c,v
+retrieving revision 1.37.2.2
+diff -u -r1.37.2.2 mysql.c
+--- src/cats/mysql.c   4 Mar 2006 11:10:17 -0000       1.37.2.2
++++ src/cats/mysql.c   7 Apr 2006 14:10:23 -0000
+@@ -132,7 +132,6 @@
+    mysql_server_init(0, NULL, NULL);
+ #endif
+    mysql_init(&(mdb->mysql));
+-   mdb->mysql.reconnect = 1;             /* so connection does not timeout */
+    Dmsg0(50, "mysql_init done\n");
+    /* If connection fails, try at 5 sec intervals for 30 seconds. */
+    for (int retry=0; retry < 6; retry++) {
+@@ -153,6 +152,7 @@
+       bmicrosleep(5,0);
+    }
++   mdb->mysql.reconnect = 1;             /* so connection does not timeout */
+    Dmsg0(50, "mysql_real_connect done\n");
+    Dmsg3(50, "db_user=%s db_name=%s db_password=%s\n", mdb->db_user, mdb->db_name,
+             mdb->db_password==NULL?"(NULL)":mdb->db_password);
index 0e1ce6562784c6ee8553e4e0c8d06b8301b22e45..5a11d78f6e2a245405b626575c070e004c376b5d 100644 (file)
@@ -95,6 +95,8 @@
       #define setlocale(p, d)
    #endif
 #endif /* ENABLE_NLS */
+/* Use the following for strings not to be translated */
+#define NT_(s) (s)   
 
 /* This should go away! ****FIXME***** */
 #define MAXSTRING 500
index 61fda9a6f50085529b1fa8300078f9f26ea8edd3..0ff62087f8684bcc066e7223f9db1043e8f82437 100644 (file)
@@ -132,7 +132,6 @@ db_open_database(JCR *jcr, B_DB *mdb)
    mysql_server_init(0, NULL, NULL);
 #endif
    mysql_init(&(mdb->mysql));
-   mdb->mysql.reconnect = 1;             /* so connection does not timeout */
    Dmsg0(50, "mysql_init done\n");
    /* If connection fails, try at 5 sec intervals for 30 seconds. */
    for (int retry=0; retry < 6; retry++) {
@@ -153,6 +152,7 @@ db_open_database(JCR *jcr, B_DB *mdb)
       bmicrosleep(5,0);
    }
 
+   mdb->mysql.reconnect = 1;             /* so connection does not timeout */
    Dmsg0(50, "mysql_real_connect done\n");
    Dmsg3(50, "db_user=%s db_name=%s db_password=%s\n", mdb->db_user, mdb->db_name,
             mdb->db_password==NULL?"(NULL)":mdb->db_password);
index 38adb0b838eba656f05ddb86e172584327d3c3f9..a15757711985d1a4b444cd5662ea50ae74ec001e 100644 (file)
@@ -531,21 +531,25 @@ static void store_fname(LEX *lc, RES_ITEM *item, int index, int pass)
       /* Pickup Filename string
        */
       switch (token) {
-         case T_IDENTIFIER:
-         case T_UNQUOTED_STRING:
-         case T_QUOTED_STRING:
-            if (res_all.res_fs.have_MD5) {
-               MD5Update(&res_all.res_fs.md5c, (unsigned char *)lc->str, lc->str_len);
-            }
-            incexe = &res_incexe;
-            if (incexe->name_list.size() == 0) {
-               incexe->name_list.init(10, true);
-            }
-            incexe->name_list.append(bstrdup(lc->str));
-            Dmsg1(900, "Add to name_list %s\n", lc->str);
-            break;
-         default:
-            scan_err1(lc, _("Expected a filename, got: %s"), lc->str);
+      case T_IDENTIFIER:
+      case T_UNQUOTED_STRING:
+         if (strchr(lc->str, '\\')) {
+            scan_err1(lc, _("Backslash found. Use forward slashes or quote the string.: %s\n"), lc->str);
+            /* NOT REACHED */
+         }
+      case T_QUOTED_STRING:
+         if (res_all.res_fs.have_MD5) {
+            MD5Update(&res_all.res_fs.md5c, (unsigned char *)lc->str, lc->str_len);
+         }
+         incexe = &res_incexe;
+         if (incexe->name_list.size() == 0) {
+            incexe->name_list.init(10, true);
+         }
+         incexe->name_list.append(bstrdup(lc->str));
+         Dmsg1(900, "Add to name_list %s\n", lc->str);
+         break;
+      default:
+         scan_err1(lc, _("Expected a filename, got: %s"), lc->str);
       }
    }
    scan_to_eol(lc);
index f94121061a4779673f327985ffe4ea9174bcee9c..285c7902fe6418b6f44effca61b8bd2a05f52f8e 100644 (file)
@@ -736,16 +736,16 @@ static char *get_volume_name_from_SD(UAContext *ua, int Slot, int drive)
    bstrncpy(dev_name, store->dev_name(), sizeof(dev_name));
    bash_spaces(dev_name);
    /* Ask for autochanger list of volumes */
-   bnet_fsend(sd, _("readlabel %s Slot=%d drive=%d\n"), dev_name, Slot, drive);
+   bnet_fsend(sd, NT_("readlabel %s Slot=%d drive=%d\n"), dev_name, Slot, drive);
    Dmsg1(100, "Sent: %s", sd->msg);
 
    /* Get Volume name in this Slot */
    while (bnet_recv(sd) >= 0) {
       bsendmsg(ua, "%s", sd->msg);
       Dmsg1(100, "Got: %s", sd->msg);
-      if (strncmp(sd->msg, "3001 Volume=", 12) == 0) {
+      if (strncmp(sd->msg, NT_("3001 Volume="), 12) == 0) {
          VolName = (char *)malloc(sd->msglen);
-         if (sscanf(sd->msg, "3001 Volume=%s Slot=%d", VolName, &rtn_slot) == 2) {
+         if (sscanf(sd->msg, NT_("3001 Volume=%s Slot=%d"), VolName, &rtn_slot) == 2) {
             break;
          }
          free(VolName);
@@ -778,7 +778,7 @@ static vol_list_t *get_vol_list_from_SD(UAContext *ua, bool scan)
    bstrncpy(dev_name, store->dev_name(), sizeof(dev_name));
    bash_spaces(dev_name);
    /* Ask for autochanger list of volumes */
-   bnet_fsend(sd, _("autochanger list %s \n"), dev_name);
+   bnet_fsend(sd, NT_("autochanger list %s \n"), dev_name);
 
    /* Read and organize list of Volumes */
    while (bnet_recv(sd) >= 0) {
@@ -890,7 +890,7 @@ static int get_num_slots_from_SD(UAContext *ua)
    bstrncpy(dev_name, store->dev_name(), sizeof(dev_name));
    bash_spaces(dev_name);
    /* Ask for autochanger number of slots */
-   bnet_fsend(sd, _("autochanger slots %s\n"), dev_name);
+   bnet_fsend(sd, NT_("autochanger slots %s\n"), dev_name);
 
    while (bnet_recv(sd) >= 0) {
       if (sscanf(sd->msg, "slots=%d\n", &slots) == 1) {
@@ -922,10 +922,10 @@ int get_num_drives_from_SD(UAContext *ua)
    bstrncpy(dev_name, store->dev_name(), sizeof(dev_name));
    bash_spaces(dev_name);
    /* Ask for autochanger number of slots */
-   bnet_fsend(sd, _("autochanger drives %s\n"), dev_name);
+   bnet_fsend(sd, NT_("autochanger drives %s\n"), dev_name);
 
    while (bnet_recv(sd) >= 0) {
-      if (sscanf(sd->msg, "drives=%d\n", &drives) == 1) {
+      if (sscanf(sd->msg, NT_("drives=%d\n"), &drives) == 1) {
          break;
       } else {
          bsendmsg(ua, "%s", sd->msg);
index c8979749be3b2b45f13b04caae36a0eb712a0ce5..cf39e9b0ab85464360c7c25b3423f7f6f3f86b1a 100644 (file)
@@ -138,7 +138,7 @@ int get_cmd(const char *prompt);
 
 /*********************************************************************
  *
- *         Main Bacula Pool Creation Program
+ *     Bacula tape testing program
  *
  */
 int main(int margc, char *margv[])
index 30a5341135659a204417ac649b6f52752ad4da9f..8ba38bde0cffe03906b7157ba5d9551db2c40073 100644 (file)
@@ -3,9 +3,9 @@
  */
 
 #undef  VERSION
-#define VERSION "1.39.6"
-#define BDATE   "24 March 2006"
-#define LSMDATE "24Mar06"
+#define VERSION "1.39.7"
+#define BDATE   "08 April 2006"
+#define LSMDATE "08Apr06"
 
 /* Debug flags */
 #undef  DEBUG