From e7e8f1959624dba3d97c289056a648a5290acbca Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 30 Jun 2006 09:55:57 +0000 Subject: [PATCH] - I removed a size_t from the jcr.h definition. - Update the tape regression scripts (still to be tested). - Add gcc and gcc-c++ requires to srm as suggested by a user. - Require done or quit to exit from in memory tree restore. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3097 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/ChangeLog | 14 ++++++++++++++ bacula/ReleaseNotes | 20 +++++++++++++++++++- bacula/kernstodo | 19 ++++++++++++++++--- bacula/kes-1.38 | 14 ++++++++++++++ bacula/kes-1.39 | 6 ++++++ bacula/platforms/redhat/bacula.spec.in | 11 ++++++----- bacula/src/cats/cats.h | 4 ++-- bacula/src/cats/sqlite.c | 4 ++-- bacula/src/dird/ua_tree.c | 5 +++-- bacula/src/filed/backup.c | 8 ++++---- bacula/src/filed/job.c | 6 +++--- bacula/src/filed/restore.c | 4 ++-- bacula/src/jcr.h | 2 +- bacula/src/version.h | 4 ++-- 14 files changed, 94 insertions(+), 27 deletions(-) diff --git a/bacula/ChangeLog b/bacula/ChangeLog index 98177f3ac0..aabffb0f0c 100644 --- a/bacula/ChangeLog +++ b/bacula/ChangeLog @@ -1,4 +1,18 @@ +Release 1.38.11 (28Jun06) released 28JunO6 +28Jun06 +- Add test for IRIX64 as OS +- Fix scheduler hang during clock shift (due to missing unlock()) +- Minor tweaks to bregex.c +- Fix to block.c to correctly check for DVD number of parts. +- Fix to dev.c to permit DVD seeking in spool file. Corrects + label rewriting problems. +- Clarify license for techlogs (GPL). I consider them "part" of + the source code of Bacula. +- Use FDL license for developer's manual, French translation, German + translation, bimagemgr manuals (same as the main manual), and + the web site. + Release 1.38.10 (08Jun06) released 12JunO6 08Jun06 - Modify setting ACLs to suppress error message if the file is a diff --git a/bacula/ReleaseNotes b/bacula/ReleaseNotes index 68ab6875ce..e839a661b3 100644 --- a/bacula/ReleaseNotes +++ b/bacula/ReleaseNotes @@ -1,5 +1,5 @@ - Release Notes for Bacula 1.38.10 + Release Notes for Bacula 1.38.11 Bacula code: Total files = 423 Total lines = 139,479 (*.h *.c *.in) @@ -12,6 +12,24 @@ Warning for version 1.38.8 and greater: enclosed in double quotes, in which case, the backslashes must be doubled. +Major Changes for 1.38.11 +- Add test for IRIX64 as OS +- Fix scheduler hang during clock shift (due to missing unlock()) +- Minor tweaks to bregex.c +- Fix to block.c to correctly check for DVD number of parts. +- Fix to dev.c to permit DVD seeking in spool file. Corrects + label rewriting problems. +- Clarify license for techlogs (GPL). I consider them "part" of + the source code of Bacula. +- Use FDL license for developer's manual, French translation, German + translation, bimagemgr manuals (same as the main manual), and + the web site. + +New features for 1.38.11: +- None + +==================================================================== + Major Changes for 1.38.10: - This is a primarily a bug fix release, with the following bugs being resolved #570, 609, 611, 613, 614, 617 as well as other bugs not diff --git a/bacula/kernstodo b/bacula/kernstodo index af6ae94c72..822f8e373b 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -23,13 +23,12 @@ Document: Priority: For 1.39: -- Make authentication failures single threaded. +- Correct the Include syntax in the m4.xxx files in examples/conf +- Get Perl replacement for bregex.c - Make base64.c (bin_to_base64) take a buffer length argument to avoid overruns. -- Fix catreq.c digestbuf at line 411 in src/dird/catreq.c and verify that other buffers cannot overrun. - Implement VolumeState as discussed with Arno. -- Install man pages - Document techniques for restoring large numbers of files. - Document setting my.cnf to big file usage. - Add example of proper index output to doc. @@ -52,6 +51,15 @@ For 1.39: target slot. The catalog should be updated accordingly. .move transfer device=xxx fromslot=yyy toslot=zzz +==== SQL +# get null file +select FilenameId from Filename where Name=''; +# Get list of all directories referenced in a Backup. +select Path.Path from Path,File where File.JobId=nnn and + File.FilenameId=(FilenameId-from-above) and File.PathId=Path.PathId + order by Path.Path ASC; + + === Migration from David === What I'd like to see: @@ -1561,3 +1569,8 @@ Block Position: 0 - Does ClientRunAfterJob fail the job on a bad return code? - Make hardlink code at line 240 of find_one.c use binary search. - Add ACL error messages in src/filed/acl.c. +- Make authentication failures single threaded. +- Make Dir and SD authentication errors single threaded. +- Install man pages +- Fix catreq.c digestbuf at line 411 in src/dird/catreq.c + diff --git a/bacula/kes-1.38 b/bacula/kes-1.38 index 12632bacd6..230b083c7d 100644 --- a/bacula/kes-1.38 +++ b/bacula/kes-1.38 @@ -2,6 +2,20 @@ Kern Sibbald General: +Release 1.38.11 (28Jun06) released 28JunO6 +28Jun06 +- Add test for IRIX64 as OS +- Fix scheduler hang during clock shift (due to missing unlock()) +- Minor tweaks to bregex.c +- Fix to block.c to correctly check for DVD number of parts. +- Fix to dev.c to permit DVD seeking in spool file. Corrects + label rewriting problems. +- Clarify license for techlogs (GPL). I consider them "part" of + the source code of Bacula. +- Use FDL license for developer's manual, French translation, German + translation, bimagemgr manuals (same as the main manual), and + the web site. + Release 1.38.10 (08Jun06) released 12JunO6 08Jun06 - Modify setting ACLs to suppress error message if the file is a diff --git a/bacula/kes-1.39 b/bacula/kes-1.39 index c011275301..4104481556 100644 --- a/bacula/kes-1.39 +++ b/bacula/kes-1.39 @@ -2,6 +2,12 @@ Kern Sibbald General: +30Jun06 +- Robert committed his low impact changes. +- I removed a size_t from the jcr.h definition. +- Update the tape regression scripts (still to be tested). +- Add gcc and gcc-c++ requires to srm as suggested by a user. +- Require done or quit to exit from in memory tree restore. 26Jun06 - Write install/uninstall of new manpages. There are now a pile of man pages. Some of which need a lot of work. diff --git a/bacula/platforms/redhat/bacula.spec.in b/bacula/platforms/redhat/bacula.spec.in index 2352b0148e..a7514fee11 100644 --- a/bacula/platforms/redhat/bacula.spec.in +++ b/bacula/platforms/redhat/bacula.spec.in @@ -23,7 +23,7 @@ %define useradd /usr/sbin/useradd %define groupadd /usr/sbin/groupadd %define usermod /usr/sbin/usermod -%define _rescuever 1.8.4 +%define _rescuever 1.8.5 # platform defines - set one below or define the build_xxx on the command line # RedHat builds @@ -183,6 +183,7 @@ Packager: D. Scott Barninger %define _docsrc ../%{name}-docs-%{version} %define _rescuesrc ../%{name}-rescue-%{_rescuever} +BuildRequires: gcc, gcc-c++ BuildRequires: atk-devel, ncurses-devel, pango-devel, perl BuildRequires: libstdc++-devel, libxml2-devel, zlib-devel BuildRequires: openssl-devel @@ -768,9 +769,9 @@ export LDFLAGS=-L/usr/lib64/mysql --with-scriptdir=/etc/bacula \ --enable-smartalloc \ --enable-client-only \ - %if %{mdk} - --disable-nls \ - %endif + %if %{mdk} + --disable-nls \ + %endif --enable-static-fd make @@ -797,7 +798,7 @@ make --with-postgresql \ %endif %if %{wxconsole} - --enable-wx-console \ + --enable-wx-console \ %endif --with-working-dir=%{working_dir} \ --with-pid-dir=/var/run \ diff --git a/bacula/src/cats/cats.h b/bacula/src/cats/cats.h index c4766fc55c..a196701e30 100644 --- a/bacula/src/cats/cats.h +++ b/bacula/src/cats/cats.h @@ -162,7 +162,7 @@ struct B_DB { /* In cats/sqlite.c */ void my_sqlite_free_table(B_DB *mdb); SQL_ROW my_sqlite_fetch_row(B_DB *mdb); -int my_sqlite_query(B_DB *mdb, char *cmd); +int my_sqlite_query(B_DB *mdb, const char *cmd); void my_sqlite_field_seek(B_DB *mdb, int field); SQL_FIELD *my_sqlite_fetch_field(B_DB *mdb); @@ -281,7 +281,7 @@ struct B_DB { /* In cats/sqlite.c */ void my_sqlite_free_table(B_DB *mdb); SQL_ROW my_sqlite_fetch_row(B_DB *mdb); -int my_sqlite_query(B_DB *mdb, char *cmd); +int my_sqlite_query(B_DB *mdb, const char *cmd); void my_sqlite_field_seek(B_DB *mdb, int field); SQL_FIELD *my_sqlite_fetch_field(B_DB *mdb); diff --git a/bacula/src/cats/sqlite.c b/bacula/src/cats/sqlite.c index f2b9f76963..edc465d37a 100644 --- a/bacula/src/cats/sqlite.c +++ b/bacula/src/cats/sqlite.c @@ -328,7 +328,7 @@ int db_sql_query(B_DB *mdb, const char *query, DB_RESULT_HANDLER *result_handler /* * Submit a sqlite query and retrieve all the data */ -int my_sqlite_query(B_DB *mdb, char *cmd) +int my_sqlite_query(B_DB *mdb, const char *cmd) { int stat; @@ -336,7 +336,7 @@ int my_sqlite_query(B_DB *mdb, char *cmd) actuallyfree(mdb->sqlite_errmsg); mdb->sqlite_errmsg = NULL; } - stat = sqlite_get_table(mdb->db, cmd, &mdb->result, &mdb->nrow, &mdb->ncolumn, + stat = sqlite_get_table(mdb->db, (char *)cmd, &mdb->result, &mdb->nrow, &mdb->ncolumn, &mdb->sqlite_errmsg); mdb->row = 0; /* row fetched */ return stat; diff --git a/bacula/src/dird/ua_tree.c b/bacula/src/dird/ua_tree.c index ca35e06009..606ad9bbba 100644 --- a/bacula/src/dird/ua_tree.c +++ b/bacula/src/dird/ua_tree.c @@ -9,7 +9,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 @@ -109,7 +109,8 @@ bool user_select_files_from_tree(TREE_CTX *tree) } parse_ua_args(ua); if (ua->argc == 0) { - break; + bsendmsg(tree->ua, _("Illegal command. Enter \"done\" to exit.\n")); + continue; } len = strlen(ua->argk[0]); diff --git a/bacula/src/filed/backup.c b/bacula/src/filed/backup.c index 4aae85329e..16659dc66a 100644 --- a/bacula/src/filed/backup.c +++ b/bacula/src/filed/backup.c @@ -411,7 +411,7 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr, bool top_level) bnet_fsend(sd, "%ld %d 0", jcr->JobFiles, STREAM_ENCRYPTED_SESSION_DATA); /* Grow the bsock buffer to fit our message if necessary */ - if ((size_t) sizeof_pool_memory(sd->msg) < jcr->pki_session_encoded_size) { + if (sizeof_pool_memory(sd->msg) < jcr->pki_session_encoded_size) { sd->msg = realloc_pool_memory(sd->msg, jcr->pki_session_encoded_size); } @@ -527,7 +527,7 @@ static int save_file(FF_PKT *ff_pkt, void *vjcr, bool top_level) Dmsg1(300, "bfiled>stored:header %s\n", sd->msg); /* Grow the bsock buffer to fit our message if necessary */ - if ((size_t) sizeof_pool_memory(sd->msg) < size) { + if (sizeof_pool_memory(sd->msg) < size) { sd->msg = realloc_pool_memory(sd->msg, size); } @@ -579,7 +579,7 @@ int send_data(JCR *jcr, int stream, FF_PKT *ff_pkt, DIGEST *digest, DIGEST *sign BSOCK *sd = jcr->store_bsock; uint64_t fileAddr = 0; /* file address */ char *rbuf, *wbuf; - int rsize = jcr->buf_size; /* read buffer size */ + int32_t rsize = jcr->buf_size; /* read buffer size */ POOLMEM *msgsave; CIPHER_CONTEXT *cipher_ctx = NULL; /* Quell bogus uninitialized warnings */ const uint8_t *cipher_input; @@ -648,7 +648,7 @@ int send_data(JCR *jcr, int stream, FF_PKT *ff_pkt, DIGEST *digest, DIGEST *sign * could be returned for the given read buffer size. * (Using the larger of either rsize or max_compress_len) */ - jcr->crypto_buf = check_pool_memory_size(jcr->crypto_buf, (MAX((size_t) rsize, max_compress_len) + cipher_block_size - 1) / cipher_block_size * cipher_block_size); + jcr->crypto_buf = check_pool_memory_size(jcr->crypto_buf, (MAX(rsize, (int32_t)max_compress_len) + cipher_block_size - 1) / cipher_block_size * cipher_block_size); wbuf = jcr->crypto_buf; /* Encrypted, possibly compressed output here. */ } diff --git a/bacula/src/filed/job.c b/bacula/src/filed/job.c index 96365bff36..5b88dd6772 100644 --- a/bacula/src/filed/job.c +++ b/bacula/src/filed/job.c @@ -1291,8 +1291,8 @@ static int backup_cmd(JCR *jcr) jcr->Errors++; } else { /* tell user if snapshot creation of a specific drive failed */ - size_t i; - for (i=0; iErrors++; @@ -1379,7 +1379,7 @@ cleanup: if (bDoVSS) { if (g_pVSSClient->CloseBackup()) { /* inform user about writer states */ - for (size_t i=0; iGetWriterCount(); i++) { + for (int i=0; i<(int)g_pVSSClient->GetWriterCount(); i++) { int msg_type = M_INFO; if (g_pVSSClient->GetWriterState(i) < 1) { msg_type = M_WARNING; diff --git a/bacula/src/filed/restore.c b/bacula/src/filed/restore.c index df677adf7b..d0ec052d3d 100644 --- a/bacula/src/filed/restore.c +++ b/bacula/src/filed/restore.c @@ -351,7 +351,7 @@ void do_restore(JCR *jcr) Dmsg1(30, "Stream=Encrypted Session Data, size: %d\n", sd->msglen); /* Decode and save session keys. */ - cryptoerr = crypto_session_decode((uint8_t *)sd->msg, (size_t)sd->msglen, jcr->pki_recipients, &cs); + cryptoerr = crypto_session_decode((uint8_t *)sd->msg, (uint32_t)sd->msglen, jcr->pki_recipients, &cs); switch(cryptoerr) { case CRYPTO_ERROR_NONE: /* Success */ @@ -500,7 +500,7 @@ void do_restore(JCR *jcr) case STREAM_SIGNED_DIGEST: /* Save signature. */ - if ((sig = crypto_sign_decode((uint8_t *)sd->msg, (size_t)sd->msglen)) == NULL) { + if ((sig = crypto_sign_decode((uint8_t *)sd->msg, (uint32_t)sd->msglen)) == NULL) { Jmsg1(jcr, M_ERROR, 0, _("Failed to decode message signature for %s\n"), jcr->last_fname); } break; diff --git a/bacula/src/jcr.h b/bacula/src/jcr.h index 625f611154..effa5580a0 100644 --- a/bacula/src/jcr.h +++ b/bacula/src/jcr.h @@ -270,7 +270,7 @@ public: alist *pki_recipients; /* Trusted Recipients */ CRYPTO_SESSION *pki_session; /* PKE Public Keys + Symmetric Session Keys */ uint8_t *pki_session_encoded; /* Cached DER-encoded copy of pki_session */ - size_t pki_session_encoded_size; /* Size of DER-encoded pki_session */ + int32_t pki_session_encoded_size; /* Size of DER-encoded pki_session */ POOLMEM *crypto_buf; /* Encryption/Decryption buffer */ DIRRES* director; /* Director resource */ #endif /* FILE_DAEMON */ diff --git a/bacula/src/version.h b/bacula/src/version.h index 2a5271b5fc..55314a986a 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -4,8 +4,8 @@ #undef VERSION #define VERSION "1.39.14" -#define BDATE "26 June 2006" -#define LSMDATE "26Jun06" +#define BDATE "30 June 2006" +#define LSMDATE "30Jun06" /* Debug flags */ #undef DEBUG -- 2.39.5