From b97cb10b837d390fd26a0b6a47c3b6ec4f8c9970 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 13 Jun 2003 08:56:38 +0000 Subject: [PATCH] VERIFY + automatic labeling bug fix + cygwin cleanups git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@579 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/ChangeLog | 36 +++++++++++++++++++++++++++++++++ bacula/VERIFYING | 39 ++++++++++++++++++++++++++++++++++++ bacula/kernstodo | 14 +++++++------ bacula/src/dird/newvol.c | 1 + bacula/src/dird/ua_label.c | 4 ++++ bacula/src/filed/status.c | 2 +- bacula/src/findlib/attribs.c | 2 +- bacula/src/lib/message.c | 6 +++--- 8 files changed, 93 insertions(+), 11 deletions(-) create mode 100644 bacula/VERIFYING diff --git a/bacula/ChangeLog b/bacula/ChangeLog index 96b7fe95c2..ee4e68f5de 100644 --- a/bacula/ChangeLog +++ b/bacula/ChangeLog @@ -1,3 +1,39 @@ +2003-06-10 Version 1.31 Beta 10Jun03 +- Eliminated all plain email addresses and replaced them with " at " in + place of @ to reduce havesting by spammers. Doc + Web Site. +- Started working on making POOLMEM a struct rather than a char. Lots of + work to do. +- Fixed bscan to handle -V option. +- Fixed bscan to handle two File volumes. +- Corrected a misplaced comma it get_fileset() in cats pointed out by bscan. +- Added two Volume bscan test to regression scripts -- write two volumes, + purge and delete everything, bscan the tapes, and do a restore. It works! +- Reorganized the backup/restore code to move the attribute information into + an ATTR packet, which is passed in place of tons of arguments. Moved some + code into lib/attr.c and lib/attr.h. Then eliminated all the duplicate + attribute code. +- Moved FT_ types into baconfig.h. +- Defined FT_ types to use only 16 bits. The upper half of the word is + reserved for adding optional fields in the attributes packet. +- Moved jcr->where into common part of jcr and have it deleted in lib/jcr.c +- Put all attribute reading code on switch() with cases instead of a big + if (restore.c, bls.c, bextract.c, bscan.c, ...) +- set_attributes() now takes ATTR packet, and thus has much fewer args. +- moved print_ls_output() into lib/attr.c +- implemented is_stream_supported(). +- create_file() now takes ATTR packet so has many fewer args. +- add mtime_only code. +- Rewrote bnet.c read and write routines to quit if bsock->terminated is + set. This will allow setting non-blocking writes and then receiving + a termination message and terminating the Job immediately rather than + waiting 2 hours for the line to timeout. +- Put catalog db name in some error messages. +- Code for restore is now much cleaner, with much of it in lib/attr.c, + and it is now common for all readers. +- Add first cut of proper support for Win32 Backup code. +- Fix bug in restore Win95/98/Me. +- Pass mtime_only flag to FD. Needs config record. + 2003-06-04 Version 1.31 Beta 04Jun03 - Fix block.c to check errno only in case of return status -1 as suggested by Justin Gibbs (FreeBSD). diff --git a/bacula/VERIFYING b/bacula/VERIFYING new file mode 100644 index 0000000000..8f549c4d30 --- /dev/null +++ b/bacula/VERIFYING @@ -0,0 +1,39 @@ + +All Bacula packages released on Source Forge after 8 June 2003 +will be signed with the Bacula Distribution Verification Key. By +obtaining a copy of the Bacula Distribution Verification Public +key from either the home site (www.bacula.org) or from the Source +Forge project page, (www.sourceforge.net/projects/bacula). you +can verify that the code you have is complete, unaltered, and +packaged by myself (Kern Sibbald) or D. Scott Barninger. + +Putting the Bacula Key in your Keyring: + +Once you download the Bacula public key, you must insert it in +your keyring. The procedure will differ depending on whether you +are using PGP or GPG. For GPG, assuming you have put the key +in bacula.k, the procedure is: + + gpg --import bacula.key + +Verifying an RPM: + +The procedure for verification differs slightly if you are using +rpms or tar.gz files. For rpms, the signature becomes part of the +rpm package, and once the Bacula public key is in your keyring +you check the package with: + + rpm --checksig bacula-1.xx.rpm + +Verifying tar files: + +Tar files are distributed as they always have been in the past, +unchanged. However, for each xxxx.tar.gz file that is released there +will be a second file released with the same name but with .sig +appended, for example xxxx.tar.gz.sig. To verify the Bacula distribution, +you download both the files and put them in the same directory, then +for GPG, you use the following command to do the verification: + + gpg --verify xxxx.tar.gz.sig + + diff --git a/bacula/kernstodo b/bacula/kernstodo index b0b41f8af4..dd01fda9e3 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -34,18 +34,14 @@ Testing to do: (painful) - Figure out how to use ssh or stunnel to protect Bacula communications. For 1.31 release: +- Use runbeforejob to unload, then reload a volume previously used, + then the next job run gets an error reading the drive. - Implement non-blocking writes and bsock->terminate in heartbeat thread, or set it in status.c cancel. - Add restore to specific date. - lstat() is not going to work on Win32 for testing date. - Implement a Recycle command - Something is not right in last block of fill command. -- If during a restore, a hard linked file already exists (on option), delete - the file and re-link it. This is to avoid the possibility that the - user had re-linked the file between the backup and the restore. - Do lstat() to see if it is already properly linked. - Same for symlinked file. - Make sure ifnewer, ifolder, never, ... apply correctly. - Implement List Volume Job=xxx or List scheduled volumes or Status Director - Instrument use_count on DEVICE packets and ensure that the device is @@ -975,4 +971,10 @@ Done: (see kernsdone for more) > - Should Bacula make an Append tape as Purged when purging? - Use switch() in backup.c and restore.c in FD instead of giant if statement. +- If during a restore, a hard linked file already exists (on option), delete + the file and re-link it. This is to avoid the possibility that the + user had re-linked the file between the backup and the restore. + Do lstat() to see if it is already properly linked. + Same for symlinked file. + Make sure ifnewer, ifolder, never, ... apply correctly. diff --git a/bacula/src/dird/newvol.c b/bacula/src/dird/newvol.c index 735253c17f..f161821dec 100644 --- a/bacula/src/dird/newvol.c +++ b/bacula/src/dird/newvol.c @@ -54,6 +54,7 @@ int newVolume(JCR *jcr, MEDIA_DBR *mr) if (db_get_pool_record(jcr, jcr->db, &pr) && pr.LabelFormat[0] && pr.LabelFormat[0] != '*') { if (pr.MaxVols == 0 || pr.NumVols < pr.MaxVols) { + memset(&mr, 0, sizeof(mr)); set_pool_dbr_defaults_in_media_dbr(mr, &pr); mr->LabelDate = time(NULL); bstrncpy(mr->MediaType, jcr->store->media_type, sizeof(mr->MediaType)); diff --git a/bacula/src/dird/ua_label.c b/bacula/src/dird/ua_label.c index c1982209be..be0746b323 100644 --- a/bacula/src/dird/ua_label.c +++ b/bacula/src/dird/ua_label.c @@ -336,6 +336,10 @@ static void label_from_barcodes(UAContext *ua) vl->Slot, mr.VolumeName); continue; } + /* + * Deal with creating cleaning tape here. Normal tapes created in + * send_label_request() below + */ if (is_cleaning_tape(ua, &mr, &pr)) { set_pool_dbr_defaults_in_media_dbr(&mr, &pr); if (db_create_media_record(ua->jcr, ua->db, &mr)) { diff --git a/bacula/src/filed/status.c b/bacula/src/filed/status.c index 24ac189170..3b6902c723 100755 --- a/bacula/src/filed/status.c +++ b/bacula/src/filed/status.c @@ -58,7 +58,7 @@ static void do_status(void sendit(char *msg, int len, void *sarg), void *arg) sendit(msg, len, arg); #ifdef HAVE_CYGWIN if (!privs) { - privs = get_backup_privileges(NULL, 1); + privs = enable_backup_privileges(NULL, 1); } len = Mmsg(&msg, _("Priv 0x%x APIs=%sOPT,%sATP,%sLPV,%sGFAE,%sBR,%sBW,%sSPSP\n"), privs, diff --git a/bacula/src/findlib/attribs.c b/bacula/src/findlib/attribs.c index 9ee69f574a..591900b963 100755 --- a/bacula/src/findlib/attribs.c +++ b/bacula/src/findlib/attribs.c @@ -195,7 +195,7 @@ int set_attributes(JCR *jcr, ATTR *attr, BFILE *ofd) int stat = 1; #ifdef HAVE_CYGWIN - if (stream == STREAM_UNIX_ATTRIBUTES_EX && + if (attr->stream == STREAM_UNIX_ATTRIBUTES_EX && set_win32_attributes(jcr, attr, ofd)) { return 1; } diff --git a/bacula/src/lib/message.c b/bacula/src/lib/message.c index 709c7b230a..436743fa00 100755 --- a/bacula/src/lib/message.c +++ b/bacula/src/lib/message.c @@ -53,13 +53,13 @@ FILE *trace_fd = NULL; #ifdef HAVE_MYSQL char catalog_db[] = "MySQL"; -#endif +#else #ifdef HAVE_SQLITE char catalog_db[] = "SQLite"; -#endif -#ifdef HAVE_BACULA_DB +#else char catalog_db[] = "Internal"; #endif +#endif /* Forward referenced functions */ -- 2.39.5