]> git.sur5r.net Git - bacula/bacula/commitdiff
- Apply Landon's patch for the TLS ANS1 API change.
authorKern Sibbald <kern@sibbald.com>
Sun, 18 Sep 2005 09:56:20 +0000 (09:56 +0000)
committerKern Sibbald <kern@sibbald.com>
Sun, 18 Sep 2005 09:56:20 +0000 (09:56 +0000)
- Remove old code.
- Make single exit path in first_open_device().

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

bacula/kernstodo
bacula/kes-1.37
bacula/src/lib/tls.c
bacula/src/stored/acquire.c
bacula/src/stored/device.c
bacula/src/version.h

index f922f9a6df2b3a3b4dbc1f214f93f0ec609ba5f5..c30214aefbf2cc77de4569776f8294099e55931a 100644 (file)
@@ -63,6 +63,10 @@ Document:
 - Does WildFile match against full name?  Doc.
 
 For 1.39:
+- "Minimum Job Interval = nnn" sets minimum interval between Jobs
+  of the same level and does not permit multiple simultaneous
+  running of that Job (i.e. lets any previous invocation finish
+  before doing Interval testing).
 - Look at simplifying File exclusions.
 - Fix store_yesno to be store_bitmask.
 - New directive "Delete purged Volumes"
index 2099158693c4afa6dcce4b040a2b0aa34dbd6830..72014d6f539e9a163e3a96a8c0fdbab98842023a 100644 (file)
@@ -4,6 +4,10 @@
 General:
 
 Changes to 1.37.39:
+18Sep05
+- Apply Landon's patch for the TLS ANS1 API change.
+- Remove old code.
+- Make single exit path in first_open_device().
 17Sep05
 - Make new_volume walk through all Vols looking for dev 
   to release.
index 024b8c3034c4cc7ab30f34eb59f979eb2e06740e..c660505f3c6f8ffec89176e37a475f94c0effb54 100644 (file)
  * under an alternate open source license please contact
  * Landon Fuller <landonf@threerings.net>.
  */
-/*  
-   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 library is distributed in the hope that it will be useful,
+/*
+   Copyright (C) 2005 Kern Sibbald
+
+   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 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.
 
+ */
 
 #include "bacula.h"
 #include <assert.h>
@@ -331,32 +328,36 @@ bool tls_postconnect_verify_host(TLS_CONNECTION *tls, const char *host)
             X509V3_EXT_METHOD *method;
             STACK_OF(CONF_VALUE) *val;
             CONF_VALUE *nval;
-            unsigned char *data;
             void *extstr = NULL;
+#if (OPENSSL_VERSION_NUMBER >= 0x0090800FL)
+            const unsigned char *ext_value_data;
+#else
+            unsigned char *ext_value_data;
+#endif
 
             /* Get x509 extension method structure */
             if (!(method = X509V3_EXT_get(ext))) {
                break;
             }
 
-            data = ext->value->data;
+            ext_value_data = ext->value->data;
 
 #if (OPENSSL_VERSION_NUMBER > 0x00907000L)
             if (method->it) {
                /* New style ASN1 */
 
                /* Decode ASN1 item in data */
-               extstr = ASN1_item_d2i(NULL, &data, ext->value->length,
+               extstr = ASN1_item_d2i(NULL, &ext_value_data, ext->value->length,
                                       ASN1_ITEM_ptr(method->it));
             } else {
                /* Old style ASN1 */
 
                /* Decode ASN1 item in data */
-               extstr = method->d2i(NULL, &data, ext->value->length);
+               extstr = method->d2i(NULL, &ext_value_data, ext->value->length);
             }
 
 #else
-            extstr = method->d2i(NULL, &data, ext->value->length);
+            extstr = method->d2i(NULL, &ext_value_data, ext->value->length);
 #endif
 
             /* Iterate through to find the dNSName field(s) */
index 4b88e35146f630c346a4bfe0da00ad09764ba1e5..8c2d9e80cf8785f980de72a5661b7e6e71630dfd 100644 (file)
@@ -195,16 +195,6 @@ DCR *acquire_device_for_read(DCR *dcr)
             goto default_path;
          }
          
-#ifdef xxx_needed
-         /* If we have a dvd that requires mount, 
-          * we need to try to open the label, so the info can be reported
-          * if a wrong volume has been mounted.   
-          */
-         if (dev->is_dvd() && (dcr->VolCatInfo.VolCatParts > 0)) {
-            break;
-         }  
-#endif
-         
          Jmsg3(jcr, M_FATAL, 0, _("Open device %s Volume \"%s\" failed: ERR=%s\n"),
              dev->print_name(), dcr->VolumeName, strerror_dev(dev));
          goto get_out;
index 6a2f584ccc8ed262f67c42306ed6125c570ce481..0a3c945604060b8b2bf05acda9be95d74ca4a5e9 100644 (file)
@@ -246,6 +246,7 @@ void set_new_file_parameters(DCR *dcr)
 bool first_open_device(DCR *dcr)
 {
    DEVICE *dev = dcr->dev;
+   bool ok = true;
 
    Dmsg0(120, "start open_output_device()\n");
    if (!dev) {
@@ -257,8 +258,7 @@ bool first_open_device(DCR *dcr)
    /* Defer opening files */
    if (!dev->is_tape()) {
       Dmsg0(129, "Device is file, deferring open.\n");
-      unlock_device(dev);
-      return true;
+      goto bail_out;
    }
 
     int mode;
@@ -271,14 +271,15 @@ bool first_open_device(DCR *dcr)
    dev->open_nowait = true;
    if (dev->open(dcr, mode) < 0) {
       Emsg1(M_FATAL, 0, _("dev open failed: %s\n"), dev->errmsg);
-      dev->open_nowait = false;
-      unlock_device(dev);
-      return false;
+      ok = false;
+      goto bail_out;
    }
    Dmsg1(129, "open dev %s OK\n", dev->print_name());
+
+bail_out:
    dev->open_nowait = false;
    unlock_device(dev);
-   return true;
+   return ok;
 }
 
 /*
index d74c8b23f543f1207dc8229ba75c58d0e8c721c4..00b0fa468d8167e1ff22173d7131ad76bd3869b4 100644 (file)
@@ -4,8 +4,8 @@
 
 #undef  VERSION
 #define VERSION "1.37.39"
-#define BDATE   "17 September 2005"
-#define LSMDATE "17Sep05"
+#define BDATE   "18 September 2005"
+#define LSMDATE "18Sep05"
 
 /* Debug flags */
 #undef  DEBUG