From: Kern Sibbald Date: Fri, 26 Jan 2007 11:16:35 +0000 (+0000) Subject: Fix open of SQLite3 db where user does not have write permission X-Git-Tag: Release-7.0.0~7008 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9fb144fc5a5644afefc85c5cb592d2c97dfa9e1f;p=bacula%2Fbacula Fix open of SQLite3 db where user does not have write permission so that DIR does not crash. Fixes bug #761. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4045 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/cats/sqlite.c b/bacula/src/cats/sqlite.c index 9fd557174f..d5aac93a5a 100644 --- a/bacula/src/cats/sqlite.c +++ b/bacula/src/cats/sqlite.c @@ -161,6 +161,8 @@ db_open_database(JCR *jcr, B_DB *mdb) int stat = sqlite3_open(db_name, &mdb->db); if (stat != SQLITE_OK) { mdb->sqlite_errmsg = (char *)sqlite3_errmsg(mdb->db); + sqlite3_close(mdb->db); + mdb->db = NULL; } else { mdb->sqlite_errmsg = NULL; } diff --git a/bacula/src/version.h b/bacula/src/version.h index ee96c8d5f6..60553d41a3 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -4,8 +4,8 @@ #undef VERSION #define VERSION "2.1.1" -#define BDATE "18 January 2007" -#define LSMDATE "18Jan07" +#define BDATE "26 January 2007" +#define LSMDATE "26Jan07" #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.1 b/bacula/technotes-2.1 index effa64a265..62be12ed38 100644 --- a/bacula/technotes-2.1 +++ b/bacula/technotes-2.1 @@ -1,6 +1,9 @@ Technical notes on version 2.1 General: +26Jan07 +kes Fix open of SQLite3 db where user does not have write permission + so that DIR does not crash. Fixes bug #761. 25Jan07 kes Add back missing @ in Win32 Makefile. kes Change 'Device not configured to autolabel' from INFO