]> git.sur5r.net Git - bacula/bacula/commitdiff
Pull in new spec files
authorKern Sibbald <kern@sibbald.com>
Fri, 12 Jan 2007 10:23:14 +0000 (10:23 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 12 Jan 2007 10:23:14 +0000 (10:23 +0000)
Update patches

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.0@3982 91ce42f0-d328-0410-95d8-f526ca767f89

23 files changed:
bacula/patches/1.38.1-to-1.38.2.patch [deleted file]
bacula/patches/1.38.10-dvd-eof.patch [deleted file]
bacula/patches/1.38.10-scheduler.patch [deleted file]
bacula/patches/1.38.6-script.patch [deleted file]
bacula/patches/1.38.7-mysql.patch [deleted file]
bacula/patches/1.38.x/1.38.1-to-1.38.2.patch [new file with mode: 0644]
bacula/patches/1.38.x/1.38.10-dvd-eof.patch [new file with mode: 0644]
bacula/patches/1.38.x/1.38.10-scheduler.patch [new file with mode: 0644]
bacula/patches/1.38.x/1.38.6-script.patch [new file with mode: 0644]
bacula/patches/1.38.x/1.38.7-mysql.patch [new file with mode: 0644]
bacula/patches/testing/batch-insert.patch
bacula/patches/testing/media-stats.patch
bacula/patches/testing/project-include-jobid-in-spool-name.patch
bacula/patches/testing/scratch.patch
bacula/patches/testing/scratch.readme
bacula/platforms/mandrake/bacula.spec.in
bacula/platforms/redhat/bacula.spec.in
bacula/platforms/suse/bacula.spec.in
bacula/src/cats/grant_postgresql_privileges.in
bacula/src/cats/update_mysql_tables.in
bacula/src/cats/update_postgresql_tables.in
bacula/src/cats/update_sqlite3_tables.in
bacula/src/cats/update_sqlite_tables.in

diff --git a/bacula/patches/1.38.1-to-1.38.2.patch b/bacula/patches/1.38.1-to-1.38.2.patch
deleted file mode 100644 (file)
index a75062c..0000000
+++ /dev/null
@@ -1,8098 +0,0 @@
-
- This patch fixes the following bugs:
-
-- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
-  says that this patch does not fix his problem)
-- Fix cancel failure bug. Bug #481
-- Fix failure when Pool name has spaces. Bug #487
-- Fix SD crash in autochanger code. Mutex failure. Bug #488
-- Fix a couple of free()s in src/filed/acl.c
-- Fix memory overrun in bfile.c in building OS X resource
-  fork filename. Bug #489
-- Add Pool name to SD status output.
-- Add Python install dir for Solaris to configure. Bug #492
-
-This patch is applied to Bacula source version 1.38.1 and will
-produce Bacula source version 1.38.2.  Apply it with:
-
-   cd <bacula-1.38.1-source>
-   ./configure (your options) if not already done
-   patch -p0 <1.38.1-to-1.38.2.patch
-   make
-   make install
-
-Index: ChangeLog
-===================================================================
-RCS file: /cvsroot/bacula/bacula/ChangeLog,v
-retrieving revision 1.154.2.7
-retrieving revision 1.154.2.8
-diff -u -r1.154.2.7 -r1.154.2.8
---- ChangeLog  15 Nov 2005 09:27:19 -0000      1.154.2.7
-+++ ChangeLog  22 Nov 2005 10:50:54 -0000      1.154.2.8
-@@ -1,4 +1,15 @@
-+Changes to 1.38.2:
-+- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-+- Fix bnet-server bug found on OpenBSD. Bug #486
-+- Fix cancel failure bug. Bug #481
-+- Fix failure when Pool name has spaces. Bug #487   
-+- Fix SD crash in autochanger code. Mutex failure. Bug #488
-+- Fix a couple of free()s in src/filed/acl.c
-+- Fix memory overrun in bfile.c in building OS X resource
-+  fork filename. Bug #489 
-+- Add Pool name to SD status output.
-+- Add Python install dir for Solaris to configure. Bug #492
- Changes to 1.38.1:
- - Apply SunOS patch for ACLs submitted by David Duchscher.                  
-Index: ReleaseNotes
-===================================================================
-RCS file: /cvsroot/bacula/bacula/ReleaseNotes,v
-retrieving revision 1.147.2.9
-retrieving revision 1.147.2.10
-diff -u -r1.147.2.9 -r1.147.2.10
---- ReleaseNotes       15 Nov 2005 09:27:19 -0000      1.147.2.9
-+++ ReleaseNotes       22 Nov 2005 10:50:54 -0000      1.147.2.10
-@@ -1,10 +1,22 @@
--          Release Notes for Bacula 1.38.1
-+          Release Notes for Bacula 1.38.2
-   Bacula code: Total files = 420 Total lines = 138,440 (*.h *.c *.in)
-       20,440 additional lines of code since version 1.36.3
--Changes since 1.38.0:
-+Changes to 1.38.2:
-+- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-+- Fix bnet-server bug found on OpenBSD. Bug #486
-+- Fix cancel failure bug. Bug #481
-+- Fix failure when Pool name has spaces. Bug #487   
-+- Fix SD crash in autochanger code. Mutex failure. Bug #488
-+- Fix a couple of free()s in src/filed/acl.c
-+- Fix memory overrun in bfile.c in building OS X resource
-+  fork filename. Bug #489 
-+- Add Pool name to SD status output.
-+- Add Python install dir for Solaris to configure. Bug #492
-+
-+Changes to 1.38.1:
- - Corrected ACL for Solaris (David Duchscher and Attila Fulop).
- - Add bacula_mail_summary.sh to examples directory. It makes
-   a single email summary of any number of jobs. Submitted
-Index: configure
-===================================================================
-RCS file: /cvsroot/bacula/bacula/configure,v
-retrieving revision 1.203.2.5
-retrieving revision 1.203.2.6
-diff -u -r1.203.2.5 -r1.203.2.6
---- configure  13 Nov 2005 10:51:17 -0000      1.203.2.5
-+++ configure  22 Nov 2005 10:50:54 -0000      1.203.2.6
-@@ -14948,7 +14948,7 @@
-   PYTHON_LIBS=
-   if test "$withval" != "no"; then
-      if test "$withval" = "yes"; then
--      for python_root in /usr /usr/local; do
-+      for python_root in /usr /usr/local /usr/sfw; do
-         if test -f $python_root/include/python2.2/Python.h; then
-            PYTHON_INCDIR=-I$python_root/include/python2.2
-            PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
-Index: kernstodo
-===================================================================
-RCS file: /cvsroot/bacula/bacula/kernstodo,v
-retrieving revision 1.570.2.6
-retrieving revision 1.570.2.7
-diff -u -r1.570.2.6 -r1.570.2.7
---- kernstodo  4 Nov 2005 09:16:49 -0000       1.570.2.6
-+++ kernstodo  22 Nov 2005 10:50:55 -0000      1.570.2.7
-@@ -1,5 +1,5 @@
-                     Kern's ToDo List
--                     03 November 2005
-+                     21 November 2005
- Major development:      
- Project                     Developer
-@@ -7,8 +7,6 @@
- Version 1.37                Kern (see below)
- ========================================================
--Final items for 1.37 before release:
--
- Document:
- - Does ClientRunAfterJob fail the job on a bad return code?
- - Document cleaning up the spool files:
-@@ -18,6 +16,8 @@
- - Does WildFile match against full name?  Doc.
- For 1.39:
-+- Make sure that all do_prompt() calls in Dir check for
-+  -1 (error) and -2 (cancel) returns.
- - Look at -D_FORTIFY_SOURCE=2
- - Add Win32 FileSet definition somewhere
- - Look at fixing restore status stats in SD.
-@@ -27,6 +27,12 @@
-   encountered, read many times (as it currently does), and if the
-   block cannot be read, skip to the next block, and try again.  If
-   that fails, skip to the next file and try again, ...
-+- Add level table:
-+  create table LevelType (LevelType binary(1), LevelTypeLong tinyblob);
-+  insert into LevelType (LevelType,LevelTypeLong) values
-+  ("F","Full"),
-+  ("D","Diff"),
-+  ("I","Inc");
- - Add ACL to restore only to original location.
- - Add a recursive mark command (rmark) to restore.
- - "Minimum Job Interval = nnn" sets minimum interval between Jobs
-@@ -1246,219 +1252,4 @@
- ====
--=== Done
--- Save mount point for directories not traversed with onefs=yes.
--- Add seconds to start and end times in the Job report output.
--- if 2 concurrent backups are attempted on the same tape
--  drive (autoloader) into different tape pools, one of them will exit
--  fatally instead of halting until the drive is idle
--- Update StartTime if job held in Job Queue.
--- Look at www.nu2.nu/pebuilder as a helper for full windows
--  bare metal restore. (done by Scott)
--- Fix orphanned buffers:
--   Orphaned buffer:      24 bytes allocated at line 808 of rufus-dir job.c
--   Orphaned buffer:      40 bytes allocated at line 45 of rufus-dir alist.c
--- Implement Preben's suggestion to add
--  File System Types = ext2, ext3 
--  to FileSets, thus simplifying backup of *all* local partitions.
--- Try to open a device on each Job if it was not opened
--  when the SD started.
--- Add dump of VolSessionId/Time and FileIndex with bls.
--- If Bacula does not find the right tape in the Autochanger,
--  then mark the tape in error and move on rather than asking
--  for operator intervention.
--- Cancel command should include JobId in list of Jobs.
--- Add performance testing hooks
--- Bootstrap from JobMedia records.
--- Implement WildFile and WildDir to solve problem of 
--  saving only *.doc files.
--- Fix
--   Please use the "label"  command to create a new Volume for:
--       Storage:      DDS-4-changer
--       Media type:   
--       Pool:         Default
--   label
--   The defined Storage resources are:
--- Copy Changer Device and Changer Command from Autochanger
--  to Device resource in SD if none given in Device resource.
--- 1. Automatic use of more than one drive in an autochanger (done)
--- 2. Automatic selection of the correct drive for each Job (i.e.
--     selects a drive with an appropriate Volume for the Job) (done)
--- 6. Allow multiple simultaneous Jobs referencing the same pool write
--    to several tapes (some new directive(s) are are probably needed for
--    this) (done)
--- Locking (done)
--- Key on Storage rather than Pool (done)
--- Allow multiple drives to use same Pool (change jobq.c DIR) (done).
--- Synchronize multiple drives so that not more
--  than one loads a tape and any time (done)
--- 4. Use Changer Device and Changer Command specified in the
--     Autochanger resource, if none is found in the Device resource.
--    You can continue to specify them in the Device resource if you want
--    or need them to be different for each device.
--- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") 
--    that can allow a Device be part of an Autochanger, and hence the changer
--    script protected, but if set to no, will prevent the Device from being 
--    automatically selected from the changer. This allows the device to
--    be directly accessed through its Device name, but not through the
--    AutoChanger name.
--#6   Select one from among Multiple Storage Devices for Job
--#5   Events that call a Python program 
--     (Implemented in Dir/SD)
--- Make sure the Device name is in the Query packet returned.
--- Don't start a second file job if one is already running.
--- Implement EOF/EOV labels for ANSI labels
--- Implement IBM labels.
--- When Python creates a new label, the tape is immediately
--  recycled and no label created. This happens when using   
--  autolabeling -- even when Python doesn't generate the name.
--- Scratch Pool where the volumes can be re-assigned to any Pool.
--- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) 
--  is busy reading. Job 6 canceled.
--- Remove separate thread for opening devices in SD.  On the other
--  hand, don't block waiting for open() for devices.
--- Fix code to either handle updating NumVol or to calculate it in
--  Dir next_vol.c
--- Ensure that you cannot exclude a directory or a file explicitly
--  Included with File.
--#4   Embedded Python Scripting 
--     (Implemented in Dir/SD/FD)
--- Add Python writable variable for changing the Priority,
--    Client, Storage, JobStatus (error), ...
--- SD Python
--  - Solicit Events
--- Add disk seeking on restore; turn off seek on tapes.
--  stored/match_bsr.c
--- Look at dird_conf.c:1000: warning: `int size' 
--  might be used uninitialized in this function
--- Indicate when a Job is purged/pruned during restore.
--- Implement some way to turn off automatic pruning in Jobs.
--- Implement a way an Admin Job can prune, possibly multiple
--  clients -- Python script?
--- Look at Preben's acl.c error handling code.
--- SD crashes after a tape restore then doing a backup. 
--- If drive is opened read/write, close it and re-open
--  read-only if doing a restore, and vice-versa.
--- Windows restore:
--  data-fd: RestoreFiles.2004-12-07_15.56.42 Error:
--  > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der
--  > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen
--  > Prozess verwendet wird.
--  Restore restores all files, but then fails at the end trying
--  to set the attributes of e:
--  from failed jobs.- Resolve the problem between Device name and Archive name,
--  and fix SD messages.
--- Tell the "restore" user when browsing is no longer possible.
--- Add a restore directory-x
--- Write non-optimized bsrs from the JobMedia and Media records,
--  even after Files are pruned.
--- Delete Stripe and Copy from VolParams to save space.
--- Fix option 2 of restore -- list where file is backed up -- require Client,
--  then list last 20 backups.
--- Finish implementation of passing all Storage and Device needs to
--  the SD.
--- Move test for max wait time exceeded in job.c up -- Peter's idea.
--##   Consider moving docs to their own project.
--##   Move rescue to its own project.
--- Add client version to the Client name line that prints in
--  the Job report.
--- Fix the Rescue CDROM.
--- By the way: on page http://www.bacula.org/?page=tapedrives , at the 
--  bottom, the link to "Tape Testing Chapter" is broken. It goes to 
--  /html-manual/... while the others point to /rel-manual/...
--- Device resource needs the "name" of the SD.
--- Specify a single directory to restore.
--- Implement MediaType keyword in bsr?   
--- Add a date and time stamp at the beginning of every line in the 
--  Job report (Volker Sauer).
--- Add level to estimate command.
--- Add "limit=n" for "list jobs"
--- Make bootstrap filename unique.
--- Make Dmsg look at global before calling subroutine.
--- From Chris Hull:
--   it seems to be complaining about 12:00pm which should be a valid 12
--   hour time.  I changed the time to 11:59am and everything works fine.
--   Also 12:00am works fine.  0:00pm also works (which I don't think
--   should).  None of the values 12:00pm - 12:59pm work for that matter.
--- Require restore via the restore command or make a restore Job
--  get the bootstrap file.
--- Implement Maximum Job Spool Size
--- Fix 3993 error in SD. It forgets to look at autochanger
--  resource for device command, ...
--- 3. Prevent two drives requesting the same Volume in any given
--     autochanger, by checking if a Volume is mounted on another drive
--     in an Autochanger.
--- Upgrade to MySQL 4.1.12 See:  
--  http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html
--- Add # Job Level date to bsr file
--- Implement "PreferMountedVolumes = yes|no" in Job resource.
--##   Integrate web-bacula into a new Bacula project with
--     bimagemgr.
--- Cleaning tapes should have Status "Cleaning" rather than append.
--- Make sure that Python has access to Client address/port so that
--  it can check if Clients are alive.
--- Review all items in "restore".
--- Fix PostgreSQL GROUP BY problems in restore.
--- Fix PostgreSQL sql problems in bugs.
--- After rename
--  04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume 
--     "DLT-13Feb04".
--  Current Volume "DLT-04Jul05" not acceptable because:
--  1997 Volume "DLT-13Feb04" not in catalog.
--  04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device 
--     "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02
--##   Create a new GUI chapter explaining all the GUI programs.
---    Make "update slots" when pointing to Autochanger, remove
--     all Volumes from other drives.  "update slots all-drives"?
--     No, this is done by modifying mtx-changer to list what is
--     in the drives.
--- Finish TLS implementation.
--- Port limiting -m in iptables to prevent DoS attacks
--  could cause broken pipes on Bacula.
--6. Build and test the Volume Shadow Copy (VSS) for Win32. 
---  Allow cancel of unknown Job
---  State not saved when closing Win32 FD by icon
---  bsr-opt-test fails. bsr deleted. Fix.
---  Move Python daemon variables from Job to Bacula object.
--   WorkingDir, ConfigFile
--- Document that Bootstrap files can be written with cataloging
--  turned off.
--- Document details of ANSI/IBM labels
--- OS linux 2.4
--  1) ADIC, DLT, FastStor 4000, 7*20GB
--- Linux Sony LIB-D81, AIT-3 library works.
--- Doc the following
--  to activate, check or disable the hardware compression feature on my 
--  exb-8900 i use the exabyte "MammothTool" you can get it here:
--  http://www.exabyte.com/support/online/downloads/index.cfm
--  There is a solaris version of this tool. With option -C 0 or 1 you can 
--  disable or activate compression. Start this tool without any options for 
--  a small reference.
--- Document Heartbeat Interval in the dealing with firewalls section.
--- Document new CDROM directory.
--- On Win32 working directory must have drive letter ????
--- On Win32 working directory must be writable by SYSTEM to
--  do restores.
--- Document that ChangerDevice is used for Alert command.
--- Add better documentation on how restores can be done
--8. Take one more try at making DVD writing work (no go)
--7. Write a bacula-web document
--- Why isn't the DEVICE structure defined when doing
--  a reservation?
--- Multi-drive changer seems to only use drive 0
--  Multiple drives don't seem to be opened.
--- My database is growing
--- Call GetLastError() in the berrno constructor rather
--  than delaying until strerror.
--- Tape xxx in drive 0, requested in drive 1
--- The mount command does not work with drives other than 0.
--- A mount should cause the SD to re-examine what Slot is   
--  loaded.
--- The SD locks on to the first available drive then
--  wants a Volume that is released but in another drive --
--  chaos.
--- Run the regression scripts on Solaris and FreeBSD
---  Figure out how to package gui, and rescue programs.
--- Add a .dir command to restore tree code to eliminate the problem
--- Mount after manually unloading changer causes hang in SD
--- Fix JobACL with restore by JobId.
-+=== Done -- see kernsdone
-Index: kes-1.38
-===================================================================
-RCS file: /cvsroot/bacula/bacula/kes-1.38,v
-retrieving revision 1.1.2.13
-retrieving revision 1.1.2.14
-diff -u -r1.1.2.13 -r1.1.2.14
---- kes-1.38   14 Nov 2005 20:20:38 -0000      1.1.2.13
-+++ kes-1.38   22 Nov 2005 10:50:55 -0000      1.1.2.14
-@@ -3,6 +3,20 @@
- General:
-+Changes to 1.38.2:
-+20Oct05
-+- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-+- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
-+  says this does not fix *his* bug).
-+- Fix cancel failure bug. Bug #481
-+- Fix failure when Pool name has spaces. Bug #487   
-+- Fix SD crash in autochanger code. Mutex failure. Bug #488
-+- Fix a couple of free()s in src/filed/acl.c
-+- Fix memory overrun in bfile.c in building OS X resource
-+  fork filename. Bug #489 
-+- Add Pool name to SD status output.
-+- Add Python install dir for Solaris to configure. Bug #492
-+
- Changes to 1.38.1:
- 14Oct05
- - Apply SunOS patch for ACLs submitted by David Duchscher.                  
-Index: projects
-===================================================================
-RCS file: /cvsroot/bacula/bacula/projects,v
-retrieving revision 1.12.2.3
-retrieving revision 1.12.2.4
-diff -u -r1.12.2.3 -r1.12.2.4
---- projects   10 Nov 2005 20:25:27 -0000      1.12.2.3
-+++ projects   22 Nov 2005 10:50:55 -0000      1.12.2.4
-@@ -228,7 +228,175 @@
-   Why:    Performance enhancement.
-+Item 13:  Let Bacula log tape usage and handle drive cleaning cycles.
-+  Date:   November 11, 2005
-+  Origin: Arno Lehmann <al at its-lehmann dot de>
-+  Status:
-+
-+  What:   Make Bacula manage tape life cycle information and drive 
-+          cleaning cycles.
-+
-+  Why:    Both parts of this project are important when operating backups.
-+          We need to know which tapes need replacement, and we need to
-+          make sure the drives are cleaned when necessary.  While many
-+          tape libraries and even autoloaders can handle all this
-+          automatically, support by Bacula can be helpful for smaller
-+          (older) libraries and single drives.  Also, checking drive
-+          status during operation can prevent some failures (as I had to
-+          learn the hard way...)
-+
-+  Notes:  First, Bacula could (and even does, to some limited extent)
-+          record tape and drive usage.  For tapes, the number of mounts,
-+          the amount of data, and the time the tape has actually been
-+          running could be recorded.  Data fields for Read and Write time
-+          and Nmber of mounts already exist in the catalog (I'm not sure
-+          if VolBytes is the sum of all bytes ever written to that volume
-+          by Bacula).  This information can be important when determining
-+          which media to replace.  For the tape drives known to Bacula,
-+          similar information is interesting to determine the device
-+          status and expected life time: Time it's been Reading and
-+          Writing, number of tape Loads / Unloads / Errors.  This
-+          information is not yet recorded as far as I know.
-+
-+          The next step would be implementing drive cleaning setup.
-+          Bacula already has knowledge about cleaning tapes.  Once it has
-+          some information about cleaning cycles (measured in drive run
-+          time, number of tapes used, or calender days, for example) it
-+          can automatically execute tape cleaning (with an autochanger,
-+          obviously) or ask for operator assistence loading a cleaning
-+          tape.
-+
-+          The next step would be to implement TAPEALERT checks not only
-+          when changing tapes and only sending he information to the
-+          administrator, but rather checking after each tape error,
-+          checking on a regular basis (for example after each tape file),
-+          and also before unloading and after loading a new tape.  Then,
-+          depending on the drives TAPEALERT state and the know drive
-+          cleaning state Bacula could automatically schedule later
-+          cleaning, clean immediately, or inform the operator.
-+
-+          Implementing this would perhaps require another catalog change
-+          and perhaps major changes in SD code and the DIR-SD protocoll,
-+          so I'd only consider this worth implementing if it would
-+          actually be used or even needed by many people. 
-+
-+Item 14:  Merging of multiple backups into a single one. (Also called Synthetic
-+          Backup or Consolidation).
-+
-+  Origin: Marc Cousin and Eric Bollengier 
-+  Date:   15 November 2005
-+  Status: Depends on first implementing project Item 1 (Migration).
-+
-+  What:   A merged backup is a backup made without connecting to the Client.
-+          It would be a Merge of existing backups into a single backup.
-+          In effect, it is like a restore but to the backup medium.
-+
-+          For instance, say that last sunday we made a full backup.  Then
-+          all week long, we created incremental backups, in order to do
-+          them fast.  Now comes sunday again, and we need another full.
-+          The merged backup makes it possible to do instead an incremental
-+          backup (during the night for instance), and then create a merged
-+          backup during the day, by using the full and incrementals from
-+          the week.  The merged backup will be exactly like a full made
-+          sunday night on the tape, but the production interruption on the
-+          Client will be minimal, as the Client will only have to send
-+          incrementals.
-+
-+          In fact, if it's done correctly, you could merge all the
-+          Incrementals into single Incremental, or all the Incrementals
-+          and the last Differential into a new Differential, or the Full,
-+          last differential and all the Incrementals into a new Full
-+          backup.  And there is no need to involve the Client.
-+
-+  Why:    The benefit is that :
-+          - the Client just does an incremental ;
-+          - the merged backup on tape is just as a single full backup,
-+            and can be restored very fast.
-+
-+          This is also a way of reducing the backup data since the old
-+          data can then be pruned (or not) from the catalog, possibly
-+          allowing older volumes to be recycled
-+
-+Item 15:  Automatic disabling of devices
-+   Date:   2005-11-11
-+   Origin: Peter Eriksson <peter at ifm.liu dot se>
-+   Status:
-+
-+   What:  After a configurable amount of fatal errors with a tape drive
-+          Bacula should automatically disable further use of a certain
-+          tape drive. There should also be "disable"/"enable" commands in
-+          the "bconsole" tool.
-+
-+   Why:   On a multi-drive jukebox there is a possibility of tape drives
-+          going bad during large backups (needing a cleaning tape run,
-+          tapes getting stuck). It would be advantageous if Bacula would
-+          automatically disable further use of a problematic tape drive
-+          after a configurable amount of errors has occured.
-+
-+          An example: I have a multi-drive jukebox (6 drives, 380+ slots)
-+          where tapes occasionally get stuck inside the drive. Bacula will
-+          notice that the "mtx-changer" command will fail and then fail
-+          any backup jobs trying to use that drive. However, it will still
-+          keep on trying to run new jobs using that drive and fail -
-+          forever, and thus failing lots and lots of jobs... Since we have
-+          many drives Bacula could have just automatically disabled
-+          further use of that drive and used one of the other ones
-+          instead.
-+
-+
-+Item 16:  Directive/mode to backup only file changes, not entire file
-+  Date:   11 November 2005
-+  Origin: Joshua Kugler <joshua dot kugler at uaf dot edu>
-+          Marek Bajon <mbajon at bimsplus dot com dot pl>
-+  Status: RFC
-+
-+  What:   Currently when a file changes, the entire file will be backed up in
-+          the next incremental or full backup.  To save space on the tapes
-+          it would be nice to have a mode whereby only the changes to the
-+          file would be backed up when it is changed.
-+
-+  Why:    This would save lots of space when backing up large files such as 
-+          logs, mbox files, Outlook PST files and the like.
-+
-+  Notes:  This would require the usage of disk-based volumes as comparing 
-+          files would not be feasible using a tape drive.
-+
-+Item 17:  Quick release of FD-SD connection
-+  Origin: Frank Volf (frank at deze dot org)
-+  Date:   17 november 2005
-+  Status:
-+
-+   What:  In the bacula implementation a backup is finished after all data
-+          and attributes are succesfully written to storage.  When using a
-+          tape backup it is very annoying that a backup can take a day,
-+          simply because the current tape (or whatever) is full and the
-+          administrator has not put a new one in.  During that time the
-+          system cannot be taken off-line, because there is still an open
-+          session between the storage daemon and the file daemon on the
-+          client.
-+
-+          Although this is a very good strategey for making "safe backups"
-+          This can be annoying for e.g.  laptops, that must remain
-+          connected until the bacukp is completed.
-+
-+          Using a new feature called "migration" it will be possible to
-+          spool first to harddisk (using a special 'spool' migration
-+          scheme) and then migrate the backup to tape.
-+
-+          There is still the problem of getting the attributes committed.
-+          If it takes a very long time to do, with the current code, the
-+          job has not terminated, and the File daemon is not freed up.  The
-+          Storage daemon should release the File daemon as soon as all the
-+          file data and all the attributes have been sent to it (the SD).
-+          Currently the SD waits until everything is on tape and all the
-+          attributes are transmitted to the Director before signalling
-+          completion to the FD. I don't think I would have any problem
-+          changing this.  The reason is that even if the FD reports back to
-+          the Dir that all is OK, the job will not terminate until the SD
-+          has done the same thing -- so in a way keeping the SD-FD link
-+          open to the very end is not really very productive ...
-+   Why:   Makes backup of laptops much easier.
- ============= Empty RFC form ===========
-@@ -245,33 +413,4 @@
- ============== End RFC form ==============
--Items completed for release 1.38.0:
--#4   Embedded Python Scripting (implemented in all Daemons)
--#5   Events that call a Python program (Implemented in all
--       daemons, but more cleanup work to be done).
--#6   Select one from among Multiple Storage Devices for Job.
--       This is already implemented in 1.37.
--#7   Single Job Writing to Multiple Storage Devices. This is
--       currently implemented with a Clone feature.
--#-   Full multiple drive Autochanger support (done in 1.37)
--#-   Built in support for communications encryption (TLS) 
--       done by Landon Fuller.
--#    Support for Unicode characters
--       (via UTF-8) on Win32 machines thanks to Thorsten Engel.
--Item  8:  Break the one-to-one Relationship between a Job and a
--          Specific Storage Device (or Devices if #10 is implemented).
--
--Completed items from last year's list:
--Item 1:   Multiple simultaneous Jobs. (done)
--Item 3:   Write the bscan program -- also write a bcopy program (done).
--Item 5:   Implement Label templates (done).
--Item 6:   Write a regression script (done)
--Item 9:   Add SSL to daemon communications (done by Landon Fuller)
--Item 10:  Define definitive tape format (done)
--Item 3:   GUI for interactive restore. Partially Implemented in 1.34
--          Note, there is now a complete Webmin plugin, a partial
--          GNOME console, and an excellent wx-console GUI.
--Item 4:   GUI for interactive backup
--Item 2:   Job Data Spooling.
--    Done: Regular expression matching.
--Item 10:  New daemon communication protocol (this has been dropped).
-+Items completed for release 1.38.0 -- see kernsdone
-Index: autoconf/configure.in
-===================================================================
-RCS file: /cvsroot/bacula/bacula/autoconf/configure.in,v
-retrieving revision 1.184.2.4
-retrieving revision 1.184.2.5
-diff -u -r1.184.2.4 -r1.184.2.5
---- autoconf/configure.in      13 Nov 2005 10:51:17 -0000      1.184.2.4
-+++ autoconf/configure.in      22 Nov 2005 10:50:55 -0000      1.184.2.5
-@@ -604,7 +604,7 @@
-   PYTHON_LIBS=
-   if test "$withval" != "no"; then
-      if test "$withval" = "yes"; then
--      for python_root in /usr /usr/local; do
-+      for python_root in /usr /usr/local /usr/sfw; do
-         if test -f $python_root/include/python2.2/Python.h; then
-            PYTHON_INCDIR=-I$python_root/include/python2.2
-            PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
-Index: patches/1.38.1-to-1.38.2.patch
-===================================================================
-RCS file: patches/1.38.1-to-1.38.2.patch
-diff -N patches/1.38.1-to-1.38.2.patch
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ patches/1.38.1-to-1.38.2.patch     22 Nov 2005 10:52:49 -0000      1.1.2.3
-@@ -0,0 +1,6901 @@
-+
-+ This patch fixes the following bugs:
-+
-+- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-+- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
-+  says that this patch does not fix his problem)
-+- Fix cancel failure bug. Bug #481
-+- Fix failure when Pool name has spaces. Bug #487
-+- Fix SD crash in autochanger code. Mutex failure. Bug #488
-+- Fix a couple of free()s in src/filed/acl.c
-+- Fix memory overrun in bfile.c in building OS X resource
-+  fork filename. Bug #489
-+- Add Pool name to SD status output.
-+- Add Python install dir for Solaris to configure. Bug #492
-+
-+This patch is applied to Bacula source version 1.38.1 and will
-+produce Bacula source version 1.38.2.  Apply it with:
-+
-+   cd <bacula-1.38.1-source>
-+   ./configure (your options) if not already done
-+   patch -p0 <1.38.1-to-1.38.2.patch
-+   make
-+   make install
-+
-+Index: ChangeLog
-+===================================================================
-+RCS file: /cvsroot/bacula/bacula/ChangeLog,v
-+retrieving revision 1.154.2.7
-+retrieving revision 1.154.2.8
-+diff -u -r1.154.2.7 -r1.154.2.8
-+--- ChangeLog 15 Nov 2005 09:27:19 -0000      1.154.2.7
-++++ ChangeLog 22 Nov 2005 10:50:54 -0000      1.154.2.8
-+@@ -1,4 +1,15 @@
-+ 
-++Changes to 1.38.2:
-++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-++- Fix bnet-server bug found on OpenBSD. Bug #486
-++- Fix cancel failure bug. Bug #481
-++- Fix failure when Pool name has spaces. Bug #487   
-++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-++- Fix a couple of free()s in src/filed/acl.c
-++- Fix memory overrun in bfile.c in building OS X resource
-++  fork filename. Bug #489 
-++- Add Pool name to SD status output.
-++- Add Python install dir for Solaris to configure. Bug #492
-+ 
-+ Changes to 1.38.1:
-+ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
-+Index: ReleaseNotes
-+===================================================================
-+RCS file: /cvsroot/bacula/bacula/ReleaseNotes,v
-+retrieving revision 1.147.2.9
-+retrieving revision 1.147.2.10
-+diff -u -r1.147.2.9 -r1.147.2.10
-+--- ReleaseNotes      15 Nov 2005 09:27:19 -0000      1.147.2.9
-++++ ReleaseNotes      22 Nov 2005 10:50:54 -0000      1.147.2.10
-+@@ -1,10 +1,22 @@
-+ 
-+-          Release Notes for Bacula 1.38.1
-++          Release Notes for Bacula 1.38.2
-+ 
-+   Bacula code: Total files = 420 Total lines = 138,440 (*.h *.c *.in)
-+       20,440 additional lines of code since version 1.36.3
-+ 
-+-Changes since 1.38.0:
-++Changes to 1.38.2:
-++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-++- Fix bnet-server bug found on OpenBSD. Bug #486
-++- Fix cancel failure bug. Bug #481
-++- Fix failure when Pool name has spaces. Bug #487   
-++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-++- Fix a couple of free()s in src/filed/acl.c
-++- Fix memory overrun in bfile.c in building OS X resource
-++  fork filename. Bug #489 
-++- Add Pool name to SD status output.
-++- Add Python install dir for Solaris to configure. Bug #492
-++
-++Changes to 1.38.1:
-+ - Corrected ACL for Solaris (David Duchscher and Attila Fulop).
-+ - Add bacula_mail_summary.sh to examples directory. It makes
-+   a single email summary of any number of jobs. Submitted
-+Index: configure
-+===================================================================
-+RCS file: /cvsroot/bacula/bacula/configure,v
-+retrieving revision 1.203.2.5
-+retrieving revision 1.203.2.6
-+diff -u -r1.203.2.5 -r1.203.2.6
-+--- configure 13 Nov 2005 10:51:17 -0000      1.203.2.5
-++++ configure 22 Nov 2005 10:50:54 -0000      1.203.2.6
-+@@ -14948,7 +14948,7 @@
-+   PYTHON_LIBS=
-+   if test "$withval" != "no"; then
-+      if test "$withval" = "yes"; then
-+-     for python_root in /usr /usr/local; do
-++     for python_root in /usr /usr/local /usr/sfw; do
-+        if test -f $python_root/include/python2.2/Python.h; then
-+           PYTHON_INCDIR=-I$python_root/include/python2.2
-+           PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
-+Index: kernstodo
-+===================================================================
-+RCS file: /cvsroot/bacula/bacula/kernstodo,v
-+retrieving revision 1.570.2.6
-+retrieving revision 1.570.2.7
-+diff -u -r1.570.2.6 -r1.570.2.7
-+--- kernstodo 4 Nov 2005 09:16:49 -0000       1.570.2.6
-++++ kernstodo 22 Nov 2005 10:50:55 -0000      1.570.2.7
-+@@ -1,5 +1,5 @@
-+                     Kern's ToDo List
-+-                     03 November 2005
-++                     21 November 2005
-+ 
-+ Major development:      
-+ Project                     Developer
-+@@ -7,8 +7,6 @@
-+ Version 1.37                Kern (see below)
-+ ========================================================
-+ 
-+-Final items for 1.37 before release:
-+-
-+ Document:
-+ - Does ClientRunAfterJob fail the job on a bad return code?
-+ - Document cleaning up the spool files:
-+@@ -18,6 +16,8 @@
-+ - Does WildFile match against full name?  Doc.
-+ 
-+ For 1.39:
-++- Make sure that all do_prompt() calls in Dir check for
-++  -1 (error) and -2 (cancel) returns.
-+ - Look at -D_FORTIFY_SOURCE=2
-+ - Add Win32 FileSet definition somewhere
-+ - Look at fixing restore status stats in SD.
-+@@ -27,6 +27,12 @@
-+   encountered, read many times (as it currently does), and if the
-+   block cannot be read, skip to the next block, and try again.  If
-+   that fails, skip to the next file and try again, ...
-++- Add level table:
-++  create table LevelType (LevelType binary(1), LevelTypeLong tinyblob);
-++  insert into LevelType (LevelType,LevelTypeLong) values
-++  ("F","Full"),
-++  ("D","Diff"),
-++  ("I","Inc");
-+ - Add ACL to restore only to original location.
-+ - Add a recursive mark command (rmark) to restore.
-+ - "Minimum Job Interval = nnn" sets minimum interval between Jobs
-+@@ -1246,219 +1252,4 @@
-+ ====
-+ 
-+ 
-+-=== Done
-+-- Save mount point for directories not traversed with onefs=yes.
-+-- Add seconds to start and end times in the Job report output.
-+-- if 2 concurrent backups are attempted on the same tape
-+-  drive (autoloader) into different tape pools, one of them will exit
-+-  fatally instead of halting until the drive is idle
-+-- Update StartTime if job held in Job Queue.
-+-- Look at www.nu2.nu/pebuilder as a helper for full windows
-+-  bare metal restore. (done by Scott)
-+-- Fix orphanned buffers:
-+-   Orphaned buffer:      24 bytes allocated at line 808 of rufus-dir job.c
-+-   Orphaned buffer:      40 bytes allocated at line 45 of rufus-dir alist.c
-+-- Implement Preben's suggestion to add
-+-  File System Types = ext2, ext3 
-+-  to FileSets, thus simplifying backup of *all* local partitions.
-+-- Try to open a device on each Job if it was not opened
-+-  when the SD started.
-+-- Add dump of VolSessionId/Time and FileIndex with bls.
-+-- If Bacula does not find the right tape in the Autochanger,
-+-  then mark the tape in error and move on rather than asking
-+-  for operator intervention.
-+-- Cancel command should include JobId in list of Jobs.
-+-- Add performance testing hooks
-+-- Bootstrap from JobMedia records.
-+-- Implement WildFile and WildDir to solve problem of 
-+-  saving only *.doc files.
-+-- Fix
-+-   Please use the "label"  command to create a new Volume for:
-+-       Storage:      DDS-4-changer
-+-       Media type:   
-+-       Pool:         Default
-+-   label
-+-   The defined Storage resources are:
-+-- Copy Changer Device and Changer Command from Autochanger
-+-  to Device resource in SD if none given in Device resource.
-+-- 1. Automatic use of more than one drive in an autochanger (done)
-+-- 2. Automatic selection of the correct drive for each Job (i.e.
-+-     selects a drive with an appropriate Volume for the Job) (done)
-+-- 6. Allow multiple simultaneous Jobs referencing the same pool write
-+-    to several tapes (some new directive(s) are are probably needed for
-+-    this) (done)
-+-- Locking (done)
-+-- Key on Storage rather than Pool (done)
-+-- Allow multiple drives to use same Pool (change jobq.c DIR) (done).
-+-- Synchronize multiple drives so that not more
-+-  than one loads a tape and any time (done)
-+-- 4. Use Changer Device and Changer Command specified in the
-+-     Autochanger resource, if none is found in the Device resource.
-+-    You can continue to specify them in the Device resource if you want
-+-    or need them to be different for each device.
-+-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") 
-+-    that can allow a Device be part of an Autochanger, and hence the changer
-+-    script protected, but if set to no, will prevent the Device from being 
-+-    automatically selected from the changer. This allows the device to
-+-    be directly accessed through its Device name, but not through the
-+-    AutoChanger name.
-+-#6   Select one from among Multiple Storage Devices for Job
-+-#5   Events that call a Python program 
-+-     (Implemented in Dir/SD)
-+-- Make sure the Device name is in the Query packet returned.
-+-- Don't start a second file job if one is already running.
-+-- Implement EOF/EOV labels for ANSI labels
-+-- Implement IBM labels.
-+-- When Python creates a new label, the tape is immediately
-+-  recycled and no label created. This happens when using   
-+-  autolabeling -- even when Python doesn't generate the name.
-+-- Scratch Pool where the volumes can be re-assigned to any Pool.
-+-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) 
-+-  is busy reading. Job 6 canceled.
-+-- Remove separate thread for opening devices in SD.  On the other
-+-  hand, don't block waiting for open() for devices.
-+-- Fix code to either handle updating NumVol or to calculate it in
-+-  Dir next_vol.c
-+-- Ensure that you cannot exclude a directory or a file explicitly
-+-  Included with File.
-+-#4   Embedded Python Scripting 
-+-     (Implemented in Dir/SD/FD)
-+-- Add Python writable variable for changing the Priority,
-+-    Client, Storage, JobStatus (error), ...
-+-- SD Python
-+-  - Solicit Events
-+-- Add disk seeking on restore; turn off seek on tapes.
-+-  stored/match_bsr.c
-+-- Look at dird_conf.c:1000: warning: `int size' 
-+-  might be used uninitialized in this function
-+-- Indicate when a Job is purged/pruned during restore.
-+-- Implement some way to turn off automatic pruning in Jobs.
-+-- Implement a way an Admin Job can prune, possibly multiple
-+-  clients -- Python script?
-+-- Look at Preben's acl.c error handling code.
-+-- SD crashes after a tape restore then doing a backup. 
-+-- If drive is opened read/write, close it and re-open
-+-  read-only if doing a restore, and vice-versa.
-+-- Windows restore:
-+-  data-fd: RestoreFiles.2004-12-07_15.56.42 Error:
-+-  > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der
-+-  > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen
-+-  > Prozess verwendet wird.
-+-  Restore restores all files, but then fails at the end trying
-+-  to set the attributes of e:
-+-  from failed jobs.- Resolve the problem between Device name and Archive name,
-+-  and fix SD messages.
-+-- Tell the "restore" user when browsing is no longer possible.
-+-- Add a restore directory-x
-+-- Write non-optimized bsrs from the JobMedia and Media records,
-+-  even after Files are pruned.
-+-- Delete Stripe and Copy from VolParams to save space.
-+-- Fix option 2 of restore -- list where file is backed up -- require Client,
-+-  then list last 20 backups.
-+-- Finish implementation of passing all Storage and Device needs to
-+-  the SD.
-+-- Move test for max wait time exceeded in job.c up -- Peter's idea.
-+-##   Consider moving docs to their own project.
-+-##   Move rescue to its own project.
-+-- Add client version to the Client name line that prints in
-+-  the Job report.
-+-- Fix the Rescue CDROM.
-+-- By the way: on page http://www.bacula.org/?page=tapedrives , at the 
-+-  bottom, the link to "Tape Testing Chapter" is broken. It goes to 
-+-  /html-manual/... while the others point to /rel-manual/...
-+-- Device resource needs the "name" of the SD.
-+-- Specify a single directory to restore.
-+-- Implement MediaType keyword in bsr?   
-+-- Add a date and time stamp at the beginning of every line in the 
-+-  Job report (Volker Sauer).
-+-- Add level to estimate command.
-+-- Add "limit=n" for "list jobs"
-+-- Make bootstrap filename unique.
-+-- Make Dmsg look at global before calling subroutine.
-+-- From Chris Hull:
-+-   it seems to be complaining about 12:00pm which should be a valid 12
-+-   hour time.  I changed the time to 11:59am and everything works fine.
-+-   Also 12:00am works fine.  0:00pm also works (which I don't think
-+-   should).  None of the values 12:00pm - 12:59pm work for that matter.
-+-- Require restore via the restore command or make a restore Job
-+-  get the bootstrap file.
-+-- Implement Maximum Job Spool Size
-+-- Fix 3993 error in SD. It forgets to look at autochanger
-+-  resource for device command, ...
-+-- 3. Prevent two drives requesting the same Volume in any given
-+-     autochanger, by checking if a Volume is mounted on another drive
-+-     in an Autochanger.
-+-- Upgrade to MySQL 4.1.12 See:  
-+-  http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html
-+-- Add # Job Level date to bsr file
-+-- Implement "PreferMountedVolumes = yes|no" in Job resource.
-+-##   Integrate web-bacula into a new Bacula project with
-+-     bimagemgr.
-+-- Cleaning tapes should have Status "Cleaning" rather than append.
-+-- Make sure that Python has access to Client address/port so that
-+-  it can check if Clients are alive.
-+-- Review all items in "restore".
-+-- Fix PostgreSQL GROUP BY problems in restore.
-+-- Fix PostgreSQL sql problems in bugs.
-+-- After rename
-+-  04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume 
-+-     "DLT-13Feb04".
-+-  Current Volume "DLT-04Jul05" not acceptable because:
-+-  1997 Volume "DLT-13Feb04" not in catalog.
-+-  04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device 
-+-     "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02
-+-##   Create a new GUI chapter explaining all the GUI programs.
-+--    Make "update slots" when pointing to Autochanger, remove
-+-     all Volumes from other drives.  "update slots all-drives"?
-+-     No, this is done by modifying mtx-changer to list what is
-+-     in the drives.
-+-- Finish TLS implementation.
-+-- Port limiting -m in iptables to prevent DoS attacks
-+-  could cause broken pipes on Bacula.
-+-6. Build and test the Volume Shadow Copy (VSS) for Win32. 
-+--  Allow cancel of unknown Job
-+--  State not saved when closing Win32 FD by icon
-+--  bsr-opt-test fails. bsr deleted. Fix.
-+--  Move Python daemon variables from Job to Bacula object.
-+-   WorkingDir, ConfigFile
-+-- Document that Bootstrap files can be written with cataloging
-+-  turned off.
-+-- Document details of ANSI/IBM labels
-+-- OS linux 2.4
-+-  1) ADIC, DLT, FastStor 4000, 7*20GB
-+-- Linux Sony LIB-D81, AIT-3 library works.
-+-- Doc the following
-+-  to activate, check or disable the hardware compression feature on my 
-+-  exb-8900 i use the exabyte "MammothTool" you can get it here:
-+-  http://www.exabyte.com/support/online/downloads/index.cfm
-+-  There is a solaris version of this tool. With option -C 0 or 1 you can 
-+-  disable or activate compression. Start this tool without any options for 
-+-  a small reference.
-+-- Document Heartbeat Interval in the dealing with firewalls section.
-+-- Document new CDROM directory.
-+-- On Win32 working directory must have drive letter ????
-+-- On Win32 working directory must be writable by SYSTEM to
-+-  do restores.
-+-- Document that ChangerDevice is used for Alert command.
-+-- Add better documentation on how restores can be done
-+-8. Take one more try at making DVD writing work (no go)
-+-7. Write a bacula-web document
-+-- Why isn't the DEVICE structure defined when doing
-+-  a reservation?
-+-- Multi-drive changer seems to only use drive 0
-+-  Multiple drives don't seem to be opened.
-+-- My database is growing
-+-- Call GetLastError() in the berrno constructor rather
-+-  than delaying until strerror.
-+-- Tape xxx in drive 0, requested in drive 1
-+-- The mount command does not work with drives other than 0.
-+-- A mount should cause the SD to re-examine what Slot is   
-+-  loaded.
-+-- The SD locks on to the first available drive then
-+-  wants a Volume that is released but in another drive --
-+-  chaos.
-+-- Run the regression scripts on Solaris and FreeBSD
-+--  Figure out how to package gui, and rescue programs.
-+-- Add a .dir command to restore tree code to eliminate the problem
-+-- Mount after manually unloading changer causes hang in SD
-+-- Fix JobACL with restore by JobId.
-++=== Done -- see kernsdone
-+Index: kes-1.38
-+===================================================================
-+RCS file: /cvsroot/bacula/bacula/kes-1.38,v
-+retrieving revision 1.1.2.13
-+retrieving revision 1.1.2.14
-+diff -u -r1.1.2.13 -r1.1.2.14
-+--- kes-1.38  14 Nov 2005 20:20:38 -0000      1.1.2.13
-++++ kes-1.38  22 Nov 2005 10:50:55 -0000      1.1.2.14
-+@@ -3,6 +3,20 @@
-+ 
-+ General:
-+ 
-++Changes to 1.38.2:
-++20Oct05
-++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
-++  says this does not fix *his* bug).
-++- Fix cancel failure bug. Bug #481
-++- Fix failure when Pool name has spaces. Bug #487   
-++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-++- Fix a couple of free()s in src/filed/acl.c
-++- Fix memory overrun in bfile.c in building OS X resource
-++  fork filename. Bug #489 
-++- Add Pool name to SD status output.
-++- Add Python install dir for Solaris to configure. Bug #492
-++
-+ Changes to 1.38.1:
-+ 14Oct05
-+ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
-+Index: projects
-+===================================================================
-+RCS file: /cvsroot/bacula/bacula/projects,v
-+retrieving revision 1.12.2.3
-+retrieving revision 1.12.2.4
-+diff -u -r1.12.2.3 -r1.12.2.4
-+--- projects  10 Nov 2005 20:25:27 -0000      1.12.2.3
-++++ projects  22 Nov 2005 10:50:55 -0000      1.12.2.4
-+@@ -228,7 +228,175 @@
-+ 
-+   Why:    Performance enhancement.
-+ 
-++Item 13:  Let Bacula log tape usage and handle drive cleaning cycles.
-++  Date:   November 11, 2005
-++  Origin: Arno Lehmann <al at its-lehmann dot de>
-++  Status:
-++
-++  What:   Make Bacula manage tape life cycle information and drive 
-++          cleaning cycles.
-++
-++  Why:    Both parts of this project are important when operating backups.
-++          We need to know which tapes need replacement, and we need to
-++          make sure the drives are cleaned when necessary.  While many
-++          tape libraries and even autoloaders can handle all this
-++          automatically, support by Bacula can be helpful for smaller
-++          (older) libraries and single drives.  Also, checking drive
-++          status during operation can prevent some failures (as I had to
-++          learn the hard way...)
-++
-++  Notes:  First, Bacula could (and even does, to some limited extent)
-++          record tape and drive usage.  For tapes, the number of mounts,
-++          the amount of data, and the time the tape has actually been
-++          running could be recorded.  Data fields for Read and Write time
-++          and Nmber of mounts already exist in the catalog (I'm not sure
-++          if VolBytes is the sum of all bytes ever written to that volume
-++          by Bacula).  This information can be important when determining
-++          which media to replace.  For the tape drives known to Bacula,
-++          similar information is interesting to determine the device
-++          status and expected life time: Time it's been Reading and
-++          Writing, number of tape Loads / Unloads / Errors.  This
-++          information is not yet recorded as far as I know.
-++
-++          The next step would be implementing drive cleaning setup.
-++          Bacula already has knowledge about cleaning tapes.  Once it has
-++          some information about cleaning cycles (measured in drive run
-++          time, number of tapes used, or calender days, for example) it
-++          can automatically execute tape cleaning (with an autochanger,
-++          obviously) or ask for operator assistence loading a cleaning
-++          tape.
-++
-++          The next step would be to implement TAPEALERT checks not only
-++          when changing tapes and only sending he information to the
-++          administrator, but rather checking after each tape error,
-++          checking on a regular basis (for example after each tape file),
-++          and also before unloading and after loading a new tape.  Then,
-++          depending on the drives TAPEALERT state and the know drive
-++          cleaning state Bacula could automatically schedule later
-++          cleaning, clean immediately, or inform the operator.
-++
-++          Implementing this would perhaps require another catalog change
-++          and perhaps major changes in SD code and the DIR-SD protocoll,
-++          so I'd only consider this worth implementing if it would
-++          actually be used or even needed by many people. 
-++
-++Item 14:  Merging of multiple backups into a single one. (Also called Synthetic
-++          Backup or Consolidation).
-++
-++  Origin: Marc Cousin and Eric Bollengier 
-++  Date:   15 November 2005
-++  Status: Depends on first implementing project Item 1 (Migration).
-++
-++  What:   A merged backup is a backup made without connecting to the Client.
-++          It would be a Merge of existing backups into a single backup.
-++          In effect, it is like a restore but to the backup medium.
-++
-++          For instance, say that last sunday we made a full backup.  Then
-++          all week long, we created incremental backups, in order to do
-++          them fast.  Now comes sunday again, and we need another full.
-++          The merged backup makes it possible to do instead an incremental
-++          backup (during the night for instance), and then create a merged
-++          backup during the day, by using the full and incrementals from
-++          the week.  The merged backup will be exactly like a full made
-++          sunday night on the tape, but the production interruption on the
-++          Client will be minimal, as the Client will only have to send
-++          incrementals.
-++
-++          In fact, if it's done correctly, you could merge all the
-++          Incrementals into single Incremental, or all the Incrementals
-++          and the last Differential into a new Differential, or the Full,
-++          last differential and all the Incrementals into a new Full
-++          backup.  And there is no need to involve the Client.
-++
-++  Why:    The benefit is that :
-++          - the Client just does an incremental ;
-++          - the merged backup on tape is just as a single full backup,
-++            and can be restored very fast.
-++
-++          This is also a way of reducing the backup data since the old
-++          data can then be pruned (or not) from the catalog, possibly
-++          allowing older volumes to be recycled
-++
-++Item 15:  Automatic disabling of devices
-++   Date:   2005-11-11
-++   Origin: Peter Eriksson <peter at ifm.liu dot se>
-++   Status:
-++
-++   What:  After a configurable amount of fatal errors with a tape drive
-++          Bacula should automatically disable further use of a certain
-++          tape drive. There should also be "disable"/"enable" commands in
-++          the "bconsole" tool.
-++
-++   Why:   On a multi-drive jukebox there is a possibility of tape drives
-++          going bad during large backups (needing a cleaning tape run,
-++          tapes getting stuck). It would be advantageous if Bacula would
-++          automatically disable further use of a problematic tape drive
-++          after a configurable amount of errors has occured.
-++
-++          An example: I have a multi-drive jukebox (6 drives, 380+ slots)
-++          where tapes occasionally get stuck inside the drive. Bacula will
-++          notice that the "mtx-changer" command will fail and then fail
-++          any backup jobs trying to use that drive. However, it will still
-++          keep on trying to run new jobs using that drive and fail -
-++          forever, and thus failing lots and lots of jobs... Since we have
-++          many drives Bacula could have just automatically disabled
-++          further use of that drive and used one of the other ones
-++          instead.
-++
-++
-++Item 16:  Directive/mode to backup only file changes, not entire file
-++  Date:   11 November 2005
-++  Origin: Joshua Kugler <joshua dot kugler at uaf dot edu>
-++          Marek Bajon <mbajon at bimsplus dot com dot pl>
-++  Status: RFC
-++
-++  What:   Currently when a file changes, the entire file will be backed up in
-++          the next incremental or full backup.  To save space on the tapes
-++          it would be nice to have a mode whereby only the changes to the
-++          file would be backed up when it is changed.
-++
-++  Why:    This would save lots of space when backing up large files such as 
-++          logs, mbox files, Outlook PST files and the like.
-++
-++  Notes:  This would require the usage of disk-based volumes as comparing 
-++          files would not be feasible using a tape drive.
-++
-++Item 17:  Quick release of FD-SD connection
-++  Origin: Frank Volf (frank at deze dot org)
-++  Date:   17 november 2005
-++  Status:
-++
-++   What:  In the bacula implementation a backup is finished after all data
-++          and attributes are succesfully written to storage.  When using a
-++          tape backup it is very annoying that a backup can take a day,
-++          simply because the current tape (or whatever) is full and the
-++          administrator has not put a new one in.  During that time the
-++          system cannot be taken off-line, because there is still an open
-++          session between the storage daemon and the file daemon on the
-++          client.
-++
-++          Although this is a very good strategey for making "safe backups"
-++          This can be annoying for e.g.  laptops, that must remain
-++          connected until the bacukp is completed.
-++
-++          Using a new feature called "migration" it will be possible to
-++          spool first to harddisk (using a special 'spool' migration
-++          scheme) and then migrate the backup to tape.
-++
-++          There is still the problem of getting the attributes committed.
-++          If it takes a very long time to do, with the current code, the
-++          job has not terminated, and the File daemon is not freed up.  The
-++          Storage daemon should release the File daemon as soon as all the
-++          file data and all the attributes have been sent to it (the SD).
-++          Currently the SD waits until everything is on tape and all the
-++          attributes are transmitted to the Director before signalling
-++          completion to the FD. I don't think I would have any problem
-++          changing this.  The reason is that even if the FD reports back to
-++          the Dir that all is OK, the job will not terminate until the SD
-++          has done the same thing -- so in a way keeping the SD-FD link
-++          open to the very end is not really very productive ...
-+ 
-++   Why:   Makes backup of laptops much easier.
-+ 
-+ 
-+ ============= Empty RFC form ===========
-+@@ -245,33 +413,4 @@
-+ ============== End RFC form ==============
-+ 
-+ 
-+-Items completed for release 1.38.0:
-+-#4   Embedded Python Scripting (implemented in all Daemons)
-+-#5   Events that call a Python program (Implemented in all
-+-       daemons, but more cleanup work to be done).
-+-#6   Select one from among Multiple Storage Devices for Job.
-+-       This is already implemented in 1.37.
-+-#7   Single Job Writing to Multiple Storage Devices. This is
-+-       currently implemented with a Clone feature.
-+-#-   Full multiple drive Autochanger support (done in 1.37)
-+-#-   Built in support for communications encryption (TLS) 
-+-       done by Landon Fuller.
-+-#    Support for Unicode characters
-+-       (via UTF-8) on Win32 machines thanks to Thorsten Engel.
-+-Item  8:  Break the one-to-one Relationship between a Job and a
-+-          Specific Storage Device (or Devices if #10 is implemented).
-+-
-+-Completed items from last year's list:
-+-Item 1:   Multiple simultaneous Jobs. (done)
-+-Item 3:   Write the bscan program -- also write a bcopy program (done).
-+-Item 5:   Implement Label templates (done).
-+-Item 6:   Write a regression script (done)
-+-Item 9:   Add SSL to daemon communications (done by Landon Fuller)
-+-Item 10:  Define definitive tape format (done)
-+-Item 3:   GUI for interactive restore. Partially Implemented in 1.34
-+-          Note, there is now a complete Webmin plugin, a partial
-+-          GNOME console, and an excellent wx-console GUI.
-+-Item 4:   GUI for interactive backup
-+-Item 2:   Job Data Spooling.
-+-    Done: Regular expression matching.
-+-Item 10:  New daemon communication protocol (this has been dropped).
-++Items completed for release 1.38.0 -- see kernsdone
-+Index: autoconf/configure.in
-+===================================================================
-+RCS file: /cvsroot/bacula/bacula/autoconf/configure.in,v
-+retrieving revision 1.184.2.4
-+retrieving revision 1.184.2.5
-+diff -u -r1.184.2.4 -r1.184.2.5
-+--- autoconf/configure.in     13 Nov 2005 10:51:17 -0000      1.184.2.4
-++++ autoconf/configure.in     22 Nov 2005 10:50:55 -0000      1.184.2.5
-+@@ -604,7 +604,7 @@
-+   PYTHON_LIBS=
-+   if test "$withval" != "no"; then
-+      if test "$withval" = "yes"; then
-+-     for python_root in /usr /usr/local; do
-++     for python_root in /usr /usr/local /usr/sfw; do
-+        if test -f $python_root/include/python2.2/Python.h; then
-+           PYTHON_INCDIR=-I$python_root/include/python2.2
-+           PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
-+Index: patches/1.38.1-to-1.38.2.patch
-+===================================================================
-+RCS file: patches/1.38.1-to-1.38.2.patch
-+diff -N patches/1.38.1-to-1.38.2.patch
-+--- /dev/null 1 Jan 1970 00:00:00 -0000
-++++ patches/1.38.1-to-1.38.2.patch    22 Nov 2005 10:50:55 -0000      1.1.2.2
-+@@ -0,0 +1,5704 @@
-++
-++ This patch fixes the following bugs:
-++
-++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
-++  says that this patch does not fix his problem)
-++- Fix cancel failure bug. Bug #481
-++- Fix failure when Pool name has spaces. Bug #487
-++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-++- Fix a couple of free()s in src/filed/acl.c
-++- Fix memory overrun in bfile.c in building OS X resource
-++  fork filename. Bug #489
-++- Add Pool name to SD status output.
-++- Add Python install dir for Solaris to configure. Bug #492
-++
-++This patch is applied to Bacula source version 1.38.1 and will
-++produce Bacula source version 1.38.2.  Apply it with:
-++
-++   cd <bacula-1.38.1-source>
-++   ./configure (your options) if not already done
-++   patch -p0 <1.38.1-to-1.38.2.patch
-++   make
-++   make install
-++
-++? osx_finder.patch
-++Index: ChangeLog
-++===================================================================
-++RCS file: /cvsroot/bacula/bacula/ChangeLog,v
-++retrieving revision 1.154.2.7
-++diff -u -r1.154.2.7 ChangeLog
-++--- ChangeLog        15 Nov 2005 09:27:19 -0000      1.154.2.7
-+++++ ChangeLog        22 Nov 2005 10:42:14 -0000
-++@@ -1,4 +1,14 @@
-++ 
-+++Changes to 1.38.2:
-+++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-+++- Fix bnet-server bug found on OpenBSD. Bug #486
-+++- Fix cancel failure bug. Bug #481
-+++- Fix failure when Pool name has spaces. Bug #487   
-+++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-+++- Fix a couple of free()s in src/filed/acl.c
-+++- Fix memory overrun in bfile.c in building OS X resource
-+++  fork filename. Bug #489 
-+++- Add Pool name to SD status output.
-++ 
-++ Changes to 1.38.1:
-++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
-++Index: ReleaseNotes
-++===================================================================
-++RCS file: /cvsroot/bacula/bacula/ReleaseNotes,v
-++retrieving revision 1.147.2.9
-++diff -u -r1.147.2.9 ReleaseNotes
-++--- ReleaseNotes     15 Nov 2005 09:27:19 -0000      1.147.2.9
-+++++ ReleaseNotes     22 Nov 2005 10:42:15 -0000
-++@@ -1,10 +1,21 @@
-++ 
-++-          Release Notes for Bacula 1.38.1
-+++          Release Notes for Bacula 1.38.2
-++ 
-++   Bacula code: Total files = 420 Total lines = 138,440 (*.h *.c *.in)
-++       20,440 additional lines of code since version 1.36.3
-++ 
-++-Changes since 1.38.0:
-+++Changes to 1.38.2:
-+++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-+++- Fix bnet-server bug found on OpenBSD. Bug #486
-+++- Fix cancel failure bug. Bug #481
-+++- Fix failure when Pool name has spaces. Bug #487   
-+++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-+++- Fix a couple of free()s in src/filed/acl.c
-+++- Fix memory overrun in bfile.c in building OS X resource
-+++  fork filename. Bug #489 
-+++- Add Pool name to SD status output.
-+++
-+++Changes to 1.38.1:
-++ - Corrected ACL for Solaris (David Duchscher and Attila Fulop).
-++ - Add bacula_mail_summary.sh to examples directory. It makes
-++   a single email summary of any number of jobs. Submitted
-++Index: configure
-++===================================================================
-++RCS file: /cvsroot/bacula/bacula/configure,v
-++retrieving revision 1.203.2.5
-++diff -u -r1.203.2.5 configure
-++--- configure        13 Nov 2005 10:51:17 -0000      1.203.2.5
-+++++ configure        22 Nov 2005 10:42:19 -0000
-++@@ -14948,7 +14948,7 @@
-++   PYTHON_LIBS=
-++   if test "$withval" != "no"; then
-++      if test "$withval" = "yes"; then
-++-    for python_root in /usr /usr/local; do
-+++    for python_root in /usr /usr/local /usr/sfw; do
-++       if test -f $python_root/include/python2.2/Python.h; then
-++          PYTHON_INCDIR=-I$python_root/include/python2.2
-++          PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
-++Index: kernstodo
-++===================================================================
-++RCS file: /cvsroot/bacula/bacula/kernstodo,v
-++retrieving revision 1.570.2.6
-++diff -u -r1.570.2.6 kernstodo
-++--- kernstodo        4 Nov 2005 09:16:49 -0000       1.570.2.6
-+++++ kernstodo        22 Nov 2005 10:42:20 -0000
-++@@ -1,5 +1,5 @@
-++                     Kern's ToDo List
-++-                     03 November 2005
-+++                     21 November 2005
-++ 
-++ Major development:      
-++ Project                     Developer
-++@@ -7,8 +7,6 @@
-++ Version 1.37                Kern (see below)
-++ ========================================================
-++ 
-++-Final items for 1.37 before release:
-++-
-++ Document:
-++ - Does ClientRunAfterJob fail the job on a bad return code?
-++ - Document cleaning up the spool files:
-++@@ -18,6 +16,8 @@
-++ - Does WildFile match against full name?  Doc.
-++ 
-++ For 1.39:
-+++- Make sure that all do_prompt() calls in Dir check for
-+++  -1 (error) and -2 (cancel) returns.
-++ - Look at -D_FORTIFY_SOURCE=2
-++ - Add Win32 FileSet definition somewhere
-++ - Look at fixing restore status stats in SD.
-++@@ -27,6 +27,12 @@
-++   encountered, read many times (as it currently does), and if the
-++   block cannot be read, skip to the next block, and try again.  If
-++   that fails, skip to the next file and try again, ...
-+++- Add level table:
-+++  create table LevelType (LevelType binary(1), LevelTypeLong tinyblob);
-+++  insert into LevelType (LevelType,LevelTypeLong) values
-+++  ("F","Full"),
-+++  ("D","Diff"),
-+++  ("I","Inc");
-++ - Add ACL to restore only to original location.
-++ - Add a recursive mark command (rmark) to restore.
-++ - "Minimum Job Interval = nnn" sets minimum interval between Jobs
-++@@ -1246,219 +1252,4 @@
-++ ====
-++ 
-++ 
-++-=== Done
-++-- Save mount point for directories not traversed with onefs=yes.
-++-- Add seconds to start and end times in the Job report output.
-++-- if 2 concurrent backups are attempted on the same tape
-++-  drive (autoloader) into different tape pools, one of them will exit
-++-  fatally instead of halting until the drive is idle
-++-- Update StartTime if job held in Job Queue.
-++-- Look at www.nu2.nu/pebuilder as a helper for full windows
-++-  bare metal restore. (done by Scott)
-++-- Fix orphanned buffers:
-++-   Orphaned buffer:      24 bytes allocated at line 808 of rufus-dir job.c
-++-   Orphaned buffer:      40 bytes allocated at line 45 of rufus-dir alist.c
-++-- Implement Preben's suggestion to add
-++-  File System Types = ext2, ext3 
-++-  to FileSets, thus simplifying backup of *all* local partitions.
-++-- Try to open a device on each Job if it was not opened
-++-  when the SD started.
-++-- Add dump of VolSessionId/Time and FileIndex with bls.
-++-- If Bacula does not find the right tape in the Autochanger,
-++-  then mark the tape in error and move on rather than asking
-++-  for operator intervention.
-++-- Cancel command should include JobId in list of Jobs.
-++-- Add performance testing hooks
-++-- Bootstrap from JobMedia records.
-++-- Implement WildFile and WildDir to solve problem of 
-++-  saving only *.doc files.
-++-- Fix
-++-   Please use the "label"  command to create a new Volume for:
-++-       Storage:      DDS-4-changer
-++-       Media type:   
-++-       Pool:         Default
-++-   label
-++-   The defined Storage resources are:
-++-- Copy Changer Device and Changer Command from Autochanger
-++-  to Device resource in SD if none given in Device resource.
-++-- 1. Automatic use of more than one drive in an autochanger (done)
-++-- 2. Automatic selection of the correct drive for each Job (i.e.
-++-     selects a drive with an appropriate Volume for the Job) (done)
-++-- 6. Allow multiple simultaneous Jobs referencing the same pool write
-++-    to several tapes (some new directive(s) are are probably needed for
-++-    this) (done)
-++-- Locking (done)
-++-- Key on Storage rather than Pool (done)
-++-- Allow multiple drives to use same Pool (change jobq.c DIR) (done).
-++-- Synchronize multiple drives so that not more
-++-  than one loads a tape and any time (done)
-++-- 4. Use Changer Device and Changer Command specified in the
-++-     Autochanger resource, if none is found in the Device resource.
-++-    You can continue to specify them in the Device resource if you want
-++-    or need them to be different for each device.
-++-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") 
-++-    that can allow a Device be part of an Autochanger, and hence the changer
-++-    script protected, but if set to no, will prevent the Device from being 
-++-    automatically selected from the changer. This allows the device to
-++-    be directly accessed through its Device name, but not through the
-++-    AutoChanger name.
-++-#6   Select one from among Multiple Storage Devices for Job
-++-#5   Events that call a Python program 
-++-     (Implemented in Dir/SD)
-++-- Make sure the Device name is in the Query packet returned.
-++-- Don't start a second file job if one is already running.
-++-- Implement EOF/EOV labels for ANSI labels
-++-- Implement IBM labels.
-++-- When Python creates a new label, the tape is immediately
-++-  recycled and no label created. This happens when using   
-++-  autolabeling -- even when Python doesn't generate the name.
-++-- Scratch Pool where the volumes can be re-assigned to any Pool.
-++-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) 
-++-  is busy reading. Job 6 canceled.
-++-- Remove separate thread for opening devices in SD.  On the other
-++-  hand, don't block waiting for open() for devices.
-++-- Fix code to either handle updating NumVol or to calculate it in
-++-  Dir next_vol.c
-++-- Ensure that you cannot exclude a directory or a file explicitly
-++-  Included with File.
-++-#4   Embedded Python Scripting 
-++-     (Implemented in Dir/SD/FD)
-++-- Add Python writable variable for changing the Priority,
-++-    Client, Storage, JobStatus (error), ...
-++-- SD Python
-++-  - Solicit Events
-++-- Add disk seeking on restore; turn off seek on tapes.
-++-  stored/match_bsr.c
-++-- Look at dird_conf.c:1000: warning: `int size' 
-++-  might be used uninitialized in this function
-++-- Indicate when a Job is purged/pruned during restore.
-++-- Implement some way to turn off automatic pruning in Jobs.
-++-- Implement a way an Admin Job can prune, possibly multiple
-++-  clients -- Python script?
-++-- Look at Preben's acl.c error handling code.
-++-- SD crashes after a tape restore then doing a backup. 
-++-- If drive is opened read/write, close it and re-open
-++-  read-only if doing a restore, and vice-versa.
-++-- Windows restore:
-++-  data-fd: RestoreFiles.2004-12-07_15.56.42 Error:
-++-  > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der
-++-  > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen
-++-  > Prozess verwendet wird.
-++-  Restore restores all files, but then fails at the end trying
-++-  to set the attributes of e:
-++-  from failed jobs.- Resolve the problem between Device name and Archive name,
-++-  and fix SD messages.
-++-- Tell the "restore" user when browsing is no longer possible.
-++-- Add a restore directory-x
-++-- Write non-optimized bsrs from the JobMedia and Media records,
-++-  even after Files are pruned.
-++-- Delete Stripe and Copy from VolParams to save space.
-++-- Fix option 2 of restore -- list where file is backed up -- require Client,
-++-  then list last 20 backups.
-++-- Finish implementation of passing all Storage and Device needs to
-++-  the SD.
-++-- Move test for max wait time exceeded in job.c up -- Peter's idea.
-++-##   Consider moving docs to their own project.
-++-##   Move rescue to its own project.
-++-- Add client version to the Client name line that prints in
-++-  the Job report.
-++-- Fix the Rescue CDROM.
-++-- By the way: on page http://www.bacula.org/?page=tapedrives , at the 
-++-  bottom, the link to "Tape Testing Chapter" is broken. It goes to 
-++-  /html-manual/... while the others point to /rel-manual/...
-++-- Device resource needs the "name" of the SD.
-++-- Specify a single directory to restore.
-++-- Implement MediaType keyword in bsr?   
-++-- Add a date and time stamp at the beginning of every line in the 
-++-  Job report (Volker Sauer).
-++-- Add level to estimate command.
-++-- Add "limit=n" for "list jobs"
-++-- Make bootstrap filename unique.
-++-- Make Dmsg look at global before calling subroutine.
-++-- From Chris Hull:
-++-   it seems to be complaining about 12:00pm which should be a valid 12
-++-   hour time.  I changed the time to 11:59am and everything works fine.
-++-   Also 12:00am works fine.  0:00pm also works (which I don't think
-++-   should).  None of the values 12:00pm - 12:59pm work for that matter.
-++-- Require restore via the restore command or make a restore Job
-++-  get the bootstrap file.
-++-- Implement Maximum Job Spool Size
-++-- Fix 3993 error in SD. It forgets to look at autochanger
-++-  resource for device command, ...
-++-- 3. Prevent two drives requesting the same Volume in any given
-++-     autochanger, by checking if a Volume is mounted on another drive
-++-     in an Autochanger.
-++-- Upgrade to MySQL 4.1.12 See:  
-++-  http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html
-++-- Add # Job Level date to bsr file
-++-- Implement "PreferMountedVolumes = yes|no" in Job resource.
-++-##   Integrate web-bacula into a new Bacula project with
-++-     bimagemgr.
-++-- Cleaning tapes should have Status "Cleaning" rather than append.
-++-- Make sure that Python has access to Client address/port so that
-++-  it can check if Clients are alive.
-++-- Review all items in "restore".
-++-- Fix PostgreSQL GROUP BY problems in restore.
-++-- Fix PostgreSQL sql problems in bugs.
-++-- After rename
-++-  04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume 
-++-     "DLT-13Feb04".
-++-  Current Volume "DLT-04Jul05" not acceptable because:
-++-  1997 Volume "DLT-13Feb04" not in catalog.
-++-  04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device 
-++-     "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02
-++-##   Create a new GUI chapter explaining all the GUI programs.
-++--    Make "update slots" when pointing to Autochanger, remove
-++-     all Volumes from other drives.  "update slots all-drives"?
-++-     No, this is done by modifying mtx-changer to list what is
-++-     in the drives.
-++-- Finish TLS implementation.
-++-- Port limiting -m in iptables to prevent DoS attacks
-++-  could cause broken pipes on Bacula.
-++-6. Build and test the Volume Shadow Copy (VSS) for Win32. 
-++--  Allow cancel of unknown Job
-++--  State not saved when closing Win32 FD by icon
-++--  bsr-opt-test fails. bsr deleted. Fix.
-++--  Move Python daemon variables from Job to Bacula object.
-++-   WorkingDir, ConfigFile
-++-- Document that Bootstrap files can be written with cataloging
-++-  turned off.
-++-- Document details of ANSI/IBM labels
-++-- OS linux 2.4
-++-  1) ADIC, DLT, FastStor 4000, 7*20GB
-++-- Linux Sony LIB-D81, AIT-3 library works.
-++-- Doc the following
-++-  to activate, check or disable the hardware compression feature on my 
-++-  exb-8900 i use the exabyte "MammothTool" you can get it here:
-++-  http://www.exabyte.com/support/online/downloads/index.cfm
-++-  There is a solaris version of this tool. With option -C 0 or 1 you can 
-++-  disable or activate compression. Start this tool without any options for 
-++-  a small reference.
-++-- Document Heartbeat Interval in the dealing with firewalls section.
-++-- Document new CDROM directory.
-++-- On Win32 working directory must have drive letter ????
-++-- On Win32 working directory must be writable by SYSTEM to
-++-  do restores.
-++-- Document that ChangerDevice is used for Alert command.
-++-- Add better documentation on how restores can be done
-++-8. Take one more try at making DVD writing work (no go)
-++-7. Write a bacula-web document
-++-- Why isn't the DEVICE structure defined when doing
-++-  a reservation?
-++-- Multi-drive changer seems to only use drive 0
-++-  Multiple drives don't seem to be opened.
-++-- My database is growing
-++-- Call GetLastError() in the berrno constructor rather
-++-  than delaying until strerror.
-++-- Tape xxx in drive 0, requested in drive 1
-++-- The mount command does not work with drives other than 0.
-++-- A mount should cause the SD to re-examine what Slot is   
-++-  loaded.
-++-- The SD locks on to the first available drive then
-++-  wants a Volume that is released but in another drive --
-++-  chaos.
-++-- Run the regression scripts on Solaris and FreeBSD
-++--  Figure out how to package gui, and rescue programs.
-++-- Add a .dir command to restore tree code to eliminate the problem
-++-- Mount after manually unloading changer causes hang in SD
-++-- Fix JobACL with restore by JobId.
-+++=== Done -- see kernsdone
-++Index: kes-1.38
-++===================================================================
-++RCS file: /cvsroot/bacula/bacula/kes-1.38,v
-++retrieving revision 1.1.2.13
-++diff -u -r1.1.2.13 kes-1.38
-++--- kes-1.38 14 Nov 2005 20:20:38 -0000      1.1.2.13
-+++++ kes-1.38 22 Nov 2005 10:42:20 -0000
-++@@ -3,6 +3,19 @@
-++ 
-++ General:
-++ 
-+++Changes to 1.38.2:
-+++20Oct05
-+++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-+++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
-+++  says this does not fix *his* bug).
-+++- Fix cancel failure bug. Bug #481
-+++- Fix failure when Pool name has spaces. Bug #487   
-+++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-+++- Fix a couple of free()s in src/filed/acl.c
-+++- Fix memory overrun in bfile.c in building OS X resource
-+++  fork filename. Bug #489 
-+++- Add Pool name to SD status output.
-+++
-++ Changes to 1.38.1:
-++ 14Oct05
-++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
-++Index: projects
-++===================================================================
-++RCS file: /cvsroot/bacula/bacula/projects,v
-++retrieving revision 1.12.2.3
-++diff -u -r1.12.2.3 projects
-++--- projects 10 Nov 2005 20:25:27 -0000      1.12.2.3
-+++++ projects 22 Nov 2005 10:42:20 -0000
-++@@ -228,7 +228,175 @@
-++ 
-++   Why:    Performance enhancement.
-++ 
-+++Item 13:  Let Bacula log tape usage and handle drive cleaning cycles.
-+++  Date:   November 11, 2005
-+++  Origin: Arno Lehmann <al at its-lehmann dot de>
-+++  Status:
-+++
-+++  What:   Make Bacula manage tape life cycle information and drive 
-+++          cleaning cycles.
-+++
-+++  Why:    Both parts of this project are important when operating backups.
-+++          We need to know which tapes need replacement, and we need to
-+++          make sure the drives are cleaned when necessary.  While many
-+++          tape libraries and even autoloaders can handle all this
-+++          automatically, support by Bacula can be helpful for smaller
-+++          (older) libraries and single drives.  Also, checking drive
-+++          status during operation can prevent some failures (as I had to
-+++          learn the hard way...)
-+++
-+++  Notes:  First, Bacula could (and even does, to some limited extent)
-+++          record tape and drive usage.  For tapes, the number of mounts,
-+++          the amount of data, and the time the tape has actually been
-+++          running could be recorded.  Data fields for Read and Write time
-+++          and Nmber of mounts already exist in the catalog (I'm not sure
-+++          if VolBytes is the sum of all bytes ever written to that volume
-+++          by Bacula).  This information can be important when determining
-+++          which media to replace.  For the tape drives known to Bacula,
-+++          similar information is interesting to determine the device
-+++          status and expected life time: Time it's been Reading and
-+++          Writing, number of tape Loads / Unloads / Errors.  This
-+++          information is not yet recorded as far as I know.
-+++
-+++          The next step would be implementing drive cleaning setup.
-+++          Bacula already has knowledge about cleaning tapes.  Once it has
-+++          some information about cleaning cycles (measured in drive run
-+++          time, number of tapes used, or calender days, for example) it
-+++          can automatically execute tape cleaning (with an autochanger,
-+++          obviously) or ask for operator assistence loading a cleaning
-+++          tape.
-+++
-+++          The next step would be to implement TAPEALERT checks not only
-+++          when changing tapes and only sending he information to the
-+++          administrator, but rather checking after each tape error,
-+++          checking on a regular basis (for example after each tape file),
-+++          and also before unloading and after loading a new tape.  Then,
-+++          depending on the drives TAPEALERT state and the know drive
-+++          cleaning state Bacula could automatically schedule later
-+++          cleaning, clean immediately, or inform the operator.
-+++
-+++          Implementing this would perhaps require another catalog change
-+++          and perhaps major changes in SD code and the DIR-SD protocoll,
-+++          so I'd only consider this worth implementing if it would
-+++          actually be used or even needed by many people. 
-+++
-+++Item 14:  Merging of multiple backups into a single one. (Also called Synthetic
-+++          Backup or Consolidation).
-+++
-+++  Origin: Marc Cousin and Eric Bollengier 
-+++  Date:   15 November 2005
-+++  Status: Depends on first implementing project Item 1 (Migration).
-+++
-+++  What:   A merged backup is a backup made without connecting to the Client.
-+++          It would be a Merge of existing backups into a single backup.
-+++          In effect, it is like a restore but to the backup medium.
-+++
-+++          For instance, say that last sunday we made a full backup.  Then
-+++          all week long, we created incremental backups, in order to do
-+++          them fast.  Now comes sunday again, and we need another full.
-+++          The merged backup makes it possible to do instead an incremental
-+++          backup (during the night for instance), and then create a merged
-+++          backup during the day, by using the full and incrementals from
-+++          the week.  The merged backup will be exactly like a full made
-+++          sunday night on the tape, but the production interruption on the
-+++          Client will be minimal, as the Client will only have to send
-+++          incrementals.
-+++
-+++          In fact, if it's done correctly, you could merge all the
-+++          Incrementals into single Incremental, or all the Incrementals
-+++          and the last Differential into a new Differential, or the Full,
-+++          last differential and all the Incrementals into a new Full
-+++          backup.  And there is no need to involve the Client.
-+++
-+++  Why:    The benefit is that :
-+++          - the Client just does an incremental ;
-+++          - the merged backup on tape is just as a single full backup,
-+++            and can be restored very fast.
-+++
-+++          This is also a way of reducing the backup data since the old
-+++          data can then be pruned (or not) from the catalog, possibly
-+++          allowing older volumes to be recycled
-+++
-+++Item 15:  Automatic disabling of devices
-+++   Date:   2005-11-11
-+++   Origin: Peter Eriksson <peter at ifm.liu dot se>
-+++   Status:
-+++
-+++   What:  After a configurable amount of fatal errors with a tape drive
-+++          Bacula should automatically disable further use of a certain
-+++          tape drive. There should also be "disable"/"enable" commands in
-+++          the "bconsole" tool.
-+++
-+++   Why:   On a multi-drive jukebox there is a possibility of tape drives
-+++          going bad during large backups (needing a cleaning tape run,
-+++          tapes getting stuck). It would be advantageous if Bacula would
-+++          automatically disable further use of a problematic tape drive
-+++          after a configurable amount of errors has occured.
-+++
-+++          An example: I have a multi-drive jukebox (6 drives, 380+ slots)
-+++          where tapes occasionally get stuck inside the drive. Bacula will
-+++          notice that the "mtx-changer" command will fail and then fail
-+++          any backup jobs trying to use that drive. However, it will still
-+++          keep on trying to run new jobs using that drive and fail -
-+++          forever, and thus failing lots and lots of jobs... Since we have
-+++          many drives Bacula could have just automatically disabled
-+++          further use of that drive and used one of the other ones
-+++          instead.
-+++
-+++
-+++Item 16:  Directive/mode to backup only file changes, not entire file
-+++  Date:   11 November 2005
-+++  Origin: Joshua Kugler <joshua dot kugler at uaf dot edu>
-+++          Marek Bajon <mbajon at bimsplus dot com dot pl>
-+++  Status: RFC
-+++
-+++  What:   Currently when a file changes, the entire file will be backed up in
-+++          the next incremental or full backup.  To save space on the tapes
-+++          it would be nice to have a mode whereby only the changes to the
-+++          file would be backed up when it is changed.
-+++
-+++  Why:    This would save lots of space when backing up large files such as 
-+++          logs, mbox files, Outlook PST files and the like.
-+++
-+++  Notes:  This would require the usage of disk-based volumes as comparing 
-+++          files would not be feasible using a tape drive.
-+++
-+++Item 17:  Quick release of FD-SD connection
-+++  Origin: Frank Volf (frank at deze dot org)
-+++  Date:   17 november 2005
-+++  Status:
-+++
-+++   What:  In the bacula implementation a backup is finished after all data
-+++          and attributes are succesfully written to storage.  When using a
-+++          tape backup it is very annoying that a backup can take a day,
-+++          simply because the current tape (or whatever) is full and the
-+++          administrator has not put a new one in.  During that time the
-+++          system cannot be taken off-line, because there is still an open
-+++          session between the storage daemon and the file daemon on the
-+++          client.
-+++
-+++          Although this is a very good strategey for making "safe backups"
-+++          This can be annoying for e.g.  laptops, that must remain
-+++          connected until the bacukp is completed.
-+++
-+++          Using a new feature called "migration" it will be possible to
-+++          spool first to harddisk (using a special 'spool' migration
-+++          scheme) and then migrate the backup to tape.
-+++
-+++          There is still the problem of getting the attributes committed.
-+++          If it takes a very long time to do, with the current code, the
-+++          job has not terminated, and the File daemon is not freed up.  The
-+++          Storage daemon should release the File daemon as soon as all the
-+++          file data and all the attributes have been sent to it (the SD).
-+++          Currently the SD waits until everything is on tape and all the
-+++          attributes are transmitted to the Director before signalling
-+++          completion to the FD. I don't think I would have any problem
-+++          changing this.  The reason is that even if the FD reports back to
-+++          the Dir that all is OK, the job will not terminate until the SD
-+++          has done the same thing -- so in a way keeping the SD-FD link
-+++          open to the very end is not really very productive ...
-++ 
-+++   Why:   Makes backup of laptops much easier.
-++ 
-++ 
-++ ============= Empty RFC form ===========
-++@@ -245,33 +413,4 @@
-++ ============== End RFC form ==============
-++ 
-++ 
-++-Items completed for release 1.38.0:
-++-#4   Embedded Python Scripting (implemented in all Daemons)
-++-#5   Events that call a Python program (Implemented in all
-++-       daemons, but more cleanup work to be done).
-++-#6   Select one from among Multiple Storage Devices for Job.
-++-       This is already implemented in 1.37.
-++-#7   Single Job Writing to Multiple Storage Devices. This is
-++-       currently implemented with a Clone feature.
-++-#-   Full multiple drive Autochanger support (done in 1.37)
-++-#-   Built in support for communications encryption (TLS) 
-++-       done by Landon Fuller.
-++-#    Support for Unicode characters
-++-       (via UTF-8) on Win32 machines thanks to Thorsten Engel.
-++-Item  8:  Break the one-to-one Relationship between a Job and a
-++-          Specific Storage Device (or Devices if #10 is implemented).
-++-
-++-Completed items from last year's list:
-++-Item 1:   Multiple simultaneous Jobs. (done)
-++-Item 3:   Write the bscan program -- also write a bcopy program (done).
-++-Item 5:   Implement Label templates (done).
-++-Item 6:   Write a regression script (done)
-++-Item 9:   Add SSL to daemon communications (done by Landon Fuller)
-++-Item 10:  Define definitive tape format (done)
-++-Item 3:   GUI for interactive restore. Partially Implemented in 1.34
-++-          Note, there is now a complete Webmin plugin, a partial
-++-          GNOME console, and an excellent wx-console GUI.
-++-Item 4:   GUI for interactive backup
-++-Item 2:   Job Data Spooling.
-++-    Done: Regular expression matching.
-++-Item 10:  New daemon communication protocol (this has been dropped).
-+++Items completed for release 1.38.0 -- see kernsdone
-++Index: autoconf/configure.in
-++===================================================================
-++RCS file: /cvsroot/bacula/bacula/autoconf/configure.in,v
-++retrieving revision 1.184.2.4
-++diff -u -r1.184.2.4 configure.in
-++--- autoconf/configure.in    13 Nov 2005 10:51:17 -0000      1.184.2.4
-+++++ autoconf/configure.in    22 Nov 2005 10:42:21 -0000
-++@@ -604,7 +604,7 @@
-++   PYTHON_LIBS=
-++   if test "$withval" != "no"; then
-++      if test "$withval" = "yes"; then
-++-    for python_root in /usr /usr/local; do
-+++    for python_root in /usr /usr/local /usr/sfw; do
-++       if test -f $python_root/include/python2.2/Python.h; then
-++          PYTHON_INCDIR=-I$python_root/include/python2.2
-++          PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
-++Index: patches/1.38.1-to-1.38.2.patch
-++===================================================================
-++RCS file: patches/1.38.1-to-1.38.2.patch
-++diff -N patches/1.38.1-to-1.38.2.patch
-++--- /dev/null        1 Jan 1970 00:00:00 -0000
-+++++ patches/1.38.1-to-1.38.2.patch   22 Nov 2005 10:42:22 -0000
-++@@ -0,0 +1,4586 @@
-+++
-+++ This patch fixes the following bugs:
-+++
-+++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-+++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
-+++  says that this patch does not fix his problem)
-+++- Fix cancel failure bug. Bug #481
-+++- Fix failure when Pool name has spaces. Bug #487
-+++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-+++- Fix a couple of free()s in src/filed/acl.c
-+++- Fix memory overrun in bfile.c in building OS X resource
-+++  fork filename. Bug #489
-+++
-+++This patch is applied to Bacula source version 1.38.1 and will
-+++produce Bacula source version 1.38.2.  Apply it with:
-+++
-+++   cd <bacula-1.38.1-source>
-+++   ./configure (your options) if not already done
-+++   patch -p0 <1.38.1-to-1.38.2.patch
-+++   make
-+++   make install
-+++
-+++? osx_finder.patch
-+++Index: ChangeLog
-+++===================================================================
-+++RCS file: /cvsroot/bacula/bacula/ChangeLog,v
-+++retrieving revision 1.154.2.7
-+++diff -u -r1.154.2.7 ChangeLog
-+++--- ChangeLog       15 Nov 2005 09:27:19 -0000      1.154.2.7
-++++++ ChangeLog       21 Nov 2005 18:19:03 -0000
-+++@@ -1,4 +1,14 @@
-+++ 
-++++Changes to 1.38.2:
-++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-++++- Fix bnet-server bug found on OpenBSD. Bug #486
-++++- Fix cancel failure bug. Bug #481
-++++- Fix failure when Pool name has spaces. Bug #487   
-++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-++++- Fix a couple of free()s in src/filed/acl.c
-++++- Fix memory overrun in bfile.c in building OS X resource
-++++  fork filename. Bug #489 
-++++- Add Pool name to SD status output.
-+++ 
-+++ Changes to 1.38.1:
-+++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
-+++Index: ReleaseNotes
-+++===================================================================
-+++RCS file: /cvsroot/bacula/bacula/ReleaseNotes,v
-+++retrieving revision 1.147.2.9
-+++diff -u -r1.147.2.9 ReleaseNotes
-+++--- ReleaseNotes    15 Nov 2005 09:27:19 -0000      1.147.2.9
-++++++ ReleaseNotes    21 Nov 2005 18:19:04 -0000
-+++@@ -1,10 +1,21 @@
-+++ 
-+++-          Release Notes for Bacula 1.38.1
-++++          Release Notes for Bacula 1.38.2
-+++ 
-+++   Bacula code: Total files = 420 Total lines = 138,440 (*.h *.c *.in)
-+++       20,440 additional lines of code since version 1.36.3
-+++ 
-+++-Changes since 1.38.0:
-++++Changes to 1.38.2:
-++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-++++- Fix bnet-server bug found on OpenBSD. Bug #486
-++++- Fix cancel failure bug. Bug #481
-++++- Fix failure when Pool name has spaces. Bug #487   
-++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-++++- Fix a couple of free()s in src/filed/acl.c
-++++- Fix memory overrun in bfile.c in building OS X resource
-++++  fork filename. Bug #489 
-++++- Add Pool name to SD status output.
-++++
-++++Changes to 1.38.1:
-+++ - Corrected ACL for Solaris (David Duchscher and Attila Fulop).
-+++ - Add bacula_mail_summary.sh to examples directory. It makes
-+++   a single email summary of any number of jobs. Submitted
-+++Index: kernstodo
-+++===================================================================
-+++RCS file: /cvsroot/bacula/bacula/kernstodo,v
-+++retrieving revision 1.570.2.6
-+++diff -u -r1.570.2.6 kernstodo
-+++--- kernstodo       4 Nov 2005 09:16:49 -0000       1.570.2.6
-++++++ kernstodo       21 Nov 2005 18:19:04 -0000
-+++@@ -1,5 +1,5 @@
-+++                     Kern's ToDo List
-+++-                     03 November 2005
-++++                     21 November 2005
-+++ 
-+++ Major development:      
-+++ Project                     Developer
-+++@@ -7,8 +7,6 @@
-+++ Version 1.37                Kern (see below)
-+++ ========================================================
-+++ 
-+++-Final items for 1.37 before release:
-+++-
-+++ Document:
-+++ - Does ClientRunAfterJob fail the job on a bad return code?
-+++ - Document cleaning up the spool files:
-+++@@ -18,6 +16,8 @@
-+++ - Does WildFile match against full name?  Doc.
-+++ 
-+++ For 1.39:
-++++- Make sure that all do_prompt() calls in Dir check for
-++++  -1 (error) and -2 (cancel) returns.
-+++ - Look at -D_FORTIFY_SOURCE=2
-+++ - Add Win32 FileSet definition somewhere
-+++ - Look at fixing restore status stats in SD.
-+++@@ -27,6 +27,12 @@
-+++   encountered, read many times (as it currently does), and if the
-+++   block cannot be read, skip to the next block, and try again.  If
-+++   that fails, skip to the next file and try again, ...
-++++- Add level table:
-++++  create table LevelType (LevelType binary(1), LevelTypeLong tinyblob);
-++++  insert into LevelType (LevelType,LevelTypeLong) values
-++++  ("F","Full"),
-++++  ("D","Diff"),
-++++  ("I","Inc");
-+++ - Add ACL to restore only to original location.
-+++ - Add a recursive mark command (rmark) to restore.
-+++ - "Minimum Job Interval = nnn" sets minimum interval between Jobs
-+++@@ -1246,219 +1252,4 @@
-+++ ====
-+++ 
-+++ 
-+++-=== Done
-+++-- Save mount point for directories not traversed with onefs=yes.
-+++-- Add seconds to start and end times in the Job report output.
-+++-- if 2 concurrent backups are attempted on the same tape
-+++-  drive (autoloader) into different tape pools, one of them will exit
-+++-  fatally instead of halting until the drive is idle
-+++-- Update StartTime if job held in Job Queue.
-+++-- Look at www.nu2.nu/pebuilder as a helper for full windows
-+++-  bare metal restore. (done by Scott)
-+++-- Fix orphanned buffers:
-+++-   Orphaned buffer:      24 bytes allocated at line 808 of rufus-dir job.c
-+++-   Orphaned buffer:      40 bytes allocated at line 45 of rufus-dir alist.c
-+++-- Implement Preben's suggestion to add
-+++-  File System Types = ext2, ext3 
-+++-  to FileSets, thus simplifying backup of *all* local partitions.
-+++-- Try to open a device on each Job if it was not opened
-+++-  when the SD started.
-+++-- Add dump of VolSessionId/Time and FileIndex with bls.
-+++-- If Bacula does not find the right tape in the Autochanger,
-+++-  then mark the tape in error and move on rather than asking
-+++-  for operator intervention.
-+++-- Cancel command should include JobId in list of Jobs.
-+++-- Add performance testing hooks
-+++-- Bootstrap from JobMedia records.
-+++-- Implement WildFile and WildDir to solve problem of 
-+++-  saving only *.doc files.
-+++-- Fix
-+++-   Please use the "label"  command to create a new Volume for:
-+++-       Storage:      DDS-4-changer
-+++-       Media type:   
-+++-       Pool:         Default
-+++-   label
-+++-   The defined Storage resources are:
-+++-- Copy Changer Device and Changer Command from Autochanger
-+++-  to Device resource in SD if none given in Device resource.
-+++-- 1. Automatic use of more than one drive in an autochanger (done)
-+++-- 2. Automatic selection of the correct drive for each Job (i.e.
-+++-     selects a drive with an appropriate Volume for the Job) (done)
-+++-- 6. Allow multiple simultaneous Jobs referencing the same pool write
-+++-    to several tapes (some new directive(s) are are probably needed for
-+++-    this) (done)
-+++-- Locking (done)
-+++-- Key on Storage rather than Pool (done)
-+++-- Allow multiple drives to use same Pool (change jobq.c DIR) (done).
-+++-- Synchronize multiple drives so that not more
-+++-  than one loads a tape and any time (done)
-+++-- 4. Use Changer Device and Changer Command specified in the
-+++-     Autochanger resource, if none is found in the Device resource.
-+++-    You can continue to specify them in the Device resource if you want
-+++-    or need them to be different for each device.
-+++-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") 
-+++-    that can allow a Device be part of an Autochanger, and hence the changer
-+++-    script protected, but if set to no, will prevent the Device from being 
-+++-    automatically selected from the changer. This allows the device to
-+++-    be directly accessed through its Device name, but not through the
-+++-    AutoChanger name.
-+++-#6   Select one from among Multiple Storage Devices for Job
-+++-#5   Events that call a Python program 
-+++-     (Implemented in Dir/SD)
-+++-- Make sure the Device name is in the Query packet returned.
-+++-- Don't start a second file job if one is already running.
-+++-- Implement EOF/EOV labels for ANSI labels
-+++-- Implement IBM labels.
-+++-- When Python creates a new label, the tape is immediately
-+++-  recycled and no label created. This happens when using   
-+++-  autolabeling -- even when Python doesn't generate the name.
-+++-- Scratch Pool where the volumes can be re-assigned to any Pool.
-+++-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) 
-+++-  is busy reading. Job 6 canceled.
-+++-- Remove separate thread for opening devices in SD.  On the other
-+++-  hand, don't block waiting for open() for devices.
-+++-- Fix code to either handle updating NumVol or to calculate it in
-+++-  Dir next_vol.c
-+++-- Ensure that you cannot exclude a directory or a file explicitly
-+++-  Included with File.
-+++-#4   Embedded Python Scripting 
-+++-     (Implemented in Dir/SD/FD)
-+++-- Add Python writable variable for changing the Priority,
-+++-    Client, Storage, JobStatus (error), ...
-+++-- SD Python
-+++-  - Solicit Events
-+++-- Add disk seeking on restore; turn off seek on tapes.
-+++-  stored/match_bsr.c
-+++-- Look at dird_conf.c:1000: warning: `int size' 
-+++-  might be used uninitialized in this function
-+++-- Indicate when a Job is purged/pruned during restore.
-+++-- Implement some way to turn off automatic pruning in Jobs.
-+++-- Implement a way an Admin Job can prune, possibly multiple
-+++-  clients -- Python script?
-+++-- Look at Preben's acl.c error handling code.
-+++-- SD crashes after a tape restore then doing a backup. 
-+++-- If drive is opened read/write, close it and re-open
-+++-  read-only if doing a restore, and vice-versa.
-+++-- Windows restore:
-+++-  data-fd: RestoreFiles.2004-12-07_15.56.42 Error:
-+++-  > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der
-+++-  > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen
-+++-  > Prozess verwendet wird.
-+++-  Restore restores all files, but then fails at the end trying
-+++-  to set the attributes of e:
-+++-  from failed jobs.- Resolve the problem between Device name and Archive name,
-+++-  and fix SD messages.
-+++-- Tell the "restore" user when browsing is no longer possible.
-+++-- Add a restore directory-x
-+++-- Write non-optimized bsrs from the JobMedia and Media records,
-+++-  even after Files are pruned.
-+++-- Delete Stripe and Copy from VolParams to save space.
-+++-- Fix option 2 of restore -- list where file is backed up -- require Client,
-+++-  then list last 20 backups.
-+++-- Finish implementation of passing all Storage and Device needs to
-+++-  the SD.
-+++-- Move test for max wait time exceeded in job.c up -- Peter's idea.
-+++-##   Consider moving docs to their own project.
-+++-##   Move rescue to its own project.
-+++-- Add client version to the Client name line that prints in
-+++-  the Job report.
-+++-- Fix the Rescue CDROM.
-+++-- By the way: on page http://www.bacula.org/?page=tapedrives , at the 
-+++-  bottom, the link to "Tape Testing Chapter" is broken. It goes to 
-+++-  /html-manual/... while the others point to /rel-manual/...
-+++-- Device resource needs the "name" of the SD.
-+++-- Specify a single directory to restore.
-+++-- Implement MediaType keyword in bsr?   
-+++-- Add a date and time stamp at the beginning of every line in the 
-+++-  Job report (Volker Sauer).
-+++-- Add level to estimate command.
-+++-- Add "limit=n" for "list jobs"
-+++-- Make bootstrap filename unique.
-+++-- Make Dmsg look at global before calling subroutine.
-+++-- From Chris Hull:
-+++-   it seems to be complaining about 12:00pm which should be a valid 12
-+++-   hour time.  I changed the time to 11:59am and everything works fine.
-+++-   Also 12:00am works fine.  0:00pm also works (which I don't think
-+++-   should).  None of the values 12:00pm - 12:59pm work for that matter.
-+++-- Require restore via the restore command or make a restore Job
-+++-  get the bootstrap file.
-+++-- Implement Maximum Job Spool Size
-+++-- Fix 3993 error in SD. It forgets to look at autochanger
-+++-  resource for device command, ...
-+++-- 3. Prevent two drives requesting the same Volume in any given
-+++-     autochanger, by checking if a Volume is mounted on another drive
-+++-     in an Autochanger.
-+++-- Upgrade to MySQL 4.1.12 See:  
-+++-  http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html
-+++-- Add # Job Level date to bsr file
-+++-- Implement "PreferMountedVolumes = yes|no" in Job resource.
-+++-##   Integrate web-bacula into a new Bacula project with
-+++-     bimagemgr.
-+++-- Cleaning tapes should have Status "Cleaning" rather than append.
-+++-- Make sure that Python has access to Client address/port so that
-+++-  it can check if Clients are alive.
-+++-- Review all items in "restore".
-+++-- Fix PostgreSQL GROUP BY problems in restore.
-+++-- Fix PostgreSQL sql problems in bugs.
-+++-- After rename
-+++-  04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume 
-+++-     "DLT-13Feb04".
-+++-  Current Volume "DLT-04Jul05" not acceptable because:
-+++-  1997 Volume "DLT-13Feb04" not in catalog.
-+++-  04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device 
-+++-     "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02
-+++-##   Create a new GUI chapter explaining all the GUI programs.
-+++--    Make "update slots" when pointing to Autochanger, remove
-+++-     all Volumes from other drives.  "update slots all-drives"?
-+++-     No, this is done by modifying mtx-changer to list what is
-+++-     in the drives.
-+++-- Finish TLS implementation.
-+++-- Port limiting -m in iptables to prevent DoS attacks
-+++-  could cause broken pipes on Bacula.
-+++-6. Build and test the Volume Shadow Copy (VSS) for Win32. 
-+++--  Allow cancel of unknown Job
-+++--  State not saved when closing Win32 FD by icon
-+++--  bsr-opt-test fails. bsr deleted. Fix.
-+++--  Move Python daemon variables from Job to Bacula object.
-+++-   WorkingDir, ConfigFile
-+++-- Document that Bootstrap files can be written with cataloging
-+++-  turned off.
-+++-- Document details of ANSI/IBM labels
-+++-- OS linux 2.4
-+++-  1) ADIC, DLT, FastStor 4000, 7*20GB
-+++-- Linux Sony LIB-D81, AIT-3 library works.
-+++-- Doc the following
-+++-  to activate, check or disable the hardware compression feature on my 
-+++-  exb-8900 i use the exabyte "MammothTool" you can get it here:
-+++-  http://www.exabyte.com/support/online/downloads/index.cfm
-+++-  There is a solaris version of this tool. With option -C 0 or 1 you can 
-+++-  disable or activate compression. Start this tool without any options for 
-+++-  a small reference.
-+++-- Document Heartbeat Interval in the dealing with firewalls section.
-+++-- Document new CDROM directory.
-+++-- On Win32 working directory must have drive letter ????
-+++-- On Win32 working directory must be writable by SYSTEM to
-+++-  do restores.
-+++-- Document that ChangerDevice is used for Alert command.
-+++-- Add better documentation on how restores can be done
-+++-8. Take one more try at making DVD writing work (no go)
-+++-7. Write a bacula-web document
-+++-- Why isn't the DEVICE structure defined when doing
-+++-  a reservation?
-+++-- Multi-drive changer seems to only use drive 0
-+++-  Multiple drives don't seem to be opened.
-+++-- My database is growing
-+++-- Call GetLastError() in the berrno constructor rather
-+++-  than delaying until strerror.
-+++-- Tape xxx in drive 0, requested in drive 1
-+++-- The mount command does not work with drives other than 0.
-+++-- A mount should cause the SD to re-examine what Slot is   
-+++-  loaded.
-+++-- The SD locks on to the first available drive then
-+++-  wants a Volume that is released but in another drive --
-+++-  chaos.
-+++-- Run the regression scripts on Solaris and FreeBSD
-+++--  Figure out how to package gui, and rescue programs.
-+++-- Add a .dir command to restore tree code to eliminate the problem
-+++-- Mount after manually unloading changer causes hang in SD
-+++-- Fix JobACL with restore by JobId.
-++++=== Done -- see kernsdone
-+++Index: kes-1.38
-+++===================================================================
-+++RCS file: /cvsroot/bacula/bacula/kes-1.38,v
-+++retrieving revision 1.1.2.13
-+++diff -u -r1.1.2.13 kes-1.38
-+++--- kes-1.38        14 Nov 2005 20:20:38 -0000      1.1.2.13
-++++++ kes-1.38        21 Nov 2005 18:19:04 -0000
-+++@@ -3,6 +3,19 @@
-+++ 
-+++ General:
-+++ 
-++++Changes to 1.38.2:
-++++20Oct05
-++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
-++++  says this does not fix *his* bug).
-++++- Fix cancel failure bug. Bug #481
-++++- Fix failure when Pool name has spaces. Bug #487   
-++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-++++- Fix a couple of free()s in src/filed/acl.c
-++++- Fix memory overrun in bfile.c in building OS X resource
-++++  fork filename. Bug #489 
-++++- Add Pool name to SD status output.
-++++
-+++ Changes to 1.38.1:
-+++ 14Oct05
-+++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
-+++Index: projects
-+++===================================================================
-+++RCS file: /cvsroot/bacula/bacula/projects,v
-+++retrieving revision 1.12.2.3
-+++diff -u -r1.12.2.3 projects
-+++--- projects        10 Nov 2005 20:25:27 -0000      1.12.2.3
-++++++ projects        21 Nov 2005 18:19:05 -0000
-+++@@ -228,7 +228,175 @@
-+++ 
-+++   Why:    Performance enhancement.
-+++ 
-++++Item 13:  Let Bacula log tape usage and handle drive cleaning cycles.
-++++  Date:   November 11, 2005
-++++  Origin: Arno Lehmann <al at its-lehmann dot de>
-++++  Status:
-++++
-++++  What:   Make Bacula manage tape life cycle information and drive 
-++++          cleaning cycles.
-++++
-++++  Why:    Both parts of this project are important when operating backups.
-++++          We need to know which tapes need replacement, and we need to
-++++          make sure the drives are cleaned when necessary.  While many
-++++          tape libraries and even autoloaders can handle all this
-++++          automatically, support by Bacula can be helpful for smaller
-++++          (older) libraries and single drives.  Also, checking drive
-++++          status during operation can prevent some failures (as I had to
-++++          learn the hard way...)
-++++
-++++  Notes:  First, Bacula could (and even does, to some limited extent)
-++++          record tape and drive usage.  For tapes, the number of mounts,
-++++          the amount of data, and the time the tape has actually been
-++++          running could be recorded.  Data fields for Read and Write time
-++++          and Nmber of mounts already exist in the catalog (I'm not sure
-++++          if VolBytes is the sum of all bytes ever written to that volume
-++++          by Bacula).  This information can be important when determining
-++++          which media to replace.  For the tape drives known to Bacula,
-++++          similar information is interesting to determine the device
-++++          status and expected life time: Time it's been Reading and
-++++          Writing, number of tape Loads / Unloads / Errors.  This
-++++          information is not yet recorded as far as I know.
-++++
-++++          The next step would be implementing drive cleaning setup.
-++++          Bacula already has knowledge about cleaning tapes.  Once it has
-++++          some information about cleaning cycles (measured in drive run
-++++          time, number of tapes used, or calender days, for example) it
-++++          can automatically execute tape cleaning (with an autochanger,
-++++          obviously) or ask for operator assistence loading a cleaning
-++++          tape.
-++++
-++++          The next step would be to implement TAPEALERT checks not only
-++++          when changing tapes and only sending he information to the
-++++          administrator, but rather checking after each tape error,
-++++          checking on a regular basis (for example after each tape file),
-++++          and also before unloading and after loading a new tape.  Then,
-++++          depending on the drives TAPEALERT state and the know drive
-++++          cleaning state Bacula could automatically schedule later
-++++          cleaning, clean immediately, or inform the operator.
-++++
-++++          Implementing this would perhaps require another catalog change
-++++          and perhaps major changes in SD code and the DIR-SD protocoll,
-++++          so I'd only consider this worth implementing if it would
-++++          actually be used or even needed by many people. 
-++++
-++++Item 14:  Merging of multiple backups into a single one. (Also called Synthetic
-++++          Backup or Consolidation).
-++++
-++++  Origin: Marc Cousin and Eric Bollengier 
-++++  Date:   15 November 2005
-++++  Status: Depends on first implementing project Item 1 (Migration).
-++++
-++++  What:   A merged backup is a backup made without connecting to the Client.
-++++          It would be a Merge of existing backups into a single backup.
-++++          In effect, it is like a restore but to the backup medium.
-++++
-++++          For instance, say that last sunday we made a full backup.  Then
-++++          all week long, we created incremental backups, in order to do
-++++          them fast.  Now comes sunday again, and we need another full.
-++++          The merged backup makes it possible to do instead an incremental
-++++          backup (during the night for instance), and then create a merged
-++++          backup during the day, by using the full and incrementals from
-++++          the week.  The merged backup will be exactly like a full made
-++++          sunday night on the tape, but the production interruption on the
-++++          Client will be minimal, as the Client will only have to send
-++++          incrementals.
-++++
-++++          In fact, if it's done correctly, you could merge all the
-++++          Incrementals into single Incremental, or all the Incrementals
-++++          and the last Differential into a new Differential, or the Full,
-++++          last differential and all the Incrementals into a new Full
-++++          backup.  And there is no need to involve the Client.
-++++
-++++  Why:    The benefit is that :
-++++          - the Client just does an incremental ;
-++++          - the merged backup on tape is just as a single full backup,
-++++            and can be restored very fast.
-++++
-++++          This is also a way of reducing the backup data since the old
-++++          data can then be pruned (or not) from the catalog, possibly
-++++          allowing older volumes to be recycled
-++++
-++++Item 15:  Automatic disabling of devices
-++++   Date:   2005-11-11
-++++   Origin: Peter Eriksson <peter at ifm.liu dot se>
-++++   Status:
-++++
-++++   What:  After a configurable amount of fatal errors with a tape drive
-++++          Bacula should automatically disable further use of a certain
-++++          tape drive. There should also be "disable"/"enable" commands in
-++++          the "bconsole" tool.
-++++
-++++   Why:   On a multi-drive jukebox there is a possibility of tape drives
-++++          going bad during large backups (needing a cleaning tape run,
-++++          tapes getting stuck). It would be advantageous if Bacula would
-++++          automatically disable further use of a problematic tape drive
-++++          after a configurable amount of errors has occured.
-++++
-++++          An example: I have a multi-drive jukebox (6 drives, 380+ slots)
-++++          where tapes occasionally get stuck inside the drive. Bacula will
-++++          notice that the "mtx-changer" command will fail and then fail
-++++          any backup jobs trying to use that drive. However, it will still
-++++          keep on trying to run new jobs using that drive and fail -
-++++          forever, and thus failing lots and lots of jobs... Since we have
-++++          many drives Bacula could have just automatically disabled
-++++          further use of that drive and used one of the other ones
-++++          instead.
-++++
-++++
-++++Item 16:  Directive/mode to backup only file changes, not entire file
-++++  Date:   11 November 2005
-++++  Origin: Joshua Kugler <joshua dot kugler at uaf dot edu>
-++++          Marek Bajon <mbajon at bimsplus dot com dot pl>
-++++  Status: RFC
-++++
-++++  What:   Currently when a file changes, the entire file will be backed up in
-++++          the next incremental or full backup.  To save space on the tapes
-++++          it would be nice to have a mode whereby only the changes to the
-++++          file would be backed up when it is changed.
-++++
-++++  Why:    This would save lots of space when backing up large files such as 
-++++          logs, mbox files, Outlook PST files and the like.
-++++
-++++  Notes:  This would require the usage of disk-based volumes as comparing 
-++++          files would not be feasible using a tape drive.
-++++
-++++Item 17:  Quick release of FD-SD connection
-++++  Origin: Frank Volf (frank at deze dot org)
-++++  Date:   17 november 2005
-++++  Status:
-++++
-++++   What:  In the bacula implementation a backup is finished after all data
-++++          and attributes are succesfully written to storage.  When using a
-++++          tape backup it is very annoying that a backup can take a day,
-++++          simply because the current tape (or whatever) is full and the
-++++          administrator has not put a new one in.  During that time the
-++++          system cannot be taken off-line, because there is still an open
-++++          session between the storage daemon and the file daemon on the
-++++          client.
-++++
-++++          Although this is a very good strategey for making "safe backups"
-++++          This can be annoying for e.g.  laptops, that must remain
-++++          connected until the bacukp is completed.
-++++
-++++          Using a new feature called "migration" it will be possible to
-++++          spool first to harddisk (using a special 'spool' migration
-++++          scheme) and then migrate the backup to tape.
-++++
-++++          There is still the problem of getting the attributes committed.
-++++          If it takes a very long time to do, with the current code, the
-++++          job has not terminated, and the File daemon is not freed up.  The
-++++          Storage daemon should release the File daemon as soon as all the
-++++          file data and all the attributes have been sent to it (the SD).
-++++          Currently the SD waits until everything is on tape and all the
-++++          attributes are transmitted to the Director before signalling
-++++          completion to the FD. I don't think I would have any problem
-++++          changing this.  The reason is that even if the FD reports back to
-++++          the Dir that all is OK, the job will not terminate until the SD
-++++          has done the same thing -- so in a way keeping the SD-FD link
-++++          open to the very end is not really very productive ...
-+++ 
-++++   Why:   Makes backup of laptops much easier.
-+++ 
-+++ 
-+++ ============= Empty RFC form ===========
-+++@@ -245,33 +413,4 @@
-+++ ============== End RFC form ==============
-+++ 
-+++ 
-+++-Items completed for release 1.38.0:
-+++-#4   Embedded Python Scripting (implemented in all Daemons)
-+++-#5   Events that call a Python program (Implemented in all
-+++-       daemons, but more cleanup work to be done).
-+++-#6   Select one from among Multiple Storage Devices for Job.
-+++-       This is already implemented in 1.37.
-+++-#7   Single Job Writing to Multiple Storage Devices. This is
-+++-       currently implemented with a Clone feature.
-+++-#-   Full multiple drive Autochanger support (done in 1.37)
-+++-#-   Built in support for communications encryption (TLS) 
-+++-       done by Landon Fuller.
-+++-#    Support for Unicode characters
-+++-       (via UTF-8) on Win32 machines thanks to Thorsten Engel.
-+++-Item  8:  Break the one-to-one Relationship between a Job and a
-+++-          Specific Storage Device (or Devices if #10 is implemented).
-+++-
-+++-Completed items from last year's list:
-+++-Item 1:   Multiple simultaneous Jobs. (done)
-+++-Item 3:   Write the bscan program -- also write a bcopy program (done).
-+++-Item 5:   Implement Label templates (done).
-+++-Item 6:   Write a regression script (done)
-+++-Item 9:   Add SSL to daemon communications (done by Landon Fuller)
-+++-Item 10:  Define definitive tape format (done)
-+++-Item 3:   GUI for interactive restore. Partially Implemented in 1.34
-+++-          Note, there is now a complete Webmin plugin, a partial
-+++-          GNOME console, and an excellent wx-console GUI.
-+++-Item 4:   GUI for interactive backup
-+++-Item 2:   Job Data Spooling.
-+++-    Done: Regular expression matching.
-+++-Item 10:  New daemon communication protocol (this has been dropped).
-++++Items completed for release 1.38.0 -- see kernsdone
-+++Index: patches/1.38.1-to-1.38.2.patch
-+++===================================================================
-+++RCS file: patches/1.38.1-to-1.38.2.patch
-+++diff -N patches/1.38.1-to-1.38.2.patch
-+++--- /dev/null       1 Jan 1970 00:00:00 -0000
-++++++ patches/1.38.1-to-1.38.2.patch  21 Nov 2005 18:19:05 -0000
-+++@@ -0,0 +1,3528 @@
-++++
-++++ This patch fixes the following bugs:
-++++
-++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
-++++  says that this patch does not fix his problem)
-++++- Fix cancel failure bug. Bug #481
-++++- Fix failure when Pool name has spaces. Bug #487
-++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-++++- Fix a couple of free()s in src/filed/acl.c
-++++- Fix memory overrun in bfile.c in building OS X resource
-++++  fork filename. Bug #489
-++++
-++++This patch is applied to Bacula source version 1.38.1 and will
-++++produce Bacula source version 1.38.2.  Apply it with:
-++++
-++++   cd <bacula-1.38.1-source>
-++++   ./configure (your options) if not already done
-++++   patch -p0 <1.38.1-to-1.38.2.patch
-++++   make
-++++   make install
-++++
-++++? osx_finder.patch
-++++Index: ChangeLog
-++++===================================================================
-++++RCS file: /cvsroot/bacula/bacula/ChangeLog,v
-++++retrieving revision 1.154.2.7
-++++diff -u -r1.154.2.7 ChangeLog
-++++--- ChangeLog      15 Nov 2005 09:27:19 -0000      1.154.2.7
-+++++++ ChangeLog      21 Nov 2005 13:17:56 -0000
-++++@@ -1,4 +1,14 @@
-++++ 
-+++++Changes to 1.38.2:
-+++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-+++++- Fix bnet-server bug found on OpenBSD. Bug #486
-+++++- Fix cancel failure bug. Bug #481
-+++++- Fix failure when Pool name has spaces. Bug #487   
-+++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-+++++- Fix a couple of free()s in src/filed/acl.c
-+++++- Fix memory overrun in bfile.c in building OS X resource
-+++++  fork filename. Bug #489 
-+++++- Add Pool name to SD status output.
-++++ 
-++++ Changes to 1.38.1:
-++++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
-++++Index: ReleaseNotes
-++++===================================================================
-++++RCS file: /cvsroot/bacula/bacula/ReleaseNotes,v
-++++retrieving revision 1.147.2.9
-++++diff -u -r1.147.2.9 ReleaseNotes
-++++--- ReleaseNotes   15 Nov 2005 09:27:19 -0000      1.147.2.9
-+++++++ ReleaseNotes   21 Nov 2005 13:17:57 -0000
-++++@@ -1,10 +1,21 @@
-++++ 
-++++-          Release Notes for Bacula 1.38.1
-+++++          Release Notes for Bacula 1.38.2
-++++ 
-++++   Bacula code: Total files = 420 Total lines = 138,440 (*.h *.c *.in)
-++++       20,440 additional lines of code since version 1.36.3
-++++ 
-++++-Changes since 1.38.0:
-+++++Changes to 1.38.2:
-+++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-+++++- Fix bnet-server bug found on OpenBSD. Bug #486
-+++++- Fix cancel failure bug. Bug #481
-+++++- Fix failure when Pool name has spaces. Bug #487   
-+++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-+++++- Fix a couple of free()s in src/filed/acl.c
-+++++- Fix memory overrun in bfile.c in building OS X resource
-+++++  fork filename. Bug #489 
-+++++- Add Pool name to SD status output.
-+++++
-+++++Changes to 1.38.1:
-++++ - Corrected ACL for Solaris (David Duchscher and Attila Fulop).
-++++ - Add bacula_mail_summary.sh to examples directory. It makes
-++++   a single email summary of any number of jobs. Submitted
-++++Index: kernstodo
-++++===================================================================
-++++RCS file: /cvsroot/bacula/bacula/kernstodo,v
-++++retrieving revision 1.570.2.6
-++++diff -u -r1.570.2.6 kernstodo
-++++--- kernstodo      4 Nov 2005 09:16:49 -0000       1.570.2.6
-+++++++ kernstodo      21 Nov 2005 13:17:57 -0000
-++++@@ -1,5 +1,5 @@
-++++                     Kern's ToDo List
-++++-                     03 November 2005
-+++++                     21 November 2005
-++++ 
-++++ Major development:      
-++++ Project                     Developer
-++++@@ -7,8 +7,6 @@
-++++ Version 1.37                Kern (see below)
-++++ ========================================================
-++++ 
-++++-Final items for 1.37 before release:
-++++-
-++++ Document:
-++++ - Does ClientRunAfterJob fail the job on a bad return code?
-++++ - Document cleaning up the spool files:
-++++@@ -18,6 +16,8 @@
-++++ - Does WildFile match against full name?  Doc.
-++++ 
-++++ For 1.39:
-+++++- Make sure that all do_prompt() calls in Dir check for
-+++++  -1 (error) and -2 (cancel) returns.
-++++ - Look at -D_FORTIFY_SOURCE=2
-++++ - Add Win32 FileSet definition somewhere
-++++ - Look at fixing restore status stats in SD.
-++++@@ -27,6 +27,12 @@
-++++   encountered, read many times (as it currently does), and if the
-++++   block cannot be read, skip to the next block, and try again.  If
-++++   that fails, skip to the next file and try again, ...
-+++++- Add level table:
-+++++  create table LevelType (LevelType binary(1), LevelTypeLong tinyblob);
-+++++  insert into LevelType (LevelType,LevelTypeLong) values
-+++++  ("F","Full"),
-+++++  ("D","Diff"),
-+++++  ("I","Inc");
-++++ - Add ACL to restore only to original location.
-++++ - Add a recursive mark command (rmark) to restore.
-++++ - "Minimum Job Interval = nnn" sets minimum interval between Jobs
-++++@@ -1246,219 +1252,4 @@
-++++ ====
-++++ 
-++++ 
-++++-=== Done
-++++-- Save mount point for directories not traversed with onefs=yes.
-++++-- Add seconds to start and end times in the Job report output.
-++++-- if 2 concurrent backups are attempted on the same tape
-++++-  drive (autoloader) into different tape pools, one of them will exit
-++++-  fatally instead of halting until the drive is idle
-++++-- Update StartTime if job held in Job Queue.
-++++-- Look at www.nu2.nu/pebuilder as a helper for full windows
-++++-  bare metal restore. (done by Scott)
-++++-- Fix orphanned buffers:
-++++-   Orphaned buffer:      24 bytes allocated at line 808 of rufus-dir job.c
-++++-   Orphaned buffer:      40 bytes allocated at line 45 of rufus-dir alist.c
-++++-- Implement Preben's suggestion to add
-++++-  File System Types = ext2, ext3 
-++++-  to FileSets, thus simplifying backup of *all* local partitions.
-++++-- Try to open a device on each Job if it was not opened
-++++-  when the SD started.
-++++-- Add dump of VolSessionId/Time and FileIndex with bls.
-++++-- If Bacula does not find the right tape in the Autochanger,
-++++-  then mark the tape in error and move on rather than asking
-++++-  for operator intervention.
-++++-- Cancel command should include JobId in list of Jobs.
-++++-- Add performance testing hooks
-++++-- Bootstrap from JobMedia records.
-++++-- Implement WildFile and WildDir to solve problem of 
-++++-  saving only *.doc files.
-++++-- Fix
-++++-   Please use the "label"  command to create a new Volume for:
-++++-       Storage:      DDS-4-changer
-++++-       Media type:   
-++++-       Pool:         Default
-++++-   label
-++++-   The defined Storage resources are:
-++++-- Copy Changer Device and Changer Command from Autochanger
-++++-  to Device resource in SD if none given in Device resource.
-++++-- 1. Automatic use of more than one drive in an autochanger (done)
-++++-- 2. Automatic selection of the correct drive for each Job (i.e.
-++++-     selects a drive with an appropriate Volume for the Job) (done)
-++++-- 6. Allow multiple simultaneous Jobs referencing the same pool write
-++++-    to several tapes (some new directive(s) are are probably needed for
-++++-    this) (done)
-++++-- Locking (done)
-++++-- Key on Storage rather than Pool (done)
-++++-- Allow multiple drives to use same Pool (change jobq.c DIR) (done).
-++++-- Synchronize multiple drives so that not more
-++++-  than one loads a tape and any time (done)
-++++-- 4. Use Changer Device and Changer Command specified in the
-++++-     Autochanger resource, if none is found in the Device resource.
-++++-    You can continue to specify them in the Device resource if you want
-++++-    or need them to be different for each device.
-++++-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") 
-++++-    that can allow a Device be part of an Autochanger, and hence the changer
-++++-    script protected, but if set to no, will prevent the Device from being 
-++++-    automatically selected from the changer. This allows the device to
-++++-    be directly accessed through its Device name, but not through the
-++++-    AutoChanger name.
-++++-#6   Select one from among Multiple Storage Devices for Job
-++++-#5   Events that call a Python program 
-++++-     (Implemented in Dir/SD)
-++++-- Make sure the Device name is in the Query packet returned.
-++++-- Don't start a second file job if one is already running.
-++++-- Implement EOF/EOV labels for ANSI labels
-++++-- Implement IBM labels.
-++++-- When Python creates a new label, the tape is immediately
-++++-  recycled and no label created. This happens when using   
-++++-  autolabeling -- even when Python doesn't generate the name.
-++++-- Scratch Pool where the volumes can be re-assigned to any Pool.
-++++-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) 
-++++-  is busy reading. Job 6 canceled.
-++++-- Remove separate thread for opening devices in SD.  On the other
-++++-  hand, don't block waiting for open() for devices.
-++++-- Fix code to either handle updating NumVol or to calculate it in
-++++-  Dir next_vol.c
-++++-- Ensure that you cannot exclude a directory or a file explicitly
-++++-  Included with File.
-++++-#4   Embedded Python Scripting 
-++++-     (Implemented in Dir/SD/FD)
-++++-- Add Python writable variable for changing the Priority,
-++++-    Client, Storage, JobStatus (error), ...
-++++-- SD Python
-++++-  - Solicit Events
-++++-- Add disk seeking on restore; turn off seek on tapes.
-++++-  stored/match_bsr.c
-++++-- Look at dird_conf.c:1000: warning: `int size' 
-++++-  might be used uninitialized in this function
-++++-- Indicate when a Job is purged/pruned during restore.
-++++-- Implement some way to turn off automatic pruning in Jobs.
-++++-- Implement a way an Admin Job can prune, possibly multiple
-++++-  clients -- Python script?
-++++-- Look at Preben's acl.c error handling code.
-++++-- SD crashes after a tape restore then doing a backup. 
-++++-- If drive is opened read/write, close it and re-open
-++++-  read-only if doing a restore, and vice-versa.
-++++-- Windows restore:
-++++-  data-fd: RestoreFiles.2004-12-07_15.56.42 Error:
-++++-  > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der
-++++-  > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen
-++++-  > Prozess verwendet wird.
-++++-  Restore restores all files, but then fails at the end trying
-++++-  to set the attributes of e:
-++++-  from failed jobs.- Resolve the problem between Device name and Archive name,
-++++-  and fix SD messages.
-++++-- Tell the "restore" user when browsing is no longer possible.
-++++-- Add a restore directory-x
-++++-- Write non-optimized bsrs from the JobMedia and Media records,
-++++-  even after Files are pruned.
-++++-- Delete Stripe and Copy from VolParams to save space.
-++++-- Fix option 2 of restore -- list where file is backed up -- require Client,
-++++-  then list last 20 backups.
-++++-- Finish implementation of passing all Storage and Device needs to
-++++-  the SD.
-++++-- Move test for max wait time exceeded in job.c up -- Peter's idea.
-++++-##   Consider moving docs to their own project.
-++++-##   Move rescue to its own project.
-++++-- Add client version to the Client name line that prints in
-++++-  the Job report.
-++++-- Fix the Rescue CDROM.
-++++-- By the way: on page http://www.bacula.org/?page=tapedrives , at the 
-++++-  bottom, the link to "Tape Testing Chapter" is broken. It goes to 
-++++-  /html-manual/... while the others point to /rel-manual/...
-++++-- Device resource needs the "name" of the SD.
-++++-- Specify a single directory to restore.
-++++-- Implement MediaType keyword in bsr?   
-++++-- Add a date and time stamp at the beginning of every line in the 
-++++-  Job report (Volker Sauer).
-++++-- Add level to estimate command.
-++++-- Add "limit=n" for "list jobs"
-++++-- Make bootstrap filename unique.
-++++-- Make Dmsg look at global before calling subroutine.
-++++-- From Chris Hull:
-++++-   it seems to be complaining about 12:00pm which should be a valid 12
-++++-   hour time.  I changed the time to 11:59am and everything works fine.
-++++-   Also 12:00am works fine.  0:00pm also works (which I don't think
-++++-   should).  None of the values 12:00pm - 12:59pm work for that matter.
-++++-- Require restore via the restore command or make a restore Job
-++++-  get the bootstrap file.
-++++-- Implement Maximum Job Spool Size
-++++-- Fix 3993 error in SD. It forgets to look at autochanger
-++++-  resource for device command, ...
-++++-- 3. Prevent two drives requesting the same Volume in any given
-++++-     autochanger, by checking if a Volume is mounted on another drive
-++++-     in an Autochanger.
-++++-- Upgrade to MySQL 4.1.12 See:  
-++++-  http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html
-++++-- Add # Job Level date to bsr file
-++++-- Implement "PreferMountedVolumes = yes|no" in Job resource.
-++++-##   Integrate web-bacula into a new Bacula project with
-++++-     bimagemgr.
-++++-- Cleaning tapes should have Status "Cleaning" rather than append.
-++++-- Make sure that Python has access to Client address/port so that
-++++-  it can check if Clients are alive.
-++++-- Review all items in "restore".
-++++-- Fix PostgreSQL GROUP BY problems in restore.
-++++-- Fix PostgreSQL sql problems in bugs.
-++++-- After rename
-++++-  04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume 
-++++-     "DLT-13Feb04".
-++++-  Current Volume "DLT-04Jul05" not acceptable because:
-++++-  1997 Volume "DLT-13Feb04" not in catalog.
-++++-  04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device 
-++++-     "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02
-++++-##   Create a new GUI chapter explaining all the GUI programs.
-++++--    Make "update slots" when pointing to Autochanger, remove
-++++-     all Volumes from other drives.  "update slots all-drives"?
-++++-     No, this is done by modifying mtx-changer to list what is
-++++-     in the drives.
-++++-- Finish TLS implementation.
-++++-- Port limiting -m in iptables to prevent DoS attacks
-++++-  could cause broken pipes on Bacula.
-++++-6. Build and test the Volume Shadow Copy (VSS) for Win32. 
-++++--  Allow cancel of unknown Job
-++++--  State not saved when closing Win32 FD by icon
-++++--  bsr-opt-test fails. bsr deleted. Fix.
-++++--  Move Python daemon variables from Job to Bacula object.
-++++-   WorkingDir, ConfigFile
-++++-- Document that Bootstrap files can be written with cataloging
-++++-  turned off.
-++++-- Document details of ANSI/IBM labels
-++++-- OS linux 2.4
-++++-  1) ADIC, DLT, FastStor 4000, 7*20GB
-++++-- Linux Sony LIB-D81, AIT-3 library works.
-++++-- Doc the following
-++++-  to activate, check or disable the hardware compression feature on my 
-++++-  exb-8900 i use the exabyte "MammothTool" you can get it here:
-++++-  http://www.exabyte.com/support/online/downloads/index.cfm
-++++-  There is a solaris version of this tool. With option -C 0 or 1 you can 
-++++-  disable or activate compression. Start this tool without any options for 
-++++-  a small reference.
-++++-- Document Heartbeat Interval in the dealing with firewalls section.
-++++-- Document new CDROM directory.
-++++-- On Win32 working directory must have drive letter ????
-++++-- On Win32 working directory must be writable by SYSTEM to
-++++-  do restores.
-++++-- Document that ChangerDevice is used for Alert command.
-++++-- Add better documentation on how restores can be done
-++++-8. Take one more try at making DVD writing work (no go)
-++++-7. Write a bacula-web document
-++++-- Why isn't the DEVICE structure defined when doing
-++++-  a reservation?
-++++-- Multi-drive changer seems to only use drive 0
-++++-  Multiple drives don't seem to be opened.
-++++-- My database is growing
-++++-- Call GetLastError() in the berrno constructor rather
-++++-  than delaying until strerror.
-++++-- Tape xxx in drive 0, requested in drive 1
-++++-- The mount command does not work with drives other than 0.
-++++-- A mount should cause the SD to re-examine what Slot is   
-++++-  loaded.
-++++-- The SD locks on to the first available drive then
-++++-  wants a Volume that is released but in another drive --
-++++-  chaos.
-++++-- Run the regression scripts on Solaris and FreeBSD
-++++--  Figure out how to package gui, and rescue programs.
-++++-- Add a .dir command to restore tree code to eliminate the problem
-++++-- Mount after manually unloading changer causes hang in SD
-++++-- Fix JobACL with restore by JobId.
-+++++=== Done -- see kernsdone
-++++Index: kes-1.38
-++++===================================================================
-++++RCS file: /cvsroot/bacula/bacula/kes-1.38,v
-++++retrieving revision 1.1.2.13
-++++diff -u -r1.1.2.13 kes-1.38
-++++--- kes-1.38       14 Nov 2005 20:20:38 -0000      1.1.2.13
-+++++++ kes-1.38       21 Nov 2005 13:17:57 -0000
-++++@@ -3,6 +3,18 @@
-++++ 
-++++ General:
-++++ 
-+++++Changes to 1.38.2:
-+++++20Oct05
-+++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-+++++- Fix bnet-server bug found on OpenBSD. Bug #486
-+++++- Fix cancel failure bug. Bug #481
-+++++- Fix failure when Pool name has spaces. Bug #487   
-+++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-+++++- Fix a couple of free()s in src/filed/acl.c
-+++++- Fix memory overrun in bfile.c in building OS X resource
-+++++  fork filename. Bug #489 
-+++++- Add Pool name to SD status output.
-+++++
-++++ Changes to 1.38.1:
-++++ 14Oct05
-++++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
-++++Index: projects
-++++===================================================================
-++++RCS file: /cvsroot/bacula/bacula/projects,v
-++++retrieving revision 1.12.2.3
-++++diff -u -r1.12.2.3 projects
-++++--- projects       10 Nov 2005 20:25:27 -0000      1.12.2.3
-+++++++ projects       21 Nov 2005 13:17:58 -0000
-++++@@ -228,7 +228,175 @@
-++++ 
-++++   Why:    Performance enhancement.
-++++ 
-+++++Item 13:  Let Bacula log tape usage and handle drive cleaning cycles.
-+++++  Date:   November 11, 2005
-+++++  Origin: Arno Lehmann <al at its-lehmann dot de>
-+++++  Status:
-+++++
-+++++  What:   Make Bacula manage tape life cycle information and drive 
-+++++          cleaning cycles.
-+++++
-+++++  Why:    Both parts of this project are important when operating backups.
-+++++          We need to know which tapes need replacement, and we need to
-+++++          make sure the drives are cleaned when necessary.  While many
-+++++          tape libraries and even autoloaders can handle all this
-+++++          automatically, support by Bacula can be helpful for smaller
-+++++          (older) libraries and single drives.  Also, checking drive
-+++++          status during operation can prevent some failures (as I had to
-+++++          learn the hard way...)
-+++++
-+++++  Notes:  First, Bacula could (and even does, to some limited extent)
-+++++          record tape and drive usage.  For tapes, the number of mounts,
-+++++          the amount of data, and the time the tape has actually been
-+++++          running could be recorded.  Data fields for Read and Write time
-+++++          and Nmber of mounts already exist in the catalog (I'm not sure
-+++++          if VolBytes is the sum of all bytes ever written to that volume
-+++++          by Bacula).  This information can be important when determining
-+++++          which media to replace.  For the tape drives known to Bacula,
-+++++          similar information is interesting to determine the device
-+++++          status and expected life time: Time it's been Reading and
-+++++          Writing, number of tape Loads / Unloads / Errors.  This
-+++++          information is not yet recorded as far as I know.
-+++++
-+++++          The next step would be implementing drive cleaning setup.
-+++++          Bacula already has knowledge about cleaning tapes.  Once it has
-+++++          some information about cleaning cycles (measured in drive run
-+++++          time, number of tapes used, or calender days, for example) it
-+++++          can automatically execute tape cleaning (with an autochanger,
-+++++          obviously) or ask for operator assistence loading a cleaning
-+++++          tape.
-+++++
-+++++          The next step would be to implement TAPEALERT checks not only
-+++++          when changing tapes and only sending he information to the
-+++++          administrator, but rather checking after each tape error,
-+++++          checking on a regular basis (for example after each tape file),
-+++++          and also before unloading and after loading a new tape.  Then,
-+++++          depending on the drives TAPEALERT state and the know drive
-+++++          cleaning state Bacula could automatically schedule later
-+++++          cleaning, clean immediately, or inform the operator.
-+++++
-+++++          Implementing this would perhaps require another catalog change
-+++++          and perhaps major changes in SD code and the DIR-SD protocoll,
-+++++          so I'd only consider this worth implementing if it would
-+++++          actually be used or even needed by many people. 
-+++++
-+++++Item 14:  Merging of multiple backups into a single one. (Also called Synthetic
-+++++          Backup or Consolidation).
-+++++
-+++++  Origin: Marc Cousin and Eric Bollengier 
-+++++  Date:   15 November 2005
-+++++  Status: Depends on first implementing project Item 1 (Migration).
-+++++
-+++++  What:   A merged backup is a backup made without connecting to the Client.
-+++++          It would be a Merge of existing backups into a single backup.
-+++++          In effect, it is like a restore but to the backup medium.
-+++++
-+++++          For instance, say that last sunday we made a full backup.  Then
-+++++          all week long, we created incremental backups, in order to do
-+++++          them fast.  Now comes sunday again, and we need another full.
-+++++          The merged backup makes it possible to do instead an incremental
-+++++          backup (during the night for instance), and then create a merged
-+++++          backup during the day, by using the full and incrementals from
-+++++          the week.  The merged backup will be exactly like a full made
-+++++          sunday night on the tape, but the production interruption on the
-+++++          Client will be minimal, as the Client will only have to send
-+++++          incrementals.
-+++++
-+++++          In fact, if it's done correctly, you could merge all the
-+++++          Incrementals into single Incremental, or all the Incrementals
-+++++          and the last Differential into a new Differential, or the Full,
-+++++          last differential and all the Incrementals into a new Full
-+++++          backup.  And there is no need to involve the Client.
-+++++
-+++++  Why:    The benefit is that :
-+++++          - the Client just does an incremental ;
-+++++          - the merged backup on tape is just as a single full backup,
-+++++            and can be restored very fast.
-+++++
-+++++          This is also a way of reducing the backup data since the old
-+++++          data can then be pruned (or not) from the catalog, possibly
-+++++          allowing older volumes to be recycled
-+++++
-+++++Item 15:  Automatic disabling of devices
-+++++   Date:   2005-11-11
-+++++   Origin: Peter Eriksson <peter at ifm.liu dot se>
-+++++   Status:
-+++++
-+++++   What:  After a configurable amount of fatal errors with a tape drive
-+++++          Bacula should automatically disable further use of a certain
-+++++          tape drive. There should also be "disable"/"enable" commands in
-+++++          the "bconsole" tool.
-+++++
-+++++   Why:   On a multi-drive jukebox there is a possibility of tape drives
-+++++          going bad during large backups (needing a cleaning tape run,
-+++++          tapes getting stuck). It would be advantageous if Bacula would
-+++++          automatically disable further use of a problematic tape drive
-+++++          after a configurable amount of errors has occured.
-+++++
-+++++          An example: I have a multi-drive jukebox (6 drives, 380+ slots)
-+++++          where tapes occasionally get stuck inside the drive. Bacula will
-+++++          notice that the "mtx-changer" command will fail and then fail
-+++++          any backup jobs trying to use that drive. However, it will still
-+++++          keep on trying to run new jobs using that drive and fail -
-+++++          forever, and thus failing lots and lots of jobs... Since we have
-+++++          many drives Bacula could have just automatically disabled
-+++++          further use of that drive and used one of the other ones
-+++++          instead.
-+++++
-+++++
-+++++Item 16:  Directive/mode to backup only file changes, not entire file
-+++++  Date:   11 November 2005
-+++++  Origin: Joshua Kugler <joshua dot kugler at uaf dot edu>
-+++++          Marek Bajon <mbajon at bimsplus dot com dot pl>
-+++++  Status: RFC
-+++++
-+++++  What:   Currently when a file changes, the entire file will be backed up in
-+++++          the next incremental or full backup.  To save space on the tapes
-+++++          it would be nice to have a mode whereby only the changes to the
-+++++          file would be backed up when it is changed.
-+++++
-+++++  Why:    This would save lots of space when backing up large files such as 
-+++++          logs, mbox files, Outlook PST files and the like.
-+++++
-+++++  Notes:  This would require the usage of disk-based volumes as comparing 
-+++++          files would not be feasible using a tape drive.
-+++++
-+++++Item 17:  Quick release of FD-SD connection
-+++++  Origin: Frank Volf (frank at deze dot org)
-+++++  Date:   17 november 2005
-+++++  Status:
-+++++
-+++++   What:  In the bacula implementation a backup is finished after all data
-+++++          and attributes are succesfully written to storage.  When using a
-+++++          tape backup it is very annoying that a backup can take a day,
-+++++          simply because the current tape (or whatever) is full and the
-+++++          administrator has not put a new one in.  During that time the
-+++++          system cannot be taken off-line, because there is still an open
-+++++          session between the storage daemon and the file daemon on the
-+++++          client.
-+++++
-+++++          Although this is a very good strategey for making "safe backups"
-+++++          This can be annoying for e.g.  laptops, that must remain
-+++++          connected until the bacukp is completed.
-+++++
-+++++          Using a new feature called "migration" it will be possible to
-+++++          spool first to harddisk (using a special 'spool' migration
-+++++          scheme) and then migrate the backup to tape.
-+++++
-+++++          There is still the problem of getting the attributes committed.
-+++++          If it takes a very long time to do, with the current code, the
-+++++          job has not terminated, and the File daemon is not freed up.  The
-+++++          Storage daemon should release the File daemon as soon as all the
-+++++          file data and all the attributes have been sent to it (the SD).
-+++++          Currently the SD waits until everything is on tape and all the
-+++++          attributes are transmitted to the Director before signalling
-+++++          completion to the FD. I don't think I would have any problem
-+++++          changing this.  The reason is that even if the FD reports back to
-+++++          the Dir that all is OK, the job will not terminate until the SD
-+++++          has done the same thing -- so in a way keeping the SD-FD link
-+++++          open to the very end is not really very productive ...
-++++ 
-+++++   Why:   Makes backup of laptops much easier.
-++++ 
-++++ 
-++++ ============= Empty RFC form ===========
-++++@@ -245,33 +413,4 @@
-++++ ============== End RFC form ==============
-++++ 
-++++ 
-++++-Items completed for release 1.38.0:
-++++-#4   Embedded Python Scripting (implemented in all Daemons)
-++++-#5   Events that call a Python program (Implemented in all
-++++-       daemons, but more cleanup work to be done).
-++++-#6   Select one from among Multiple Storage Devices for Job.
-++++-       This is already implemented in 1.37.
-++++-#7   Single Job Writing to Multiple Storage Devices. This is
-++++-       currently implemented with a Clone feature.
-++++-#-   Full multiple drive Autochanger support (done in 1.37)
-++++-#-   Built in support for communications encryption (TLS) 
-++++-       done by Landon Fuller.
-++++-#    Support for Unicode characters
-++++-       (via UTF-8) on Win32 machines thanks to Thorsten Engel.
-++++-Item  8:  Break the one-to-one Relationship between a Job and a
-++++-          Specific Storage Device (or Devices if #10 is implemented).
-++++-
-++++-Completed items from last year's list:
-++++-Item 1:   Multiple simultaneous Jobs. (done)
-++++-Item 3:   Write the bscan program -- also write a bcopy program (done).
-++++-Item 5:   Implement Label templates (done).
-++++-Item 6:   Write a regression script (done)
-++++-Item 9:   Add SSL to daemon communications (done by Landon Fuller)
-++++-Item 10:  Define definitive tape format (done)
-++++-Item 3:   GUI for interactive restore. Partially Implemented in 1.34
-++++-          Note, there is now a complete Webmin plugin, a partial
-++++-          GNOME console, and an excellent wx-console GUI.
-++++-Item 4:   GUI for interactive backup
-++++-Item 2:   Job Data Spooling.
-++++-    Done: Regular expression matching.
-++++-Item 10:  New daemon communication protocol (this has been dropped).
-+++++Items completed for release 1.38.0 -- see kernsdone
-++++Index: patches/1.38.1-to-1.38.2.patch
-++++===================================================================
-++++RCS file: patches/1.38.1-to-1.38.2.patch
-++++diff -N patches/1.38.1-to-1.38.2.patch
-++++--- /dev/null      1 Jan 1970 00:00:00 -0000
-+++++++ patches/1.38.1-to-1.38.2.patch 21 Nov 2005 13:17:58 -0000
-++++@@ -0,0 +1,2471 @@
-+++++
-+++++ This patch fixes the following bugs:
-+++++
-+++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-+++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
-+++++  says that this patch does not fix his problem)
-+++++- Fix cancel failure bug. Bug #481
-+++++- Fix failure when Pool name has spaces. Bug #487
-+++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-+++++- Fix a couple of free()s in src/filed/acl.c
-+++++- Fix memory overrun in bfile.c in building OS X resource
-+++++  fork filename. Bug #489
-+++++
-+++++This patch is applied to Bacula source version 1.38.1 and will
-+++++produce Bacula source version 1.38.2.  Apply it with:
-+++++
-+++++   cd <bacula-1.38.1-source>
-+++++   ./configure (your options) if not already done
-+++++   patch -p0 <1.38.1-to-1.38.2.patch
-+++++   make
-+++++   make install
-+++++
-+++++? osx_finder.patch
-+++++Index: ChangeLog
-+++++===================================================================
-+++++RCS file: /cvsroot/bacula/bacula/ChangeLog,v
-+++++retrieving revision 1.154.2.7
-+++++diff -u -r1.154.2.7 ChangeLog
-+++++--- ChangeLog     15 Nov 2005 09:27:19 -0000      1.154.2.7
-++++++++ ChangeLog     21 Nov 2005 13:12:58 -0000
-+++++@@ -1,4 +1,14 @@
-+++++ 
-++++++Changes to 1.38.2:
-++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-++++++- Fix bnet-server bug found on OpenBSD. Bug #486
-++++++- Fix cancel failure bug. Bug #481
-++++++- Fix failure when Pool name has spaces. Bug #487   
-++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-++++++- Fix a couple of free()s in src/filed/acl.c
-++++++- Fix memory overrun in bfile.c in building OS X resource
-++++++  fork filename. Bug #489 
-++++++- Add Pool name to SD status output.
-+++++ 
-+++++ Changes to 1.38.1:
-+++++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
-+++++Index: ReleaseNotes
-+++++===================================================================
-+++++RCS file: /cvsroot/bacula/bacula/ReleaseNotes,v
-+++++retrieving revision 1.147.2.9
-+++++diff -u -r1.147.2.9 ReleaseNotes
-+++++--- ReleaseNotes  15 Nov 2005 09:27:19 -0000      1.147.2.9
-++++++++ ReleaseNotes  21 Nov 2005 13:12:59 -0000
-+++++@@ -1,10 +1,21 @@
-+++++ 
-+++++-          Release Notes for Bacula 1.38.1
-++++++          Release Notes for Bacula 1.38.2
-+++++ 
-+++++   Bacula code: Total files = 420 Total lines = 138,440 (*.h *.c *.in)
-+++++       20,440 additional lines of code since version 1.36.3
-+++++ 
-+++++-Changes since 1.38.0:
-++++++Changes to 1.38.2:
-++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-++++++- Fix bnet-server bug found on OpenBSD. Bug #486
-++++++- Fix cancel failure bug. Bug #481
-++++++- Fix failure when Pool name has spaces. Bug #487   
-++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-++++++- Fix a couple of free()s in src/filed/acl.c
-++++++- Fix memory overrun in bfile.c in building OS X resource
-++++++  fork filename. Bug #489 
-++++++- Add Pool name to SD status output.
-++++++
-++++++Changes to 1.38.1:
-+++++ - Corrected ACL for Solaris (David Duchscher and Attila Fulop).
-+++++ - Add bacula_mail_summary.sh to examples directory. It makes
-+++++   a single email summary of any number of jobs. Submitted
-+++++Index: kernstodo
-+++++===================================================================
-+++++RCS file: /cvsroot/bacula/bacula/kernstodo,v
-+++++retrieving revision 1.570.2.6
-+++++diff -u -r1.570.2.6 kernstodo
-+++++--- kernstodo     4 Nov 2005 09:16:49 -0000       1.570.2.6
-++++++++ kernstodo     21 Nov 2005 13:13:00 -0000
-+++++@@ -1,5 +1,5 @@
-+++++                     Kern's ToDo List
-+++++-                     03 November 2005
-++++++                     21 November 2005
-+++++ 
-+++++ Major development:      
-+++++ Project                     Developer
-+++++@@ -7,8 +7,6 @@
-+++++ Version 1.37                Kern (see below)
-+++++ ========================================================
-+++++ 
-+++++-Final items for 1.37 before release:
-+++++-
-+++++ Document:
-+++++ - Does ClientRunAfterJob fail the job on a bad return code?
-+++++ - Document cleaning up the spool files:
-+++++@@ -18,6 +16,8 @@
-+++++ - Does WildFile match against full name?  Doc.
-+++++ 
-+++++ For 1.39:
-++++++- Make sure that all do_prompt() calls in Dir check for
-++++++  -1 (error) and -2 (cancel) returns.
-+++++ - Look at -D_FORTIFY_SOURCE=2
-+++++ - Add Win32 FileSet definition somewhere
-+++++ - Look at fixing restore status stats in SD.
-+++++@@ -27,6 +27,12 @@
-+++++   encountered, read many times (as it currently does), and if the
-+++++   block cannot be read, skip to the next block, and try again.  If
-+++++   that fails, skip to the next file and try again, ...
-++++++- Add level table:
-++++++  create table LevelType (LevelType binary(1), LevelTypeLong tinyblob);
-++++++  insert into LevelType (LevelType,LevelTypeLong) values
-++++++  ("F","Full"),
-++++++  ("D","Diff"),
-++++++  ("I","Inc");
-+++++ - Add ACL to restore only to original location.
-+++++ - Add a recursive mark command (rmark) to restore.
-+++++ - "Minimum Job Interval = nnn" sets minimum interval between Jobs
-+++++@@ -1246,219 +1252,4 @@
-+++++ ====
-+++++ 
-+++++ 
-+++++-=== Done
-+++++-- Save mount point for directories not traversed with onefs=yes.
-+++++-- Add seconds to start and end times in the Job report output.
-+++++-- if 2 concurrent backups are attempted on the same tape
-+++++-  drive (autoloader) into different tape pools, one of them will exit
-+++++-  fatally instead of halting until the drive is idle
-+++++-- Update StartTime if job held in Job Queue.
-+++++-- Look at www.nu2.nu/pebuilder as a helper for full windows
-+++++-  bare metal restore. (done by Scott)
-+++++-- Fix orphanned buffers:
-+++++-   Orphaned buffer:      24 bytes allocated at line 808 of rufus-dir job.c
-+++++-   Orphaned buffer:      40 bytes allocated at line 45 of rufus-dir alist.c
-+++++-- Implement Preben's suggestion to add
-+++++-  File System Types = ext2, ext3 
-+++++-  to FileSets, thus simplifying backup of *all* local partitions.
-+++++-- Try to open a device on each Job if it was not opened
-+++++-  when the SD started.
-+++++-- Add dump of VolSessionId/Time and FileIndex with bls.
-+++++-- If Bacula does not find the right tape in the Autochanger,
-+++++-  then mark the tape in error and move on rather than asking
-+++++-  for operator intervention.
-+++++-- Cancel command should include JobId in list of Jobs.
-+++++-- Add performance testing hooks
-+++++-- Bootstrap from JobMedia records.
-+++++-- Implement WildFile and WildDir to solve problem of 
-+++++-  saving only *.doc files.
-+++++-- Fix
-+++++-   Please use the "label"  command to create a new Volume for:
-+++++-       Storage:      DDS-4-changer
-+++++-       Media type:   
-+++++-       Pool:         Default
-+++++-   label
-+++++-   The defined Storage resources are:
-+++++-- Copy Changer Device and Changer Command from Autochanger
-+++++-  to Device resource in SD if none given in Device resource.
-+++++-- 1. Automatic use of more than one drive in an autochanger (done)
-+++++-- 2. Automatic selection of the correct drive for each Job (i.e.
-+++++-     selects a drive with an appropriate Volume for the Job) (done)
-+++++-- 6. Allow multiple simultaneous Jobs referencing the same pool write
-+++++-    to several tapes (some new directive(s) are are probably needed for
-+++++-    this) (done)
-+++++-- Locking (done)
-+++++-- Key on Storage rather than Pool (done)
-+++++-- Allow multiple drives to use same Pool (change jobq.c DIR) (done).
-+++++-- Synchronize multiple drives so that not more
-+++++-  than one loads a tape and any time (done)
-+++++-- 4. Use Changer Device and Changer Command specified in the
-+++++-     Autochanger resource, if none is found in the Device resource.
-+++++-    You can continue to specify them in the Device resource if you want
-+++++-    or need them to be different for each device.
-+++++-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") 
-+++++-    that can allow a Device be part of an Autochanger, and hence the changer
-+++++-    script protected, but if set to no, will prevent the Device from being 
-+++++-    automatically selected from the changer. This allows the device to
-+++++-    be directly accessed through its Device name, but not through the
-+++++-    AutoChanger name.
-+++++-#6   Select one from among Multiple Storage Devices for Job
-+++++-#5   Events that call a Python program 
-+++++-     (Implemented in Dir/SD)
-+++++-- Make sure the Device name is in the Query packet returned.
-+++++-- Don't start a second file job if one is already running.
-+++++-- Implement EOF/EOV labels for ANSI labels
-+++++-- Implement IBM labels.
-+++++-- When Python creates a new label, the tape is immediately
-+++++-  recycled and no label created. This happens when using   
-+++++-  autolabeling -- even when Python doesn't generate the name.
-+++++-- Scratch Pool where the volumes can be re-assigned to any Pool.
-+++++-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) 
-+++++-  is busy reading. Job 6 canceled.
-+++++-- Remove separate thread for opening devices in SD.  On the other
-+++++-  hand, don't block waiting for open() for devices.
-+++++-- Fix code to either handle updating NumVol or to calculate it in
-+++++-  Dir next_vol.c
-+++++-- Ensure that you cannot exclude a directory or a file explicitly
-+++++-  Included with File.
-+++++-#4   Embedded Python Scripting 
-+++++-     (Implemented in Dir/SD/FD)
-+++++-- Add Python writable variable for changing the Priority,
-+++++-    Client, Storage, JobStatus (error), ...
-+++++-- SD Python
-+++++-  - Solicit Events
-+++++-- Add disk seeking on restore; turn off seek on tapes.
-+++++-  stored/match_bsr.c
-+++++-- Look at dird_conf.c:1000: warning: `int size' 
-+++++-  might be used uninitialized in this function
-+++++-- Indicate when a Job is purged/pruned during restore.
-+++++-- Implement some way to turn off automatic pruning in Jobs.
-+++++-- Implement a way an Admin Job can prune, possibly multiple
-+++++-  clients -- Python script?
-+++++-- Look at Preben's acl.c error handling code.
-+++++-- SD crashes after a tape restore then doing a backup. 
-+++++-- If drive is opened read/write, close it and re-open
-+++++-  read-only if doing a restore, and vice-versa.
-+++++-- Windows restore:
-+++++-  data-fd: RestoreFiles.2004-12-07_15.56.42 Error:
-+++++-  > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der
-+++++-  > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen
-+++++-  > Prozess verwendet wird.
-+++++-  Restore restores all files, but then fails at the end trying
-+++++-  to set the attributes of e:
-+++++-  from failed jobs.- Resolve the problem between Device name and Archive name,
-+++++-  and fix SD messages.
-+++++-- Tell the "restore" user when browsing is no longer possible.
-+++++-- Add a restore directory-x
-+++++-- Write non-optimized bsrs from the JobMedia and Media records,
-+++++-  even after Files are pruned.
-+++++-- Delete Stripe and Copy from VolParams to save space.
-+++++-- Fix option 2 of restore -- list where file is backed up -- require Client,
-+++++-  then list last 20 backups.
-+++++-- Finish implementation of passing all Storage and Device needs to
-+++++-  the SD.
-+++++-- Move test for max wait time exceeded in job.c up -- Peter's idea.
-+++++-##   Consider moving docs to their own project.
-+++++-##   Move rescue to its own project.
-+++++-- Add client version to the Client name line that prints in
-+++++-  the Job report.
-+++++-- Fix the Rescue CDROM.
-+++++-- By the way: on page http://www.bacula.org/?page=tapedrives , at the 
-+++++-  bottom, the link to "Tape Testing Chapter" is broken. It goes to 
-+++++-  /html-manual/... while the others point to /rel-manual/...
-+++++-- Device resource needs the "name" of the SD.
-+++++-- Specify a single directory to restore.
-+++++-- Implement MediaType keyword in bsr?   
-+++++-- Add a date and time stamp at the beginning of every line in the 
-+++++-  Job report (Volker Sauer).
-+++++-- Add level to estimate command.
-+++++-- Add "limit=n" for "list jobs"
-+++++-- Make bootstrap filename unique.
-+++++-- Make Dmsg look at global before calling subroutine.
-+++++-- From Chris Hull:
-+++++-   it seems to be complaining about 12:00pm which should be a valid 12
-+++++-   hour time.  I changed the time to 11:59am and everything works fine.
-+++++-   Also 12:00am works fine.  0:00pm also works (which I don't think
-+++++-   should).  None of the values 12:00pm - 12:59pm work for that matter.
-+++++-- Require restore via the restore command or make a restore Job
-+++++-  get the bootstrap file.
-+++++-- Implement Maximum Job Spool Size
-+++++-- Fix 3993 error in SD. It forgets to look at autochanger
-+++++-  resource for device command, ...
-+++++-- 3. Prevent two drives requesting the same Volume in any given
-+++++-     autochanger, by checking if a Volume is mounted on another drive
-+++++-     in an Autochanger.
-+++++-- Upgrade to MySQL 4.1.12 See:  
-+++++-  http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html
-+++++-- Add # Job Level date to bsr file
-+++++-- Implement "PreferMountedVolumes = yes|no" in Job resource.
-+++++-##   Integrate web-bacula into a new Bacula project with
-+++++-     bimagemgr.
-+++++-- Cleaning tapes should have Status "Cleaning" rather than append.
-+++++-- Make sure that Python has access to Client address/port so that
-+++++-  it can check if Clients are alive.
-+++++-- Review all items in "restore".
-+++++-- Fix PostgreSQL GROUP BY problems in restore.
-+++++-- Fix PostgreSQL sql problems in bugs.
-+++++-- After rename
-+++++-  04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume 
-+++++-     "DLT-13Feb04".
-+++++-  Current Volume "DLT-04Jul05" not acceptable because:
-+++++-  1997 Volume "DLT-13Feb04" not in catalog.
-+++++-  04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device 
-+++++-     "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02
-+++++-##   Create a new GUI chapter explaining all the GUI programs.
-+++++--    Make "update slots" when pointing to Autochanger, remove
-+++++-     all Volumes from other drives.  "update slots all-drives"?
-+++++-     No, this is done by modifying mtx-changer to list what is
-+++++-     in the drives.
-+++++-- Finish TLS implementation.
-+++++-- Port limiting -m in iptables to prevent DoS attacks
-+++++-  could cause broken pipes on Bacula.
-+++++-6. Build and test the Volume Shadow Copy (VSS) for Win32. 
-+++++--  Allow cancel of unknown Job
-+++++--  State not saved when closing Win32 FD by icon
-+++++--  bsr-opt-test fails. bsr deleted. Fix.
-+++++--  Move Python daemon variables from Job to Bacula object.
-+++++-   WorkingDir, ConfigFile
-+++++-- Document that Bootstrap files can be written with cataloging
-+++++-  turned off.
-+++++-- Document details of ANSI/IBM labels
-+++++-- OS linux 2.4
-+++++-  1) ADIC, DLT, FastStor 4000, 7*20GB
-+++++-- Linux Sony LIB-D81, AIT-3 library works.
-+++++-- Doc the following
-+++++-  to activate, check or disable the hardware compression feature on my 
-+++++-  exb-8900 i use the exabyte "MammothTool" you can get it here:
-+++++-  http://www.exabyte.com/support/online/downloads/index.cfm
-+++++-  There is a solaris version of this tool. With option -C 0 or 1 you can 
-+++++-  disable or activate compression. Start this tool without any options for 
-+++++-  a small reference.
-+++++-- Document Heartbeat Interval in the dealing with firewalls section.
-+++++-- Document new CDROM directory.
-+++++-- On Win32 working directory must have drive letter ????
-+++++-- On Win32 working directory must be writable by SYSTEM to
-+++++-  do restores.
-+++++-- Document that ChangerDevice is used for Alert command.
-+++++-- Add better documentation on how restores can be done
-+++++-8. Take one more try at making DVD writing work (no go)
-+++++-7. Write a bacula-web document
-+++++-- Why isn't the DEVICE structure defined when doing
-+++++-  a reservation?
-+++++-- Multi-drive changer seems to only use drive 0
-+++++-  Multiple drives don't seem to be opened.
-+++++-- My database is growing
-+++++-- Call GetLastError() in the berrno constructor rather
-+++++-  than delaying until strerror.
-+++++-- Tape xxx in drive 0, requested in drive 1
-+++++-- The mount command does not work with drives other than 0.
-+++++-- A mount should cause the SD to re-examine what Slot is   
-+++++-  loaded.
-+++++-- The SD locks on to the first available drive then
-+++++-  wants a Volume that is released but in another drive --
-+++++-  chaos.
-+++++-- Run the regression scripts on Solaris and FreeBSD
-+++++--  Figure out how to package gui, and rescue programs.
-+++++-- Add a .dir command to restore tree code to eliminate the problem
-+++++-- Mount after manually unloading changer causes hang in SD
-+++++-- Fix JobACL with restore by JobId.
-++++++=== Done -- see kernsdone
-+++++Index: kes-1.38
-+++++===================================================================
-+++++RCS file: /cvsroot/bacula/bacula/kes-1.38,v
-+++++retrieving revision 1.1.2.13
-+++++diff -u -r1.1.2.13 kes-1.38
-+++++--- kes-1.38      14 Nov 2005 20:20:38 -0000      1.1.2.13
-++++++++ kes-1.38      21 Nov 2005 13:13:00 -0000
-+++++@@ -3,6 +3,18 @@
-+++++ 
-+++++ General:
-+++++ 
-++++++Changes to 1.38.2:
-++++++20Oct05
-++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-++++++- Fix bnet-server bug found on OpenBSD. Bug #486
-++++++- Fix cancel failure bug. Bug #481
-++++++- Fix failure when Pool name has spaces. Bug #487   
-++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-++++++- Fix a couple of free()s in src/filed/acl.c
-++++++- Fix memory overrun in bfile.c in building OS X resource
-++++++  fork filename. Bug #489 
-++++++- Add Pool name to SD status output.
-++++++
-+++++ Changes to 1.38.1:
-+++++ 14Oct05
-+++++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
-+++++Index: projects
-+++++===================================================================
-+++++RCS file: /cvsroot/bacula/bacula/projects,v
-+++++retrieving revision 1.12.2.3
-+++++diff -u -r1.12.2.3 projects
-+++++--- projects      10 Nov 2005 20:25:27 -0000      1.12.2.3
-++++++++ projects      21 Nov 2005 13:13:00 -0000
-+++++@@ -228,7 +228,175 @@
-+++++ 
-+++++   Why:    Performance enhancement.
-+++++ 
-++++++Item 13:  Let Bacula log tape usage and handle drive cleaning cycles.
-++++++  Date:   November 11, 2005
-++++++  Origin: Arno Lehmann <al at its-lehmann dot de>
-++++++  Status:
-++++++
-++++++  What:   Make Bacula manage tape life cycle information and drive 
-++++++          cleaning cycles.
-++++++
-++++++  Why:    Both parts of this project are important when operating backups.
-++++++          We need to know which tapes need replacement, and we need to
-++++++          make sure the drives are cleaned when necessary.  While many
-++++++          tape libraries and even autoloaders can handle all this
-++++++          automatically, support by Bacula can be helpful for smaller
-++++++          (older) libraries and single drives.  Also, checking drive
-++++++          status during operation can prevent some failures (as I had to
-++++++          learn the hard way...)
-++++++
-++++++  Notes:  First, Bacula could (and even does, to some limited extent)
-++++++          record tape and drive usage.  For tapes, the number of mounts,
-++++++          the amount of data, and the time the tape has actually been
-++++++          running could be recorded.  Data fields for Read and Write time
-++++++          and Nmber of mounts already exist in the catalog (I'm not sure
-++++++          if VolBytes is the sum of all bytes ever written to that volume
-++++++          by Bacula).  This information can be important when determining
-++++++          which media to replace.  For the tape drives known to Bacula,
-++++++          similar information is interesting to determine the device
-++++++          status and expected life time: Time it's been Reading and
-++++++          Writing, number of tape Loads / Unloads / Errors.  This
-++++++          information is not yet recorded as far as I know.
-++++++
-++++++          The next step would be implementing drive cleaning setup.
-++++++          Bacula already has knowledge about cleaning tapes.  Once it has
-++++++          some information about cleaning cycles (measured in drive run
-++++++          time, number of tapes used, or calender days, for example) it
-++++++          can automatically execute tape cleaning (with an autochanger,
-++++++          obviously) or ask for operator assistence loading a cleaning
-++++++          tape.
-++++++
-++++++          The next step would be to implement TAPEALERT checks not only
-++++++          when changing tapes and only sending he information to the
-++++++          administrator, but rather checking after each tape error,
-++++++          checking on a regular basis (for example after each tape file),
-++++++          and also before unloading and after loading a new tape.  Then,
-++++++          depending on the drives TAPEALERT state and the know drive
-++++++          cleaning state Bacula could automatically schedule later
-++++++          cleaning, clean immediately, or inform the operator.
-++++++
-++++++          Implementing this would perhaps require another catalog change
-++++++          and perhaps major changes in SD code and the DIR-SD protocoll,
-++++++          so I'd only consider this worth implementing if it would
-++++++          actually be used or even needed by many people. 
-++++++
-++++++Item 14:  Merging of multiple backups into a single one. (Also called Synthetic
-++++++          Backup or Consolidation).
-++++++
-++++++  Origin: Marc Cousin and Eric Bollengier 
-++++++  Date:   15 November 2005
-++++++  Status: Depends on first implementing project Item 1 (Migration).
-++++++
-++++++  What:   A merged backup is a backup made without connecting to the Client.
-++++++          It would be a Merge of existing backups into a single backup.
-++++++          In effect, it is like a restore but to the backup medium.
-++++++
-++++++          For instance, say that last sunday we made a full backup.  Then
-++++++          all week long, we created incremental backups, in order to do
-++++++          them fast.  Now comes sunday again, and we need another full.
-++++++          The merged backup makes it possible to do instead an incremental
-++++++          backup (during the night for instance), and then create a merged
-++++++          backup during the day, by using the full and incrementals from
-++++++          the week.  The merged backup will be exactly like a full made
-++++++          sunday night on the tape, but the production interruption on the
-++++++          Client will be minimal, as the Client will only have to send
-++++++          incrementals.
-++++++
-++++++          In fact, if it's done correctly, you could merge all the
-++++++          Incrementals into single Incremental, or all the Incrementals
-++++++          and the last Differential into a new Differential, or the Full,
-++++++          last differential and all the Incrementals into a new Full
-++++++          backup.  And there is no need to involve the Client.
-++++++
-++++++  Why:    The benefit is that :
-++++++          - the Client just does an incremental ;
-++++++          - the merged backup on tape is just as a single full backup,
-++++++            and can be restored very fast.
-++++++
-++++++          This is also a way of reducing the backup data since the old
-++++++          data can then be pruned (or not) from the catalog, possibly
-++++++          allowing older volumes to be recycled
-++++++
-++++++Item 15:  Automatic disabling of devices
-++++++   Date:   2005-11-11
-++++++   Origin: Peter Eriksson <peter at ifm.liu dot se>
-++++++   Status:
-++++++
-++++++   What:  After a configurable amount of fatal errors with a tape drive
-++++++          Bacula should automatically disable further use of a certain
-++++++          tape drive. There should also be "disable"/"enable" commands in
-++++++          the "bconsole" tool.
-++++++
-++++++   Why:   On a multi-drive jukebox there is a possibility of tape drives
-++++++          going bad during large backups (needing a cleaning tape run,
-++++++          tapes getting stuck). It would be advantageous if Bacula would
-++++++          automatically disable further use of a problematic tape drive
-++++++          after a configurable amount of errors has occured.
-++++++
-++++++          An example: I have a multi-drive jukebox (6 drives, 380+ slots)
-++++++          where tapes occasionally get stuck inside the drive. Bacula will
-++++++          notice that the "mtx-changer" command will fail and then fail
-++++++          any backup jobs trying to use that drive. However, it will still
-++++++          keep on trying to run new jobs using that drive and fail -
-++++++          forever, and thus failing lots and lots of jobs... Since we have
-++++++          many drives Bacula could have just automatically disabled
-++++++          further use of that drive and used one of the other ones
-++++++          instead.
-++++++
-++++++
-++++++Item 16:  Directive/mode to backup only file changes, not entire file
-++++++  Date:   11 November 2005
-++++++  Origin: Joshua Kugler <joshua dot kugler at uaf dot edu>
-++++++          Marek Bajon <mbajon at bimsplus dot com dot pl>
-++++++  Status: RFC
-++++++
-++++++  What:   Currently when a file changes, the entire file will be backed up in
-++++++          the next incremental or full backup.  To save space on the tapes
-++++++          it would be nice to have a mode whereby only the changes to the
-++++++          file would be backed up when it is changed.
-++++++
-++++++  Why:    This would save lots of space when backing up large files such as 
-++++++          logs, mbox files, Outlook PST files and the like.
-++++++
-++++++  Notes:  This would require the usage of disk-based volumes as comparing 
-++++++          files would not be feasible using a tape drive.
-++++++
-++++++Item 17:  Quick release of FD-SD connection
-++++++  Origin: Frank Volf (frank at deze dot org)
-++++++  Date:   17 november 2005
-++++++  Status:
-++++++
-++++++   What:  In the bacula implementation a backup is finished after all data
-++++++          and attributes are succesfully written to storage.  When using a
-++++++          tape backup it is very annoying that a backup can take a day,
-++++++          simply because the current tape (or whatever) is full and the
-++++++          administrator has not put a new one in.  During that time the
-++++++          system cannot be taken off-line, because there is still an open
-++++++          session between the storage daemon and the file daemon on the
-++++++          client.
-++++++
-++++++          Although this is a very good strategey for making "safe backups"
-++++++          This can be annoying for e.g.  laptops, that must remain
-++++++          connected until the bacukp is completed.
-++++++
-++++++          Using a new feature called "migration" it will be possible to
-++++++          spool first to harddisk (using a special 'spool' migration
-++++++          scheme) and then migrate the backup to tape.
-++++++
-++++++          There is still the problem of getting the attributes committed.
-++++++          If it takes a very long time to do, with the current code, the
-++++++          job has not terminated, and the File daemon is not freed up.  The
-++++++          Storage daemon should release the File daemon as soon as all the
-++++++          file data and all the attributes have been sent to it (the SD).
-++++++          Currently the SD waits until everything is on tape and all the
-++++++          attributes are transmitted to the Director before signalling
-++++++          completion to the FD. I don't think I would have any problem
-++++++          changing this.  The reason is that even if the FD reports back to
-++++++          the Dir that all is OK, the job will not terminate until the SD
-++++++          has done the same thing -- so in a way keeping the SD-FD link
-++++++          open to the very end is not really very productive ...
-+++++ 
-++++++   Why:   Makes backup of laptops much easier.
-+++++ 
-+++++ 
-+++++ ============= Empty RFC form ===========
-+++++@@ -245,33 +413,4 @@
-+++++ ============== End RFC form ==============
-+++++ 
-+++++ 
-+++++-Items completed for release 1.38.0:
-+++++-#4   Embedded Python Scripting (implemented in all Daemons)
-+++++-#5   Events that call a Python program (Implemented in all
-+++++-       daemons, but more cleanup work to be done).
-+++++-#6   Select one from among Multiple Storage Devices for Job.
-+++++-       This is already implemented in 1.37.
-+++++-#7   Single Job Writing to Multiple Storage Devices. This is
-+++++-       currently implemented with a Clone feature.
-+++++-#-   Full multiple drive Autochanger support (done in 1.37)
-+++++-#-   Built in support for communications encryption (TLS) 
-+++++-       done by Landon Fuller.
-+++++-#    Support for Unicode characters
-+++++-       (via UTF-8) on Win32 machines thanks to Thorsten Engel.
-+++++-Item  8:  Break the one-to-one Relationship between a Job and a
-+++++-          Specific Storage Device (or Devices if #10 is implemented).
-+++++-
-+++++-Completed items from last year's list:
-+++++-Item 1:   Multiple simultaneous Jobs. (done)
-+++++-Item 3:   Write the bscan program -- also write a bcopy program (done).
-+++++-Item 5:   Implement Label templates (done).
-+++++-Item 6:   Write a regression script (done)
-+++++-Item 9:   Add SSL to daemon communications (done by Landon Fuller)
-+++++-Item 10:  Define definitive tape format (done)
-+++++-Item 3:   GUI for interactive restore. Partially Implemented in 1.34
-+++++-          Note, there is now a complete Webmin plugin, a partial
-+++++-          GNOME console, and an excellent wx-console GUI.
-+++++-Item 4:   GUI for interactive backup
-+++++-Item 2:   Job Data Spooling.
-+++++-    Done: Regular expression matching.
-+++++-Item 10:  New daemon communication protocol (this has been dropped).
-++++++Items completed for release 1.38.0 -- see kernsdone
-+++++Index: patches/1.38.1-to-1.38.2.patch
-+++++===================================================================
-+++++RCS file: patches/1.38.1-to-1.38.2.patch
-+++++diff -N patches/1.38.1-to-1.38.2.patch
-+++++--- /dev/null     1 Jan 1970 00:00:00 -0000
-++++++++ patches/1.38.1-to-1.38.2.patch        21 Nov 2005 13:13:01 -0000
-+++++@@ -0,0 +1,1414 @@
-++++++
-++++++ This patch fixes the following bugs:
-++++++
-++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-++++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
-++++++  says that this patch does not fix his problem)
-++++++- Fix cancel failure bug. Bug #481
-++++++- Fix failure when Pool name has spaces. Bug #487
-++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-++++++- Fix a couple of free()s in src/filed/acl.c
-++++++- Fix memory overrun in bfile.c in building OS X resource
-++++++  fork filename. Bug #489
-++++++
-++++++This patch is applied to Bacula source version 1.38.1 and will
-++++++produce Bacula source version 1.38.2.  Apply it with:
-++++++
-++++++   cd <bacula-1.38.1-source>
-++++++   ./configure (your options) if not already done
-++++++   patch -p0 <1.38.1-to-1.38.2.patch
-++++++   make
-++++++   make install
-++++++
-++++++? osx_finder.patch
-++++++Index: kernstodo
-++++++===================================================================
-++++++RCS file: /cvsroot/bacula/bacula/kernstodo,v
-++++++retrieving revision 1.570.2.6
-++++++diff -u -r1.570.2.6 kernstodo
-++++++--- kernstodo    4 Nov 2005 09:16:49 -0000       1.570.2.6
-+++++++++ kernstodo    21 Nov 2005 13:06:36 -0000
-++++++@@ -1,5 +1,5 @@
-++++++                     Kern's ToDo List
-++++++-                     03 November 2005
-+++++++                     21 November 2005
-++++++ 
-++++++ Major development:      
-++++++ Project                     Developer
-++++++@@ -7,8 +7,6 @@
-++++++ Version 1.37                Kern (see below)
-++++++ ========================================================
-++++++ 
-++++++-Final items for 1.37 before release:
-++++++-
-++++++ Document:
-++++++ - Does ClientRunAfterJob fail the job on a bad return code?
-++++++ - Document cleaning up the spool files:
-++++++@@ -18,6 +16,8 @@
-++++++ - Does WildFile match against full name?  Doc.
-++++++ 
-++++++ For 1.39:
-+++++++- Make sure that all do_prompt() calls in Dir check for
-+++++++  -1 (error) and -2 (cancel) returns.
-++++++ - Look at -D_FORTIFY_SOURCE=2
-++++++ - Add Win32 FileSet definition somewhere
-++++++ - Look at fixing restore status stats in SD.
-++++++@@ -27,6 +27,12 @@
-++++++   encountered, read many times (as it currently does), and if the
-++++++   block cannot be read, skip to the next block, and try again.  If
-++++++   that fails, skip to the next file and try again, ...
-+++++++- Add level table:
-+++++++  create table LevelType (LevelType binary(1), LevelTypeLong tinyblob);
-+++++++  insert into LevelType (LevelType,LevelTypeLong) values
-+++++++  ("F","Full"),
-+++++++  ("D","Diff"),
-+++++++  ("I","Inc");
-++++++ - Add ACL to restore only to original location.
-++++++ - Add a recursive mark command (rmark) to restore.
-++++++ - "Minimum Job Interval = nnn" sets minimum interval between Jobs
-++++++@@ -1246,219 +1252,4 @@
-++++++ ====
-++++++ 
-++++++ 
-++++++-=== Done
-++++++-- Save mount point for directories not traversed with onefs=yes.
-++++++-- Add seconds to start and end times in the Job report output.
-++++++-- if 2 concurrent backups are attempted on the same tape
-++++++-  drive (autoloader) into different tape pools, one of them will exit
-++++++-  fatally instead of halting until the drive is idle
-++++++-- Update StartTime if job held in Job Queue.
-++++++-- Look at www.nu2.nu/pebuilder as a helper for full windows
-++++++-  bare metal restore. (done by Scott)
-++++++-- Fix orphanned buffers:
-++++++-   Orphaned buffer:      24 bytes allocated at line 808 of rufus-dir job.c
-++++++-   Orphaned buffer:      40 bytes allocated at line 45 of rufus-dir alist.c
-++++++-- Implement Preben's suggestion to add
-++++++-  File System Types = ext2, ext3 
-++++++-  to FileSets, thus simplifying backup of *all* local partitions.
-++++++-- Try to open a device on each Job if it was not opened
-++++++-  when the SD started.
-++++++-- Add dump of VolSessionId/Time and FileIndex with bls.
-++++++-- If Bacula does not find the right tape in the Autochanger,
-++++++-  then mark the tape in error and move on rather than asking
-++++++-  for operator intervention.
-++++++-- Cancel command should include JobId in list of Jobs.
-++++++-- Add performance testing hooks
-++++++-- Bootstrap from JobMedia records.
-++++++-- Implement WildFile and WildDir to solve problem of 
-++++++-  saving only *.doc files.
-++++++-- Fix
-++++++-   Please use the "label"  command to create a new Volume for:
-++++++-       Storage:      DDS-4-changer
-++++++-       Media type:   
-++++++-       Pool:         Default
-++++++-   label
-++++++-   The defined Storage resources are:
-++++++-- Copy Changer Device and Changer Command from Autochanger
-++++++-  to Device resource in SD if none given in Device resource.
-++++++-- 1. Automatic use of more than one drive in an autochanger (done)
-++++++-- 2. Automatic selection of the correct drive for each Job (i.e.
-++++++-     selects a drive with an appropriate Volume for the Job) (done)
-++++++-- 6. Allow multiple simultaneous Jobs referencing the same pool write
-++++++-    to several tapes (some new directive(s) are are probably needed for
-++++++-    this) (done)
-++++++-- Locking (done)
-++++++-- Key on Storage rather than Pool (done)
-++++++-- Allow multiple drives to use same Pool (change jobq.c DIR) (done).
-++++++-- Synchronize multiple drives so that not more
-++++++-  than one loads a tape and any time (done)
-++++++-- 4. Use Changer Device and Changer Command specified in the
-++++++-     Autochanger resource, if none is found in the Device resource.
-++++++-    You can continue to specify them in the Device resource if you want
-++++++-    or need them to be different for each device.
-++++++-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") 
-++++++-    that can allow a Device be part of an Autochanger, and hence the changer
-++++++-    script protected, but if set to no, will prevent the Device from being 
-++++++-    automatically selected from the changer. This allows the device to
-++++++-    be directly accessed through its Device name, but not through the
-++++++-    AutoChanger name.
-++++++-#6   Select one from among Multiple Storage Devices for Job
-++++++-#5   Events that call a Python program 
-++++++-     (Implemented in Dir/SD)
-++++++-- Make sure the Device name is in the Query packet returned.
-++++++-- Don't start a second file job if one is already running.
-++++++-- Implement EOF/EOV labels for ANSI labels
-++++++-- Implement IBM labels.
-++++++-- When Python creates a new label, the tape is immediately
-++++++-  recycled and no label created. This happens when using   
-++++++-  autolabeling -- even when Python doesn't generate the name.
-++++++-- Scratch Pool where the volumes can be re-assigned to any Pool.
-++++++-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) 
-++++++-  is busy reading. Job 6 canceled.
-++++++-- Remove separate thread for opening devices in SD.  On the other
-++++++-  hand, don't block waiting for open() for devices.
-++++++-- Fix code to either handle updating NumVol or to calculate it in
-++++++-  Dir next_vol.c
-++++++-- Ensure that you cannot exclude a directory or a file explicitly
-++++++-  Included with File.
-++++++-#4   Embedded Python Scripting 
-++++++-     (Implemented in Dir/SD/FD)
-++++++-- Add Python writable variable for changing the Priority,
-++++++-    Client, Storage, JobStatus (error), ...
-++++++-- SD Python
-++++++-  - Solicit Events
-++++++-- Add disk seeking on restore; turn off seek on tapes.
-++++++-  stored/match_bsr.c
-++++++-- Look at dird_conf.c:1000: warning: `int size' 
-++++++-  might be used uninitialized in this function
-++++++-- Indicate when a Job is purged/pruned during restore.
-++++++-- Implement some way to turn off automatic pruning in Jobs.
-++++++-- Implement a way an Admin Job can prune, possibly multiple
-++++++-  clients -- Python script?
-++++++-- Look at Preben's acl.c error handling code.
-++++++-- SD crashes after a tape restore then doing a backup. 
-++++++-- If drive is opened read/write, close it and re-open
-++++++-  read-only if doing a restore, and vice-versa.
-++++++-- Windows restore:
-++++++-  data-fd: RestoreFiles.2004-12-07_15.56.42 Error:
-++++++-  > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der
-++++++-  > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen
-++++++-  > Prozess verwendet wird.
-++++++-  Restore restores all files, but then fails at the end trying
-++++++-  to set the attributes of e:
-++++++-  from failed jobs.- Resolve the problem between Device name and Archive name,
-++++++-  and fix SD messages.
-++++++-- Tell the "restore" user when browsing is no longer possible.
-++++++-- Add a restore directory-x
-++++++-- Write non-optimized bsrs from the JobMedia and Media records,
-++++++-  even after Files are pruned.
-++++++-- Delete Stripe and Copy from VolParams to save space.
-++++++-- Fix option 2 of restore -- list where file is backed up -- require Client,
-++++++-  then list last 20 backups.
-++++++-- Finish implementation of passing all Storage and Device needs to
-++++++-  the SD.
-++++++-- Move test for max wait time exceeded in job.c up -- Peter's idea.
-++++++-##   Consider moving docs to their own project.
-++++++-##   Move rescue to its own project.
-++++++-- Add client version to the Client name line that prints in
-++++++-  the Job report.
-++++++-- Fix the Rescue CDROM.
-++++++-- By the way: on page http://www.bacula.org/?page=tapedrives , at the 
-++++++-  bottom, the link to "Tape Testing Chapter" is broken. It goes to 
-++++++-  /html-manual/... while the others point to /rel-manual/...
-++++++-- Device resource needs the "name" of the SD.
-++++++-- Specify a single directory to restore.
-++++++-- Implement MediaType keyword in bsr?   
-++++++-- Add a date and time stamp at the beginning of every line in the 
-++++++-  Job report (Volker Sauer).
-++++++-- Add level to estimate command.
-++++++-- Add "limit=n" for "list jobs"
-++++++-- Make bootstrap filename unique.
-++++++-- Make Dmsg look at global before calling subroutine.
-++++++-- From Chris Hull:
-++++++-   it seems to be complaining about 12:00pm which should be a valid 12
-++++++-   hour time.  I changed the time to 11:59am and everything works fine.
-++++++-   Also 12:00am works fine.  0:00pm also works (which I don't think
-++++++-   should).  None of the values 12:00pm - 12:59pm work for that matter.
-++++++-- Require restore via the restore command or make a restore Job
-++++++-  get the bootstrap file.
-++++++-- Implement Maximum Job Spool Size
-++++++-- Fix 3993 error in SD. It forgets to look at autochanger
-++++++-  resource for device command, ...
-++++++-- 3. Prevent two drives requesting the same Volume in any given
-++++++-     autochanger, by checking if a Volume is mounted on another drive
-++++++-     in an Autochanger.
-++++++-- Upgrade to MySQL 4.1.12 See:  
-++++++-  http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html
-++++++-- Add # Job Level date to bsr file
-++++++-- Implement "PreferMountedVolumes = yes|no" in Job resource.
-++++++-##   Integrate web-bacula into a new Bacula project with
-++++++-     bimagemgr.
-++++++-- Cleaning tapes should have Status "Cleaning" rather than append.
-++++++-- Make sure that Python has access to Client address/port so that
-++++++-  it can check if Clients are alive.
-++++++-- Review all items in "restore".
-++++++-- Fix PostgreSQL GROUP BY problems in restore.
-++++++-- Fix PostgreSQL sql problems in bugs.
-++++++-- After rename
-++++++-  04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume 
-++++++-     "DLT-13Feb04".
-++++++-  Current Volume "DLT-04Jul05" not acceptable because:
-++++++-  1997 Volume "DLT-13Feb04" not in catalog.
-++++++-  04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device 
-++++++-     "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02
-++++++-##   Create a new GUI chapter explaining all the GUI programs.
-++++++--    Make "update slots" when pointing to Autochanger, remove
-++++++-     all Volumes from other drives.  "update slots all-drives"?
-++++++-     No, this is done by modifying mtx-changer to list what is
-++++++-     in the drives.
-++++++-- Finish TLS implementation.
-++++++-- Port limiting -m in iptables to prevent DoS attacks
-++++++-  could cause broken pipes on Bacula.
-++++++-6. Build and test the Volume Shadow Copy (VSS) for Win32. 
-++++++--  Allow cancel of unknown Job
-++++++--  State not saved when closing Win32 FD by icon
-++++++--  bsr-opt-test fails. bsr deleted. Fix.
-++++++--  Move Python daemon variables from Job to Bacula object.
-++++++-   WorkingDir, ConfigFile
-++++++-- Document that Bootstrap files can be written with cataloging
-++++++-  turned off.
-++++++-- Document details of ANSI/IBM labels
-++++++-- OS linux 2.4
-++++++-  1) ADIC, DLT, FastStor 4000, 7*20GB
-++++++-- Linux Sony LIB-D81, AIT-3 library works.
-++++++-- Doc the following
-++++++-  to activate, check or disable the hardware compression feature on my 
-++++++-  exb-8900 i use the exabyte "MammothTool" you can get it here:
-++++++-  http://www.exabyte.com/support/online/downloads/index.cfm
-++++++-  There is a solaris version of this tool. With option -C 0 or 1 you can 
-++++++-  disable or activate compression. Start this tool without any options for 
-++++++-  a small reference.
-++++++-- Document Heartbeat Interval in the dealing with firewalls section.
-++++++-- Document new CDROM directory.
-++++++-- On Win32 working directory must have drive letter ????
-++++++-- On Win32 working directory must be writable by SYSTEM to
-++++++-  do restores.
-++++++-- Document that ChangerDevice is used for Alert command.
-++++++-- Add better documentation on how restores can be done
-++++++-8. Take one more try at making DVD writing work (no go)
-++++++-7. Write a bacula-web document
-++++++-- Why isn't the DEVICE structure defined when doing
-++++++-  a reservation?
-++++++-- Multi-drive changer seems to only use drive 0
-++++++-  Multiple drives don't seem to be opened.
-++++++-- My database is growing
-++++++-- Call GetLastError() in the berrno constructor rather
-++++++-  than delaying until strerror.
-++++++-- Tape xxx in drive 0, requested in drive 1
-++++++-- The mount command does not work with drives other than 0.
-++++++-- A mount should cause the SD to re-examine what Slot is   
-++++++-  loaded.
-++++++-- The SD locks on to the first available drive then
-++++++-  wants a Volume that is released but in another drive --
-++++++-  chaos.
-++++++-- Run the regression scripts on Solaris and FreeBSD
-++++++--  Figure out how to package gui, and rescue programs.
-++++++-- Add a .dir command to restore tree code to eliminate the problem
-++++++-- Mount after manually unloading changer causes hang in SD
-++++++-- Fix JobACL with restore by JobId.
-+++++++=== Done -- see kernsdone
-++++++Index: kes-1.38
-++++++===================================================================
-++++++RCS file: /cvsroot/bacula/bacula/kes-1.38,v
-++++++retrieving revision 1.1.2.13
-++++++diff -u -r1.1.2.13 kes-1.38
-++++++--- kes-1.38     14 Nov 2005 20:20:38 -0000      1.1.2.13
-+++++++++ kes-1.38     21 Nov 2005 13:06:36 -0000
-++++++@@ -3,6 +3,17 @@
-++++++ 
-++++++ General:
-++++++ 
-+++++++Changes after release of 1.38.1:
-+++++++20Oct05
-+++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-+++++++- Fix bnet-server bug found on OpenBSD. Bug #486
-+++++++- Fix cancel failure bug. Bug #481
-+++++++- Fix failure when Pool name has spaces. Bug #487   
-+++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-+++++++- Fix a couple of free()s in src/filed/acl.c
-+++++++- Fix memory overrun in bfile.c in building OS X resource
-+++++++  fork filename. Bug #489 
-+++++++
-++++++ Changes to 1.38.1:
-++++++ 14Oct05
-++++++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
-++++++Index: projects
-++++++===================================================================
-++++++RCS file: /cvsroot/bacula/bacula/projects,v
-++++++retrieving revision 1.12.2.3
-++++++diff -u -r1.12.2.3 projects
-++++++--- projects     10 Nov 2005 20:25:27 -0000      1.12.2.3
-+++++++++ projects     21 Nov 2005 13:06:37 -0000
-++++++@@ -228,7 +228,175 @@
-++++++ 
-++++++   Why:    Performance enhancement.
-++++++ 
-+++++++Item 13:  Let Bacula log tape usage and handle drive cleaning cycles.
-+++++++  Date:   November 11, 2005
-+++++++  Origin: Arno Lehmann <al at its-lehmann dot de>
-+++++++  Status:
-+++++++
-+++++++  What:   Make Bacula manage tape life cycle information and drive 
-+++++++          cleaning cycles.
-+++++++
-+++++++  Why:    Both parts of this project are important when operating backups.
-+++++++          We need to know which tapes need replacement, and we need to
-+++++++          make sure the drives are cleaned when necessary.  While many
-+++++++          tape libraries and even autoloaders can handle all this
-+++++++          automatically, support by Bacula can be helpful for smaller
-+++++++          (older) libraries and single drives.  Also, checking drive
-+++++++          status during operation can prevent some failures (as I had to
-+++++++          learn the hard way...)
-+++++++
-+++++++  Notes:  First, Bacula could (and even does, to some limited extent)
-+++++++          record tape and drive usage.  For tapes, the number of mounts,
-+++++++          the amount of data, and the time the tape has actually been
-+++++++          running could be recorded.  Data fields for Read and Write time
-+++++++          and Nmber of mounts already exist in the catalog (I'm not sure
-+++++++          if VolBytes is the sum of all bytes ever written to that volume
-+++++++          by Bacula).  This information can be important when determining
-+++++++          which media to replace.  For the tape drives known to Bacula,
-+++++++          similar information is interesting to determine the device
-+++++++          status and expected life time: Time it's been Reading and
-+++++++          Writing, number of tape Loads / Unloads / Errors.  This
-+++++++          information is not yet recorded as far as I know.
-+++++++
-+++++++          The next step would be implementing drive cleaning setup.
-+++++++          Bacula already has knowledge about cleaning tapes.  Once it has
-+++++++          some information about cleaning cycles (measured in drive run
-+++++++          time, number of tapes used, or calender days, for example) it
-+++++++          can automatically execute tape cleaning (with an autochanger,
-+++++++          obviously) or ask for operator assistence loading a cleaning
-+++++++          tape.
-+++++++
-+++++++          The next step would be to implement TAPEALERT checks not only
-+++++++          when changing tapes and only sending he information to the
-+++++++          administrator, but rather checking after each tape error,
-+++++++          checking on a regular basis (for example after each tape file),
-+++++++          and also before unloading and after loading a new tape.  Then,
-+++++++          depending on the drives TAPEALERT state and the know drive
-+++++++          cleaning state Bacula could automatically schedule later
-+++++++          cleaning, clean immediately, or inform the operator.
-+++++++
-+++++++          Implementing this would perhaps require another catalog change
-+++++++          and perhaps major changes in SD code and the DIR-SD protocoll,
-+++++++          so I'd only consider this worth implementing if it would
-+++++++          actually be used or even needed by many people. 
-+++++++
-+++++++Item 14:  Merging of multiple backups into a single one. (Also called Synthetic
-+++++++          Backup or Consolidation).
-+++++++
-+++++++  Origin: Marc Cousin and Eric Bollengier 
-+++++++  Date:   15 November 2005
-+++++++  Status: Depends on first implementing project Item 1 (Migration).
-+++++++
-+++++++  What:   A merged backup is a backup made without connecting to the Client.
-+++++++          It would be a Merge of existing backups into a single backup.
-+++++++          In effect, it is like a restore but to the backup medium.
-+++++++
-+++++++          For instance, say that last sunday we made a full backup.  Then
-+++++++          all week long, we created incremental backups, in order to do
-+++++++          them fast.  Now comes sunday again, and we need another full.
-+++++++          The merged backup makes it possible to do instead an incremental
-+++++++          backup (during the night for instance), and then create a merged
-+++++++          backup during the day, by using the full and incrementals from
-+++++++          the week.  The merged backup will be exactly like a full made
-+++++++          sunday night on the tape, but the production interruption on the
-+++++++          Client will be minimal, as the Client will only have to send
-+++++++          incrementals.
-+++++++
-+++++++          In fact, if it's done correctly, you could merge all the
-+++++++          Incrementals into single Incremental, or all the Incrementals
-+++++++          and the last Differential into a new Differential, or the Full,
-+++++++          last differential and all the Incrementals into a new Full
-+++++++          backup.  And there is no need to involve the Client.
-+++++++
-+++++++  Why:    The benefit is that :
-+++++++          - the Client just does an incremental ;
-+++++++          - the merged backup on tape is just as a single full backup,
-+++++++            and can be restored very fast.
-+++++++
-+++++++          This is also a way of reducing the backup data since the old
-+++++++          data can then be pruned (or not) from the catalog, possibly
-+++++++          allowing older volumes to be recycled
-+++++++
-+++++++Item 15:  Automatic disabling of devices
-+++++++   Date:   2005-11-11
-+++++++   Origin: Peter Eriksson <peter at ifm.liu dot se>
-+++++++   Status:
-+++++++
-+++++++   What:  After a configurable amount of fatal errors with a tape drive
-+++++++          Bacula should automatically disable further use of a certain
-+++++++          tape drive. There should also be "disable"/"enable" commands in
-+++++++          the "bconsole" tool.
-+++++++
-+++++++   Why:   On a multi-drive jukebox there is a possibility of tape drives
-+++++++          going bad during large backups (needing a cleaning tape run,
-+++++++          tapes getting stuck). It would be advantageous if Bacula would
-+++++++          automatically disable further use of a problematic tape drive
-+++++++          after a configurable amount of errors has occured.
-+++++++
-+++++++          An example: I have a multi-drive jukebox (6 drives, 380+ slots)
-+++++++          where tapes occasionally get stuck inside the drive. Bacula will
-+++++++          notice that the "mtx-changer" command will fail and then fail
-+++++++          any backup jobs trying to use that drive. However, it will still
-+++++++          keep on trying to run new jobs using that drive and fail -
-+++++++          forever, and thus failing lots and lots of jobs... Since we have
-+++++++          many drives Bacula could have just automatically disabled
-+++++++          further use of that drive and used one of the other ones
-+++++++          instead.
-+++++++
-+++++++
-+++++++Item 16:  Directive/mode to backup only file changes, not entire file
-+++++++  Date:   11 November 2005
-+++++++  Origin: Joshua Kugler <joshua dot kugler at uaf dot edu>
-+++++++          Marek Bajon <mbajon at bimsplus dot com dot pl>
-+++++++  Status: RFC
-+++++++
-+++++++  What:   Currently when a file changes, the entire file will be backed up in
-+++++++          the next incremental or full backup.  To save space on the tapes
-+++++++          it would be nice to have a mode whereby only the changes to the
-+++++++          file would be backed up when it is changed.
-+++++++
-+++++++  Why:    This would save lots of space when backing up large files such as 
-+++++++          logs, mbox files, Outlook PST files and the like.
-+++++++
-+++++++  Notes:  This would require the usage of disk-based volumes as comparing 
-+++++++          files would not be feasible using a tape drive.
-+++++++
-+++++++Item 17:  Quick release of FD-SD connection
-+++++++  Origin: Frank Volf (frank at deze dot org)
-+++++++  Date:   17 november 2005
-+++++++  Status:
-+++++++
-+++++++   What:  In the bacula implementation a backup is finished after all data
-+++++++          and attributes are succesfully written to storage.  When using a
-+++++++          tape backup it is very annoying that a backup can take a day,
-+++++++          simply because the current tape (or whatever) is full and the
-+++++++          administrator has not put a new one in.  During that time the
-+++++++          system cannot be taken off-line, because there is still an open
-+++++++          session between the storage daemon and the file daemon on the
-+++++++          client.
-+++++++
-+++++++          Although this is a very good strategey for making "safe backups"
-+++++++          This can be annoying for e.g.  laptops, that must remain
-+++++++          connected until the bacukp is completed.
-+++++++
-+++++++          Using a new feature called "migration" it will be possible to
-+++++++          spool first to harddisk (using a special 'spool' migration
-+++++++          scheme) and then migrate the backup to tape.
-+++++++
-+++++++          There is still the problem of getting the attributes committed.
-+++++++          If it takes a very long time to do, with the current code, the
-+++++++          job has not terminated, and the File daemon is not freed up.  The
-+++++++          Storage daemon should release the File daemon as soon as all the
-+++++++          file data and all the attributes have been sent to it (the SD).
-+++++++          Currently the SD waits until everything is on tape and all the
-+++++++          attributes are transmitted to the Director before signalling
-+++++++          completion to the FD. I don't think I would have any problem
-+++++++          changing this.  The reason is that even if the FD reports back to
-+++++++          the Dir that all is OK, the job will not terminate until the SD
-+++++++          has done the same thing -- so in a way keeping the SD-FD link
-+++++++          open to the very end is not really very productive ...
-++++++ 
-+++++++   Why:   Makes backup of laptops much easier.
-++++++ 
-++++++ 
-++++++ ============= Empty RFC form ===========
-++++++@@ -245,33 +413,4 @@
-++++++ ============== End RFC form ==============
-++++++ 
-++++++ 
-++++++-Items completed for release 1.38.0:
-++++++-#4   Embedded Python Scripting (implemented in all Daemons)
-++++++-#5   Events that call a Python program (Implemented in all
-++++++-       daemons, but more cleanup work to be done).
-++++++-#6   Select one from among Multiple Storage Devices for Job.
-++++++-       This is already implemented in 1.37.
-++++++-#7   Single Job Writing to Multiple Storage Devices. This is
-++++++-       currently implemented with a Clone feature.
-++++++-#-   Full multiple drive Autochanger support (done in 1.37)
-++++++-#-   Built in support for communications encryption (TLS) 
-++++++-       done by Landon Fuller.
-++++++-#    Support for Unicode characters
-++++++-       (via UTF-8) on Win32 machines thanks to Thorsten Engel.
-++++++-Item  8:  Break the one-to-one Relationship between a Job and a
-++++++-          Specific Storage Device (or Devices if #10 is implemented).
-++++++-
-++++++-Completed items from last year's list:
-++++++-Item 1:   Multiple simultaneous Jobs. (done)
-++++++-Item 3:   Write the bscan program -- also write a bcopy program (done).
-++++++-Item 5:   Implement Label templates (done).
-++++++-Item 6:   Write a regression script (done)
-++++++-Item 9:   Add SSL to daemon communications (done by Landon Fuller)
-++++++-Item 10:  Define definitive tape format (done)
-++++++-Item 3:   GUI for interactive restore. Partially Implemented in 1.34
-++++++-          Note, there is now a complete Webmin plugin, a partial
-++++++-          GNOME console, and an excellent wx-console GUI.
-++++++-Item 4:   GUI for interactive backup
-++++++-Item 2:   Job Data Spooling.
-++++++-    Done: Regular expression matching.
-++++++-Item 10:  New daemon communication protocol (this has been dropped).
-+++++++Items completed for release 1.38.0 -- see kernsdone
-++++++Index: patches/1.38.1-to-1.38.2.patch
-++++++===================================================================
-++++++RCS file: patches/1.38.1-to-1.38.2.patch
-++++++diff -N patches/1.38.1-to-1.38.2.patch
-++++++--- /dev/null    1 Jan 1970 00:00:00 -0000
-+++++++++ patches/1.38.1-to-1.38.2.patch       21 Nov 2005 13:06:37 -0000
-++++++@@ -0,0 +1,412 @@
-+++++++
-+++++++ This patch fixes the following bugs:
-+++++++
-+++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-+++++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
-+++++++  says that this patch does not fix his problem)
-+++++++- Fix cancel failure bug. Bug #481
-+++++++- Fix failure when Pool name has spaces. Bug #487
-+++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-+++++++- Fix a couple of free()s in src/filed/acl.c
-+++++++- Fix memory overrun in bfile.c in building OS X resource
-+++++++  fork filename. Bug #489
-+++++++
-+++++++This patch is applied to Bacula source version 1.38.1 and will
-+++++++produce Bacula source version 1.38.2.  Apply it with:
-+++++++
-+++++++   cd <bacula-1.38.1-source>
-+++++++   ./configure (your options) if not already done
-+++++++   patch -p0 <1.38.1-to-1.38.2.patch
-+++++++   make
-+++++++   make install
-+++++++
-+++++++Index: kes-1.38
-+++++++===================================================================
-+++++++RCS file: /cvsroot/bacula/bacula/kes-1.38,v
-+++++++retrieving revision 1.1.2.13
-+++++++diff -u -r1.1.2.13 kes-1.38
-+++++++--- kes-1.38    14 Nov 2005 20:20:38 -0000      1.1.2.13
-++++++++++ kes-1.38    21 Nov 2005 12:53:36 -0000
-+++++++@@ -3,6 +3,17 @@
-+++++++ 
-+++++++ General:
-+++++++ 
-++++++++Changes after release of 1.38.1:
-++++++++20Oct05
-++++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-++++++++- Fix bnet-server bug found on OpenBSD. Bug #486
-++++++++- Fix cancel failure bug. Bug #481
-++++++++- Fix failure when Pool name has spaces. Bug #487   
-++++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-++++++++- Fix a couple of free()s in src/filed/acl.c
-++++++++- Fix memory overrun in bfile.c in building OS X resource
-++++++++  fork filename. Bug #489 
-++++++++
-+++++++ Changes to 1.38.1:
-+++++++ 14Oct05
-+++++++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
-+++++++Index: src/version.h
-+++++++===================================================================
-+++++++RCS file: /cvsroot/bacula/bacula/src/version.h,v
-+++++++retrieving revision 1.554.2.14
-+++++++diff -u -r1.554.2.14 version.h
-+++++++--- src/version.h       14 Nov 2005 14:21:58 -0000      1.554.2.14
-++++++++++ src/version.h       21 Nov 2005 12:53:37 -0000
-+++++++@@ -3,9 +3,9 @@
-+++++++  */
-+++++++ 
-+++++++ #undef  VERSION
-+++++++-#define VERSION "1.38.1"
-+++++++-#define BDATE   "14 November 2005"
-+++++++-#define LSMDATE "14Nov05"
-++++++++#define VERSION "1.38.2"
-++++++++#define BDATE   "20 November 2005"
-++++++++#define LSMDATE "20Nov05"
-+++++++ 
-+++++++ /* Debug flags */
-+++++++ #undef  DEBUG
-+++++++Index: src/dird/catreq.c
-+++++++===================================================================
-+++++++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v
-+++++++retrieving revision 1.77.2.1
-+++++++diff -u -r1.77.2.1 catreq.c
-+++++++--- src/dird/catreq.c   26 Oct 2005 14:02:04 -0000      1.77.2.1
-++++++++++ src/dird/catreq.c   21 Nov 2005 12:53:37 -0000
-+++++++@@ -10,7 +10,7 @@
-+++++++  *  Basic tasks done here:
-+++++++  *      Handle Catalog services.
-+++++++  *
-+++++++- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++++++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++++++  */
-+++++++ /*
-+++++++    Copyright (C) 2001-2005 Kern Sibbald
-+++++++@@ -117,6 +117,7 @@
-+++++++    if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) {
-+++++++       memset(&pr, 0, sizeof(pr));
-+++++++       bstrncpy(pr.Name, pool_name, sizeof(pr.Name));
-++++++++      unbash_spaces(pr.Name);
-+++++++       ok = db_get_pool_record(jcr, jcr->db, &pr);
-+++++++       if (ok) {
-+++++++          mr.PoolId = pr.PoolId;
-+++++++Index: src/dird/ua_restore.c
-+++++++===================================================================
-+++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v
-+++++++retrieving revision 1.101.2.1
-+++++++diff -u -r1.101.2.1 ua_restore.c
-+++++++--- src/dird/ua_restore.c       26 Oct 2005 14:02:04 -0000      1.101.2.1
-++++++++++ src/dird/ua_restore.c       21 Nov 2005 12:53:37 -0000
-+++++++@@ -10,7 +10,7 @@
-+++++++  *
-+++++++  *     Kern Sibbald, July MMII
-+++++++  *
-+++++++- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++++++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++++++  */
-+++++++ /*
-+++++++    Copyright (C) 2002-2005 Kern Sibbald
-+++++++@@ -573,6 +573,7 @@
-+++++++          }
-+++++++          return 2;
-+++++++ 
-++++++++      case -2:                        /* Period entered to cancel */
-+++++++       case 11:                        /* Cancel or quit */
-+++++++          return 0;
-+++++++       }
-+++++++Index: src/dird/ua_run.c
-+++++++===================================================================
-+++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v
-+++++++retrieving revision 1.71
-+++++++diff -u -r1.71 ua_run.c
-+++++++--- src/dird/ua_run.c   10 Aug 2005 16:35:19 -0000      1.71
-++++++++++ src/dird/ua_run.c   21 Nov 2005 12:53:38 -0000
-+++++++@@ -851,6 +851,8 @@
-+++++++             bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
-+++++++          }
-+++++++          goto try_again;
-++++++++      case -1:                        /* error or cancel */
-++++++++         goto bail_out;
-+++++++       default:
-+++++++          goto try_again;
-+++++++       }
-+++++++Index: src/dird/ua_select.c
-+++++++===================================================================
-+++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v
-+++++++retrieving revision 1.65.2.1
-+++++++diff -u -r1.65.2.1 ua_select.c
-+++++++--- src/dird/ua_select.c        12 Nov 2005 17:30:52 -0000      1.65.2.1
-++++++++++ src/dird/ua_select.c        21 Nov 2005 12:53:39 -0000
-+++++++@@ -4,7 +4,7 @@
-+++++++  *
-+++++++  *     Kern Sibbald, October MMI
-+++++++  *
-+++++++- *   Version  $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++++++ *   Version  $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++++++  */
-+++++++ /*
-+++++++    Copyright (C) 2001-2005 Kern Sibbald
-+++++++@@ -149,7 +149,9 @@
-+++++++       }
-+++++++    }
-+++++++    UnlockRes();
-+++++++-   do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name));
-++++++++   if (do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name)) < 0) {
-++++++++      return NULL;
-++++++++   }
-+++++++    store = (STORE *)GetResWithName(R_STORAGE, name);
-+++++++    return store;
-+++++++ }
-+++++++@@ -170,7 +172,9 @@
-+++++++       }
-+++++++    }
-+++++++    UnlockRes();
-+++++++-   do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name));
-++++++++   if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) {
-++++++++      return NULL;
-++++++++   }
-+++++++    fs = (FILESET *)GetResWithName(R_FILESET, name);
-+++++++    return fs;
-+++++++ }
-+++++++@@ -202,7 +206,9 @@
-+++++++          }
-+++++++       }
-+++++++       UnlockRes();
-+++++++-      do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name));
-++++++++      if (do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name)) < 0) {
-++++++++         return NULL;
-++++++++      }
-+++++++       catalog = (CAT *)GetResWithName(R_CATALOG, name);
-+++++++    }
-+++++++    return catalog;
-+++++++@@ -225,7 +231,9 @@
-+++++++       }
-+++++++    }
-+++++++    UnlockRes();
-+++++++-   do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name));
-++++++++   if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) {
-++++++++      return NULL;
-++++++++   }
-+++++++    job = (JOB *)GetResWithName(R_JOB, name);
-+++++++    return job;
-+++++++ }
-+++++++@@ -246,7 +254,9 @@
-+++++++       }
-+++++++    }
-+++++++    UnlockRes();
-+++++++-   do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name));
-++++++++   if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) {
-++++++++      return NULL;
-++++++++   }
-+++++++    job = (JOB *)GetResWithName(R_JOB, name);
-+++++++    return job;
-+++++++ }
-+++++++@@ -269,7 +279,9 @@
-+++++++       }
-+++++++    }
-+++++++    UnlockRes();
-+++++++-   do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name));
-++++++++   if (do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) {
-++++++++      return NULL;
-++++++++   }
-+++++++    client = (CLIENT *)GetResWithName(R_CLIENT, name);
-+++++++    return client;
-+++++++ }
-+++++++@@ -551,7 +563,9 @@
-+++++++       }
-+++++++    }
-+++++++    UnlockRes();
-+++++++-   do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name));
-++++++++   if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) {
-++++++++      return NULL;
-++++++++   }
-+++++++    pool = (POOL *)GetResWithName(R_POOL, name);
-+++++++    return pool;
-+++++++ }
-+++++++@@ -673,12 +687,16 @@
-+++++++  *  Returns: -1 on error
-+++++++  *            index base 0 on success, and choice
-+++++++  *               is copied to prompt if not NULL
-++++++++ *             prompt is set to the chosen prompt item string
-+++++++  */
-+++++++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
-+++++++ {
-+++++++    int i, item;
-+++++++    char pmsg[MAXSTRING];
-+++++++ 
-++++++++   if (prompt) {
-++++++++      *prompt = 0;
-++++++++   }
-+++++++    if (ua->num_prompts == 2) {
-+++++++       item = 1;
-+++++++       if (prompt) {
-+++++++@@ -698,15 +716,11 @@
-+++++++       bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
-+++++++    }
-+++++++ 
-+++++++-   if (prompt) {
-+++++++-      *prompt = 0;
-+++++++-   }
-+++++++-
-+++++++    for ( ;; ) {
-+++++++       /* First item is the prompt string, not the items */
-+++++++       if (ua->num_prompts == 1) {
-+++++++          bsendmsg(ua, _("Selection is empty!\n"));
-+++++++-         item = 0;                    /* list is empty ! */
-++++++++         item = -1;                    /* list is empty ! */
-+++++++          break;
-+++++++       }
-+++++++       if (ua->num_prompts == 2) {
-+++++++@@ -741,7 +755,7 @@
-+++++++       free(ua->prompt[i]);
-+++++++    }
-+++++++    ua->num_prompts = 0;
-+++++++-   return item - 1;
-++++++++   return item>0 ? item-1 : item;
-+++++++ }
-+++++++ 
-+++++++ 
-+++++++Index: src/dird/ua_update.c
-+++++++===================================================================
-+++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v
-+++++++retrieving revision 1.7
-+++++++diff -u -r1.7 ua_update.c
-+++++++--- src/dird/ua_update.c        28 Aug 2005 12:22:02 -0000      1.7
-++++++++++ src/dird/ua_update.c        21 Nov 2005 12:53:39 -0000
-+++++++@@ -590,7 +590,7 @@
-+++++++          update_all_vols_from_pool(ua);
-+++++++          return 1;
-+++++++       default:                        /* Done or error */
-+++++++-         bsendmsg(ua, _("Selection done.\n"));
-++++++++         bsendmsg(ua, _("Selection terminated.\n"));
-+++++++          return 1;
-+++++++       }
-+++++++    }
-+++++++Index: src/filed/acl.c
-+++++++===================================================================
-+++++++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v
-+++++++retrieving revision 1.10.2.1
-+++++++diff -u -r1.10.2.1 acl.c
-+++++++--- src/filed/acl.c     14 Nov 2005 20:20:38 -0000      1.10.2.1
-++++++++++ src/filed/acl.c     21 Nov 2005 12:53:39 -0000
-+++++++@@ -26,7 +26,7 @@
-+++++++  *
-+++++++  *   Written by Preben 'Peppe' Guldberg, December MMIV
-+++++++  *
-+++++++- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++++++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++++++  */
-+++++++ /*
-+++++++    Copyright (C) 2004-2005 Kern Sibbald
-+++++++@@ -140,7 +140,7 @@
-+++++++ 
-+++++++    if ((acl_text = acl_get(jcr->last_fname)) != NULL) {
-+++++++       len = pm_strcpy(jcr->acl_text, acl_text);
-+++++++-      free(acl_text);
-++++++++      actuallyfree(acl_text);
-+++++++       return len;
-+++++++    }
-+++++++    return -1;
-+++++++@@ -270,7 +270,7 @@
-+++++++    if ((n = getacl(jcr->last_fname, n, acls)) > 0) {
-+++++++       if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) {
-+++++++          len = pm_strcpy(jcr->acl_text, acl_text);
-+++++++-         free(acl_text);
-++++++++         actuallyfree(acl_text);
-+++++++          return len;
-+++++++       }
-+++++++    }
-+++++++Index: src/findlib/bfile.c
-+++++++===================================================================
-+++++++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v
-+++++++retrieving revision 1.40
-+++++++diff -u -r1.40 bfile.c
-+++++++--- src/findlib/bfile.c 10 Aug 2005 16:35:19 -0000      1.40
-++++++++++ src/findlib/bfile.c 21 Nov 2005 12:53:39 -0000
-+++++++@@ -623,13 +623,10 @@
-+++++++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
-+++++++ {
-+++++++    POOLMEM *rsrc_fname;
-+++++++-   size_t fname_len;
-+++++++ 
-+++++++-   fname_len = strlen(fname);
-+++++++    rsrc_fname = get_pool_memory(PM_FNAME);
-+++++++-   bstrncpy(rsrc_fname, fname, fname_len + 1);
-+++++++-   bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC,
-+++++++-      strlen(_PATH_RSRCFORKSPEC) + 1);
-++++++++   pm_strcpy(rsrc_fname, fname);
-++++++++   pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC);
-+++++++    bopen(bfd, rsrc_fname, flags, mode);
-+++++++    free_pool_memory(rsrc_fname);
-+++++++    return bfd->fid;
-+++++++Index: src/lib/bnet_server.c
-+++++++===================================================================
-+++++++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v
-+++++++retrieving revision 1.39
-+++++++diff -u -r1.39 bnet_server.c
-+++++++--- src/lib/bnet_server.c       18 Aug 2005 15:37:40 -0000      1.39
-++++++++++ src/lib/bnet_server.c       21 Nov 2005 12:53:39 -0000
-+++++++@@ -153,7 +153,6 @@
-+++++++          /* Error, get out */
-+++++++          foreach_dlist(fd_ptr, &sockfds) {
-+++++++             close(fd_ptr->fd);
-+++++++-            free((void *)fd_ptr);
-+++++++          }
-+++++++          Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror());
-+++++++          break;
-+++++++Index: src/stored/autochanger.c
-+++++++===================================================================
-+++++++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
-+++++++retrieving revision 1.47.2.3
-+++++++diff -u -r1.47.2.3 autochanger.c
-+++++++--- src/stored/autochanger.c    12 Nov 2005 17:30:53 -0000      1.47.2.3
-++++++++++ src/stored/autochanger.c    21 Nov 2005 12:53:39 -0000
-+++++++@@ -4,7 +4,7 @@
-+++++++  *
-+++++++  *   Kern Sibbald, August MMII
-+++++++  *                            
-+++++++- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++++++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++++++  */
-+++++++ /*
-+++++++    Copyright (C) 2002-2005 Kern Sibbald
-+++++++@@ -163,6 +163,7 @@
-+++++++             rtn_stat = -1;            /* hard error */
-+++++++          }
-+++++++          Dmsg2(400, "load slot %d status=%d\n", slot, status);
-++++++++         unlock_changer(dcr);
-+++++++       } else {
-+++++++          status = 0;                  /* we got what we want */
-+++++++          dev->Slot = slot;            /* set currently loaded slot */
-+++++++@@ -174,7 +175,6 @@
-+++++++    } else {
-+++++++       rtn_stat = 0;                   /* no changer found */
-+++++++    }
-+++++++-   unlock_changer(dcr);
-+++++++    free_pool_memory(changer);
-+++++++    return rtn_stat;
-+++++++ 
-+++++++Index: src/tray-monitor/tray-monitor.c
-+++++++===================================================================
-+++++++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v
-+++++++retrieving revision 1.25.2.1
-+++++++diff -u -r1.25.2.1 tray-monitor.c
-+++++++--- src/tray-monitor/tray-monitor.c     1 Oct 2005 10:20:18 -0000       1.25.2.1
-++++++++++ src/tray-monitor/tray-monitor.c     21 Nov 2005 12:53:39 -0000
-+++++++@@ -4,7 +4,7 @@
-+++++++  *
-+++++++  *     Nicolas Boichat, August MMIV
-+++++++  *
-+++++++- *     Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++++++ *     Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++++++  */
-+++++++ 
-+++++++ /*
-+++++++@@ -881,7 +881,7 @@
-+++++++       }
-+++++++ 
-+++++++       if (item->D_sock == NULL) {
-+++++++-         g_slist_append(*list, (void *)_("Cannot connect to daemon.\n"));
-++++++++         g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n")));
-+++++++          changeStatusMessage(item, _("Cannot connect to daemon."));
-+++++++          item->state = error;
-+++++++          item->oldstate = error;
-++++++Index: patches/patches-1.38.0
-++++++===================================================================
-++++++RCS file: patches/patches-1.38.0
-++++++diff -N patches/patches-1.38.0
-++++++Index: patches/patches-1.38.1
-++++++===================================================================
-++++++RCS file: patches/patches-1.38.1
-++++++diff -N patches/patches-1.38.1
-++++++--- /dev/null    1 Jan 1970 00:00:00 -0000
-+++++++++ patches/patches-1.38.1       21 Nov 2005 13:06:37 -0000
-++++++@@ -0,0 +1,14 @@
-+++++++20Nov05 1.38.1-to-1.38.2.patch
-+++++++ This patch fixes the following bugs:
-+++++++
-+++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-+++++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
-+++++++  says this patch does not fix his problem)
-+++++++- Fix cancel failure bug. Bug #481
-+++++++- Fix failure when Pool name has spaces. Bug #487
-+++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-+++++++- Fix a couple of free()s in src/filed/acl.c
-+++++++- Fix memory overrun in bfile.c in building OS X resource
-+++++++  fork filename. Bug #489
-+++++++                         
-+++++++  
-++++++Index: src/version.h
-++++++===================================================================
-++++++RCS file: /cvsroot/bacula/bacula/src/version.h,v
-++++++retrieving revision 1.554.2.14
-++++++diff -u -r1.554.2.14 version.h
-++++++--- src/version.h        14 Nov 2005 14:21:58 -0000      1.554.2.14
-+++++++++ src/version.h        21 Nov 2005 13:06:37 -0000
-++++++@@ -3,9 +3,9 @@
-++++++  */
-++++++ 
-++++++ #undef  VERSION
-++++++-#define VERSION "1.38.1"
-++++++-#define BDATE   "14 November 2005"
-++++++-#define LSMDATE "14Nov05"
-+++++++#define VERSION "1.38.2"
-+++++++#define BDATE   "20 November 2005"
-+++++++#define LSMDATE "20Nov05"
-++++++ 
-++++++ /* Debug flags */
-++++++ #undef  DEBUG
-++++++Index: src/dird/catreq.c
-++++++===================================================================
-++++++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v
-++++++retrieving revision 1.77.2.1
-++++++diff -u -r1.77.2.1 catreq.c
-++++++--- src/dird/catreq.c    26 Oct 2005 14:02:04 -0000      1.77.2.1
-+++++++++ src/dird/catreq.c    21 Nov 2005 13:06:37 -0000
-++++++@@ -10,7 +10,7 @@
-++++++  *  Basic tasks done here:
-++++++  *      Handle Catalog services.
-++++++  *
-++++++- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++++++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++++  */
-++++++ /*
-++++++    Copyright (C) 2001-2005 Kern Sibbald
-++++++@@ -117,6 +117,7 @@
-++++++    if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) {
-++++++       memset(&pr, 0, sizeof(pr));
-++++++       bstrncpy(pr.Name, pool_name, sizeof(pr.Name));
-+++++++      unbash_spaces(pr.Name);
-++++++       ok = db_get_pool_record(jcr, jcr->db, &pr);
-++++++       if (ok) {
-++++++          mr.PoolId = pr.PoolId;
-++++++Index: src/dird/ua_restore.c
-++++++===================================================================
-++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v
-++++++retrieving revision 1.101.2.1
-++++++diff -u -r1.101.2.1 ua_restore.c
-++++++--- src/dird/ua_restore.c        26 Oct 2005 14:02:04 -0000      1.101.2.1
-+++++++++ src/dird/ua_restore.c        21 Nov 2005 13:06:37 -0000
-++++++@@ -10,7 +10,7 @@
-++++++  *
-++++++  *     Kern Sibbald, July MMII
-++++++  *
-++++++- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++++++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++++  */
-++++++ /*
-++++++    Copyright (C) 2002-2005 Kern Sibbald
-++++++@@ -573,6 +573,7 @@
-++++++          }
-++++++          return 2;
-++++++ 
-+++++++      case -2:                        /* Period entered to cancel */
-++++++       case 11:                        /* Cancel or quit */
-++++++          return 0;
-++++++       }
-++++++Index: src/dird/ua_run.c
-++++++===================================================================
-++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v
-++++++retrieving revision 1.71
-++++++diff -u -r1.71 ua_run.c
-++++++--- src/dird/ua_run.c    10 Aug 2005 16:35:19 -0000      1.71
-+++++++++ src/dird/ua_run.c    21 Nov 2005 13:06:38 -0000
-++++++@@ -851,6 +851,8 @@
-++++++             bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
-++++++          }
-++++++          goto try_again;
-+++++++      case -1:                        /* error or cancel */
-+++++++         goto bail_out;
-++++++       default:
-++++++          goto try_again;
-++++++       }
-++++++Index: src/dird/ua_select.c
-++++++===================================================================
-++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v
-++++++retrieving revision 1.65.2.1
-++++++diff -u -r1.65.2.1 ua_select.c
-++++++--- src/dird/ua_select.c 12 Nov 2005 17:30:52 -0000      1.65.2.1
-+++++++++ src/dird/ua_select.c 21 Nov 2005 13:06:38 -0000
-++++++@@ -4,7 +4,7 @@
-++++++  *
-++++++  *     Kern Sibbald, October MMI
-++++++  *
-++++++- *   Version  $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++++++ *   Version  $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++++  */
-++++++ /*
-++++++    Copyright (C) 2001-2005 Kern Sibbald
-++++++@@ -149,7 +149,9 @@
-++++++       }
-++++++    }
-++++++    UnlockRes();
-++++++-   do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name));
-+++++++   if (do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name)) < 0) {
-+++++++      return NULL;
-+++++++   }
-++++++    store = (STORE *)GetResWithName(R_STORAGE, name);
-++++++    return store;
-++++++ }
-++++++@@ -170,7 +172,9 @@
-++++++       }
-++++++    }
-++++++    UnlockRes();
-++++++-   do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name));
-+++++++   if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) {
-+++++++      return NULL;
-+++++++   }
-++++++    fs = (FILESET *)GetResWithName(R_FILESET, name);
-++++++    return fs;
-++++++ }
-++++++@@ -202,7 +206,9 @@
-++++++          }
-++++++       }
-++++++       UnlockRes();
-++++++-      do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name));
-+++++++      if (do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name)) < 0) {
-+++++++         return NULL;
-+++++++      }
-++++++       catalog = (CAT *)GetResWithName(R_CATALOG, name);
-++++++    }
-++++++    return catalog;
-++++++@@ -225,7 +231,9 @@
-++++++       }
-++++++    }
-++++++    UnlockRes();
-++++++-   do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name));
-+++++++   if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) {
-+++++++      return NULL;
-+++++++   }
-++++++    job = (JOB *)GetResWithName(R_JOB, name);
-++++++    return job;
-++++++ }
-++++++@@ -246,7 +254,9 @@
-++++++       }
-++++++    }
-++++++    UnlockRes();
-++++++-   do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name));
-+++++++   if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) {
-+++++++      return NULL;
-+++++++   }
-++++++    job = (JOB *)GetResWithName(R_JOB, name);
-++++++    return job;
-++++++ }
-++++++@@ -269,7 +279,9 @@
-++++++       }
-++++++    }
-++++++    UnlockRes();
-++++++-   do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name));
-+++++++   if (do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) {
-+++++++      return NULL;
-+++++++   }
-++++++    client = (CLIENT *)GetResWithName(R_CLIENT, name);
-++++++    return client;
-++++++ }
-++++++@@ -551,7 +563,9 @@
-++++++       }
-++++++    }
-++++++    UnlockRes();
-++++++-   do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name));
-+++++++   if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) {
-+++++++      return NULL;
-+++++++   }
-++++++    pool = (POOL *)GetResWithName(R_POOL, name);
-++++++    return pool;
-++++++ }
-++++++@@ -673,12 +687,16 @@
-++++++  *  Returns: -1 on error
-++++++  *            index base 0 on success, and choice
-++++++  *               is copied to prompt if not NULL
-+++++++ *             prompt is set to the chosen prompt item string
-++++++  */
-++++++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
-++++++ {
-++++++    int i, item;
-++++++    char pmsg[MAXSTRING];
-++++++ 
-+++++++   if (prompt) {
-+++++++      *prompt = 0;
-+++++++   }
-++++++    if (ua->num_prompts == 2) {
-++++++       item = 1;
-++++++       if (prompt) {
-++++++@@ -698,15 +716,11 @@
-++++++       bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
-++++++    }
-++++++ 
-++++++-   if (prompt) {
-++++++-      *prompt = 0;
-++++++-   }
-++++++-
-++++++    for ( ;; ) {
-++++++       /* First item is the prompt string, not the items */
-++++++       if (ua->num_prompts == 1) {
-++++++          bsendmsg(ua, _("Selection is empty!\n"));
-++++++-         item = 0;                    /* list is empty ! */
-+++++++         item = -1;                    /* list is empty ! */
-++++++          break;
-++++++       }
-++++++       if (ua->num_prompts == 2) {
-++++++@@ -741,7 +755,7 @@
-++++++       free(ua->prompt[i]);
-++++++    }
-++++++    ua->num_prompts = 0;
-++++++-   return item - 1;
-+++++++   return item>0 ? item-1 : item;
-++++++ }
-++++++ 
-++++++ 
-++++++Index: src/dird/ua_update.c
-++++++===================================================================
-++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v
-++++++retrieving revision 1.7
-++++++diff -u -r1.7 ua_update.c
-++++++--- src/dird/ua_update.c 28 Aug 2005 12:22:02 -0000      1.7
-+++++++++ src/dird/ua_update.c 21 Nov 2005 13:06:38 -0000
-++++++@@ -590,7 +590,7 @@
-++++++          update_all_vols_from_pool(ua);
-++++++          return 1;
-++++++       default:                        /* Done or error */
-++++++-         bsendmsg(ua, _("Selection done.\n"));
-+++++++         bsendmsg(ua, _("Selection terminated.\n"));
-++++++          return 1;
-++++++       }
-++++++    }
-++++++Index: src/filed/acl.c
-++++++===================================================================
-++++++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v
-++++++retrieving revision 1.10.2.1
-++++++diff -u -r1.10.2.1 acl.c
-++++++--- src/filed/acl.c      14 Nov 2005 20:20:38 -0000      1.10.2.1
-+++++++++ src/filed/acl.c      21 Nov 2005 13:06:38 -0000
-++++++@@ -26,7 +26,7 @@
-++++++  *
-++++++  *   Written by Preben 'Peppe' Guldberg, December MMIV
-++++++  *
-++++++- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++++++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++++  */
-++++++ /*
-++++++    Copyright (C) 2004-2005 Kern Sibbald
-++++++@@ -140,7 +140,7 @@
-++++++ 
-++++++    if ((acl_text = acl_get(jcr->last_fname)) != NULL) {
-++++++       len = pm_strcpy(jcr->acl_text, acl_text);
-++++++-      free(acl_text);
-+++++++      actuallyfree(acl_text);
-++++++       return len;
-++++++    }
-++++++    return -1;
-++++++@@ -270,7 +270,7 @@
-++++++    if ((n = getacl(jcr->last_fname, n, acls)) > 0) {
-++++++       if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) {
-++++++          len = pm_strcpy(jcr->acl_text, acl_text);
-++++++-         free(acl_text);
-+++++++         actuallyfree(acl_text);
-++++++          return len;
-++++++       }
-++++++    }
-++++++Index: src/findlib/bfile.c
-++++++===================================================================
-++++++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v
-++++++retrieving revision 1.40
-++++++diff -u -r1.40 bfile.c
-++++++--- src/findlib/bfile.c  10 Aug 2005 16:35:19 -0000      1.40
-+++++++++ src/findlib/bfile.c  21 Nov 2005 13:06:38 -0000
-++++++@@ -623,13 +623,10 @@
-++++++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
-++++++ {
-++++++    POOLMEM *rsrc_fname;
-++++++-   size_t fname_len;
-++++++ 
-++++++-   fname_len = strlen(fname);
-++++++    rsrc_fname = get_pool_memory(PM_FNAME);
-++++++-   bstrncpy(rsrc_fname, fname, fname_len + 1);
-++++++-   bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC,
-++++++-      strlen(_PATH_RSRCFORKSPEC) + 1);
-+++++++   pm_strcpy(rsrc_fname, fname);
-+++++++   pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC);
-++++++    bopen(bfd, rsrc_fname, flags, mode);
-++++++    free_pool_memory(rsrc_fname);
-++++++    return bfd->fid;
-++++++Index: src/lib/bnet_server.c
-++++++===================================================================
-++++++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v
-++++++retrieving revision 1.39
-++++++diff -u -r1.39 bnet_server.c
-++++++--- src/lib/bnet_server.c        18 Aug 2005 15:37:40 -0000      1.39
-+++++++++ src/lib/bnet_server.c        21 Nov 2005 13:06:38 -0000
-++++++@@ -153,7 +153,6 @@
-++++++          /* Error, get out */
-++++++          foreach_dlist(fd_ptr, &sockfds) {
-++++++             close(fd_ptr->fd);
-++++++-            free((void *)fd_ptr);
-++++++          }
-++++++          Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror());
-++++++          break;
-++++++Index: src/stored/autochanger.c
-++++++===================================================================
-++++++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
-++++++retrieving revision 1.47.2.3
-++++++diff -u -r1.47.2.3 autochanger.c
-++++++--- src/stored/autochanger.c     12 Nov 2005 17:30:53 -0000      1.47.2.3
-+++++++++ src/stored/autochanger.c     21 Nov 2005 13:06:38 -0000
-++++++@@ -4,7 +4,7 @@
-++++++  *
-++++++  *   Kern Sibbald, August MMII
-++++++  *                            
-++++++- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++++++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++++  */
-++++++ /*
-++++++    Copyright (C) 2002-2005 Kern Sibbald
-++++++@@ -163,6 +163,7 @@
-++++++             rtn_stat = -1;            /* hard error */
-++++++          }
-++++++          Dmsg2(400, "load slot %d status=%d\n", slot, status);
-+++++++         unlock_changer(dcr);
-++++++       } else {
-++++++          status = 0;                  /* we got what we want */
-++++++          dev->Slot = slot;            /* set currently loaded slot */
-++++++@@ -174,7 +175,6 @@
-++++++    } else {
-++++++       rtn_stat = 0;                   /* no changer found */
-++++++    }
-++++++-   unlock_changer(dcr);
-++++++    free_pool_memory(changer);
-++++++    return rtn_stat;
-++++++ 
-++++++Index: src/stored/status.c
-++++++===================================================================
-++++++RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v
-++++++retrieving revision 1.44.2.1
-++++++diff -u -r1.44.2.1 status.c
-++++++--- src/stored/status.c  6 Oct 2005 07:04:13 -0000       1.44.2.1
-+++++++++ src/stored/status.c  21 Nov 2005 13:06:39 -0000
-++++++@@ -264,6 +264,7 @@
-++++++    bool found = false;
-++++++    int bps, sec;
-++++++    JCR *jcr;
-+++++++   DCR *dcr;
-++++++    char JobName[MAX_NAME_LENGTH];
-++++++    char b1[30], b2[30], b3[30];
-++++++ 
-++++++@@ -273,7 +274,8 @@
-++++++          bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"),
-++++++             job_type_to_str(jcr->JobType), jcr->Job);
-++++++       }
-++++++-      if (jcr->dcr && jcr->dcr->device) {
-+++++++      dcr = jcr->dcr;
-+++++++      if (dcr && dcr->device) {
-++++++          bstrncpy(JobName, jcr->Job, sizeof(JobName));
-++++++          /* There are three periods after the Job name */
-++++++          char *p;
-++++++@@ -282,13 +284,16 @@
-++++++                *p = 0;
-++++++             }
-++++++          }
-++++++-         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"),
-+++++++         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n"
-+++++++                            "    pool=\"%s\" device=\"%s\"\n"),
-++++++                    job_level_to_str(jcr->JobLevel),
-++++++                    job_type_to_str(jcr->JobType),
-++++++                    JobName,
-++++++                    jcr->JobId,
-++++++-                   jcr->dcr->VolumeName,
-++++++-                   jcr->dcr->device->device_name);
-+++++++                   dcr->VolumeName,
-+++++++                   dcr->pool_name,
-+++++++                   dcr->dev?dcr->dev->print_name(): 
-+++++++                            dcr->device->device_name);
-++++++          sec = time(NULL) - jcr->run_time;
-++++++          if (sec <= 0) {
-++++++             sec = 1;
-++++++Index: src/stored/stored_conf.c
-++++++===================================================================
-++++++RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v
-++++++retrieving revision 1.76
-++++++diff -u -r1.76 stored_conf.c
-++++++--- src/stored/stored_conf.c     9 Sep 2005 09:40:04 -0000       1.76
-+++++++++ src/stored/stored_conf.c     21 Nov 2005 13:06:39 -0000
-++++++@@ -222,16 +222,16 @@
-++++++          res->res_dev.hdr.name,
-++++++          res->res_dev.media_type, res->res_dev.device_name,
-++++++          res->res_dev.label_type);
-++++++-      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d\n",
-+++++++      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n",
-++++++          res->res_dev.max_rewind_wait, res->res_dev.min_block_size,
-++++++-         res->res_dev.max_block_size);
-+++++++         res->res_dev.max_block_size, res->res_dev.max_changer_wait);
-++++++       sendit(sock, "        max_jobs=%d max_files=%" lld " max_size=%" lld "\n",
-++++++          res->res_dev.max_volume_jobs, res->res_dev.max_volume_files,
-++++++          res->res_dev.max_volume_size);
-++++++       sendit(sock, "        max_file_size=%" lld " capacity=%" lld "\n",
-++++++          res->res_dev.max_file_size, res->res_dev.volume_capacity);
-++++++-      sendit(sock, "         spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
-++++++-      sendit(sock, "         max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
-+++++++      sendit(sock, "        spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
-+++++++      sendit(sock, "        max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
-++++++          res->res_dev.max_spool_size, res->res_dev.max_job_spool_size);
-++++++       if (res->res_dev.changer_res) {
-++++++          sendit(sock, "         changer=%p\n", res->res_dev.changer_res);
-++++++Index: src/tray-monitor/tray-monitor.c
-++++++===================================================================
-++++++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v
-++++++retrieving revision 1.25.2.1
-++++++diff -u -r1.25.2.1 tray-monitor.c
-++++++--- src/tray-monitor/tray-monitor.c      1 Oct 2005 10:20:18 -0000       1.25.2.1
-+++++++++ src/tray-monitor/tray-monitor.c      21 Nov 2005 13:06:39 -0000
-++++++@@ -4,7 +4,7 @@
-++++++  *
-++++++  *     Nicolas Boichat, August MMIV
-++++++  *
-++++++- *     Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++++++ *     Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++++  */
-++++++ 
-++++++ /*
-++++++@@ -881,7 +881,7 @@
-++++++       }
-++++++ 
-++++++       if (item->D_sock == NULL) {
-++++++-         g_slist_append(*list, (void *)_("Cannot connect to daemon.\n"));
-+++++++         g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n")));
-++++++          changeStatusMessage(item, _("Cannot connect to daemon."));
-++++++          item->state = error;
-++++++          item->oldstate = error;
-+++++Index: patches/patches-1.38.0
-+++++===================================================================
-+++++RCS file: patches/patches-1.38.0
-+++++diff -N patches/patches-1.38.0
-+++++Index: patches/patches-1.38.1
-+++++===================================================================
-+++++RCS file: patches/patches-1.38.1
-+++++diff -N patches/patches-1.38.1
-+++++--- /dev/null     1 Jan 1970 00:00:00 -0000
-++++++++ patches/patches-1.38.1        21 Nov 2005 13:13:01 -0000
-+++++@@ -0,0 +1,14 @@
-++++++20Nov05 1.38.1-to-1.38.2.patch
-++++++ This patch fixes the following bugs:
-++++++
-++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-++++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
-++++++  says this patch does not fix his problem)
-++++++- Fix cancel failure bug. Bug #481
-++++++- Fix failure when Pool name has spaces. Bug #487
-++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-++++++- Fix a couple of free()s in src/filed/acl.c
-++++++- Fix memory overrun in bfile.c in building OS X resource
-++++++  fork filename. Bug #489
-++++++                         
-++++++  
-+++++Index: src/version.h
-+++++===================================================================
-+++++RCS file: /cvsroot/bacula/bacula/src/version.h,v
-+++++retrieving revision 1.554.2.14
-+++++diff -u -r1.554.2.14 version.h
-+++++--- src/version.h 14 Nov 2005 14:21:58 -0000      1.554.2.14
-++++++++ src/version.h 21 Nov 2005 13:13:01 -0000
-+++++@@ -3,9 +3,9 @@
-+++++  */
-+++++ 
-+++++ #undef  VERSION
-+++++-#define VERSION "1.38.1"
-+++++-#define BDATE   "14 November 2005"
-+++++-#define LSMDATE "14Nov05"
-++++++#define VERSION "1.38.2"
-++++++#define BDATE   "20 November 2005"
-++++++#define LSMDATE "20Nov05"
-+++++ 
-+++++ /* Debug flags */
-+++++ #undef  DEBUG
-+++++Index: src/dird/catreq.c
-+++++===================================================================
-+++++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v
-+++++retrieving revision 1.77.2.1
-+++++diff -u -r1.77.2.1 catreq.c
-+++++--- src/dird/catreq.c     26 Oct 2005 14:02:04 -0000      1.77.2.1
-++++++++ src/dird/catreq.c     21 Nov 2005 13:13:01 -0000
-+++++@@ -10,7 +10,7 @@
-+++++  *  Basic tasks done here:
-+++++  *      Handle Catalog services.
-+++++  *
-+++++- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++++  */
-+++++ /*
-+++++    Copyright (C) 2001-2005 Kern Sibbald
-+++++@@ -117,6 +117,7 @@
-+++++    if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) {
-+++++       memset(&pr, 0, sizeof(pr));
-+++++       bstrncpy(pr.Name, pool_name, sizeof(pr.Name));
-++++++      unbash_spaces(pr.Name);
-+++++       ok = db_get_pool_record(jcr, jcr->db, &pr);
-+++++       if (ok) {
-+++++          mr.PoolId = pr.PoolId;
-+++++Index: src/dird/ua_restore.c
-+++++===================================================================
-+++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v
-+++++retrieving revision 1.101.2.1
-+++++diff -u -r1.101.2.1 ua_restore.c
-+++++--- src/dird/ua_restore.c 26 Oct 2005 14:02:04 -0000      1.101.2.1
-++++++++ src/dird/ua_restore.c 21 Nov 2005 13:13:01 -0000
-+++++@@ -10,7 +10,7 @@
-+++++  *
-+++++  *     Kern Sibbald, July MMII
-+++++  *
-+++++- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++++  */
-+++++ /*
-+++++    Copyright (C) 2002-2005 Kern Sibbald
-+++++@@ -409,7 +409,7 @@
-+++++       }
-+++++       done = true;
-+++++       switch (do_prompt(ua, "", _("Select item: "), NULL, 0)) {
-+++++-      case -1:                        /* error */
-++++++      case -1:                        /* error or cancel */
-+++++          return 0;
-+++++       case 0:                         /* list last 20 Jobs run */
-+++++          gui_save = ua->jcr->gui;
-+++++Index: src/dird/ua_run.c
-+++++===================================================================
-+++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v
-+++++retrieving revision 1.71
-+++++diff -u -r1.71 ua_run.c
-+++++--- src/dird/ua_run.c     10 Aug 2005 16:35:19 -0000      1.71
-++++++++ src/dird/ua_run.c     21 Nov 2005 13:13:02 -0000
-+++++@@ -851,6 +851,8 @@
-+++++             bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
-+++++          }
-+++++          goto try_again;
-++++++      case -1:                        /* error or cancel */
-++++++         goto bail_out;
-+++++       default:
-+++++          goto try_again;
-+++++       }
-+++++Index: src/dird/ua_select.c
-+++++===================================================================
-+++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v
-+++++retrieving revision 1.65.2.1
-+++++diff -u -r1.65.2.1 ua_select.c
-+++++--- src/dird/ua_select.c  12 Nov 2005 17:30:52 -0000      1.65.2.1
-++++++++ src/dird/ua_select.c  21 Nov 2005 13:13:02 -0000
-+++++@@ -4,7 +4,7 @@
-+++++  *
-+++++  *     Kern Sibbald, October MMI
-+++++  *
-+++++- *   Version  $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++++ *   Version  $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++++  */
-+++++ /*
-+++++    Copyright (C) 2001-2005 Kern Sibbald
-+++++@@ -149,7 +149,9 @@
-+++++       }
-+++++    }
-+++++    UnlockRes();
-+++++-   do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name));
-++++++   if (do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name)) < 0) {
-++++++      return NULL;
-++++++   }
-+++++    store = (STORE *)GetResWithName(R_STORAGE, name);
-+++++    return store;
-+++++ }
-+++++@@ -170,7 +172,9 @@
-+++++       }
-+++++    }
-+++++    UnlockRes();
-+++++-   do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name));
-++++++   if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) {
-++++++      return NULL;
-++++++   }
-+++++    fs = (FILESET *)GetResWithName(R_FILESET, name);
-+++++    return fs;
-+++++ }
-+++++@@ -202,7 +206,9 @@
-+++++          }
-+++++       }
-+++++       UnlockRes();
-+++++-      do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name));
-++++++      if (do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name)) < 0) {
-++++++         return NULL;
-++++++      }
-+++++       catalog = (CAT *)GetResWithName(R_CATALOG, name);
-+++++    }
-+++++    return catalog;
-+++++@@ -225,7 +231,9 @@
-+++++       }
-+++++    }
-+++++    UnlockRes();
-+++++-   do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name));
-++++++   if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) {
-++++++      return NULL;
-++++++   }
-+++++    job = (JOB *)GetResWithName(R_JOB, name);
-+++++    return job;
-+++++ }
-+++++@@ -246,7 +254,9 @@
-+++++       }
-+++++    }
-+++++    UnlockRes();
-+++++-   do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name));
-++++++   if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) {
-++++++      return NULL;
-++++++   }
-+++++    job = (JOB *)GetResWithName(R_JOB, name);
-+++++    return job;
-+++++ }
-+++++@@ -269,7 +279,9 @@
-+++++       }
-+++++    }
-+++++    UnlockRes();
-+++++-   do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name));
-++++++   if (do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) {
-++++++      return NULL;
-++++++   }
-+++++    client = (CLIENT *)GetResWithName(R_CLIENT, name);
-+++++    return client;
-+++++ }
-+++++@@ -551,7 +563,9 @@
-+++++       }
-+++++    }
-+++++    UnlockRes();
-+++++-   do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name));
-++++++   if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) {
-++++++      return NULL;
-++++++   }
-+++++    pool = (POOL *)GetResWithName(R_POOL, name);
-+++++    return pool;
-+++++ }
-+++++@@ -673,12 +687,16 @@
-+++++  *  Returns: -1 on error
-+++++  *            index base 0 on success, and choice
-+++++  *               is copied to prompt if not NULL
-++++++ *             prompt is set to the chosen prompt item string
-+++++  */
-+++++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
-+++++ {
-+++++    int i, item;
-+++++    char pmsg[MAXSTRING];
-+++++ 
-++++++   if (prompt) {
-++++++      *prompt = 0;
-++++++   }
-+++++    if (ua->num_prompts == 2) {
-+++++       item = 1;
-+++++       if (prompt) {
-+++++@@ -698,15 +716,11 @@
-+++++       bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
-+++++    }
-+++++ 
-+++++-   if (prompt) {
-+++++-      *prompt = 0;
-+++++-   }
-+++++-
-+++++    for ( ;; ) {
-+++++       /* First item is the prompt string, not the items */
-+++++       if (ua->num_prompts == 1) {
-+++++          bsendmsg(ua, _("Selection is empty!\n"));
-+++++-         item = 0;                    /* list is empty ! */
-++++++         item = -1;                    /* list is empty ! */
-+++++          break;
-+++++       }
-+++++       if (ua->num_prompts == 2) {
-+++++@@ -741,7 +755,7 @@
-+++++       free(ua->prompt[i]);
-+++++    }
-+++++    ua->num_prompts = 0;
-+++++-   return item - 1;
-++++++   return item>0 ? item-1 : item;
-+++++ }
-+++++ 
-+++++ 
-+++++Index: src/dird/ua_update.c
-+++++===================================================================
-+++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v
-+++++retrieving revision 1.7
-+++++diff -u -r1.7 ua_update.c
-+++++--- src/dird/ua_update.c  28 Aug 2005 12:22:02 -0000      1.7
-++++++++ src/dird/ua_update.c  21 Nov 2005 13:13:02 -0000
-+++++@@ -590,7 +590,7 @@
-+++++          update_all_vols_from_pool(ua);
-+++++          return 1;
-+++++       default:                        /* Done or error */
-+++++-         bsendmsg(ua, _("Selection done.\n"));
-++++++         bsendmsg(ua, _("Selection terminated.\n"));
-+++++          return 1;
-+++++       }
-+++++    }
-+++++Index: src/filed/acl.c
-+++++===================================================================
-+++++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v
-+++++retrieving revision 1.10.2.1
-+++++diff -u -r1.10.2.1 acl.c
-+++++--- src/filed/acl.c       14 Nov 2005 20:20:38 -0000      1.10.2.1
-++++++++ src/filed/acl.c       21 Nov 2005 13:13:02 -0000
-+++++@@ -26,7 +26,7 @@
-+++++  *
-+++++  *   Written by Preben 'Peppe' Guldberg, December MMIV
-+++++  *
-+++++- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++++  */
-+++++ /*
-+++++    Copyright (C) 2004-2005 Kern Sibbald
-+++++@@ -140,7 +140,7 @@
-+++++ 
-+++++    if ((acl_text = acl_get(jcr->last_fname)) != NULL) {
-+++++       len = pm_strcpy(jcr->acl_text, acl_text);
-+++++-      free(acl_text);
-++++++      actuallyfree(acl_text);
-+++++       return len;
-+++++    }
-+++++    return -1;
-+++++@@ -270,7 +270,7 @@
-+++++    if ((n = getacl(jcr->last_fname, n, acls)) > 0) {
-+++++       if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) {
-+++++          len = pm_strcpy(jcr->acl_text, acl_text);
-+++++-         free(acl_text);
-++++++         actuallyfree(acl_text);
-+++++          return len;
-+++++       }
-+++++    }
-+++++Index: src/findlib/bfile.c
-+++++===================================================================
-+++++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v
-+++++retrieving revision 1.40
-+++++diff -u -r1.40 bfile.c
-+++++--- src/findlib/bfile.c   10 Aug 2005 16:35:19 -0000      1.40
-++++++++ src/findlib/bfile.c   21 Nov 2005 13:13:02 -0000
-+++++@@ -623,13 +623,10 @@
-+++++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
-+++++ {
-+++++    POOLMEM *rsrc_fname;
-+++++-   size_t fname_len;
-+++++ 
-+++++-   fname_len = strlen(fname);
-+++++    rsrc_fname = get_pool_memory(PM_FNAME);
-+++++-   bstrncpy(rsrc_fname, fname, fname_len + 1);
-+++++-   bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC,
-+++++-      strlen(_PATH_RSRCFORKSPEC) + 1);
-++++++   pm_strcpy(rsrc_fname, fname);
-++++++   pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC);
-+++++    bopen(bfd, rsrc_fname, flags, mode);
-+++++    free_pool_memory(rsrc_fname);
-+++++    return bfd->fid;
-+++++Index: src/lib/bnet_server.c
-+++++===================================================================
-+++++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v
-+++++retrieving revision 1.39
-+++++diff -u -r1.39 bnet_server.c
-+++++--- src/lib/bnet_server.c 18 Aug 2005 15:37:40 -0000      1.39
-++++++++ src/lib/bnet_server.c 21 Nov 2005 13:13:03 -0000
-+++++@@ -153,7 +153,6 @@
-+++++          /* Error, get out */
-+++++          foreach_dlist(fd_ptr, &sockfds) {
-+++++             close(fd_ptr->fd);
-+++++-            free((void *)fd_ptr);
-+++++          }
-+++++          Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror());
-+++++          break;
-+++++Index: src/stored/autochanger.c
-+++++===================================================================
-+++++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
-+++++retrieving revision 1.47.2.3
-+++++diff -u -r1.47.2.3 autochanger.c
-+++++--- src/stored/autochanger.c      12 Nov 2005 17:30:53 -0000      1.47.2.3
-++++++++ src/stored/autochanger.c      21 Nov 2005 13:13:03 -0000
-+++++@@ -4,7 +4,7 @@
-+++++  *
-+++++  *   Kern Sibbald, August MMII
-+++++  *                            
-+++++- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++++  */
-+++++ /*
-+++++    Copyright (C) 2002-2005 Kern Sibbald
-+++++@@ -163,6 +163,7 @@
-+++++             rtn_stat = -1;            /* hard error */
-+++++          }
-+++++          Dmsg2(400, "load slot %d status=%d\n", slot, status);
-++++++         unlock_changer(dcr);
-+++++       } else {
-+++++          status = 0;                  /* we got what we want */
-+++++          dev->Slot = slot;            /* set currently loaded slot */
-+++++@@ -174,7 +175,6 @@
-+++++    } else {
-+++++       rtn_stat = 0;                   /* no changer found */
-+++++    }
-+++++-   unlock_changer(dcr);
-+++++    free_pool_memory(changer);
-+++++    return rtn_stat;
-+++++ 
-+++++Index: src/stored/status.c
-+++++===================================================================
-+++++RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v
-+++++retrieving revision 1.44.2.1
-+++++diff -u -r1.44.2.1 status.c
-+++++--- src/stored/status.c   6 Oct 2005 07:04:13 -0000       1.44.2.1
-++++++++ src/stored/status.c   21 Nov 2005 13:13:03 -0000
-+++++@@ -264,6 +264,7 @@
-+++++    bool found = false;
-+++++    int bps, sec;
-+++++    JCR *jcr;
-++++++   DCR *dcr;
-+++++    char JobName[MAX_NAME_LENGTH];
-+++++    char b1[30], b2[30], b3[30];
-+++++ 
-+++++@@ -273,7 +274,8 @@
-+++++          bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"),
-+++++             job_type_to_str(jcr->JobType), jcr->Job);
-+++++       }
-+++++-      if (jcr->dcr && jcr->dcr->device) {
-++++++      dcr = jcr->dcr;
-++++++      if (dcr && dcr->device) {
-+++++          bstrncpy(JobName, jcr->Job, sizeof(JobName));
-+++++          /* There are three periods after the Job name */
-+++++          char *p;
-+++++@@ -282,13 +284,16 @@
-+++++                *p = 0;
-+++++             }
-+++++          }
-+++++-         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"),
-++++++         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n"
-++++++                            "    pool=\"%s\" device=\"%s\"\n"),
-+++++                    job_level_to_str(jcr->JobLevel),
-+++++                    job_type_to_str(jcr->JobType),
-+++++                    JobName,
-+++++                    jcr->JobId,
-+++++-                   jcr->dcr->VolumeName,
-+++++-                   jcr->dcr->device->device_name);
-++++++                   dcr->VolumeName,
-++++++                   dcr->pool_name,
-++++++                   dcr->dev?dcr->dev->print_name(): 
-++++++                            dcr->device->device_name);
-+++++          sec = time(NULL) - jcr->run_time;
-+++++          if (sec <= 0) {
-+++++             sec = 1;
-+++++Index: src/stored/stored_conf.c
-+++++===================================================================
-+++++RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v
-+++++retrieving revision 1.76
-+++++diff -u -r1.76 stored_conf.c
-+++++--- src/stored/stored_conf.c      9 Sep 2005 09:40:04 -0000       1.76
-++++++++ src/stored/stored_conf.c      21 Nov 2005 13:13:04 -0000
-+++++@@ -222,16 +222,16 @@
-+++++          res->res_dev.hdr.name,
-+++++          res->res_dev.media_type, res->res_dev.device_name,
-+++++          res->res_dev.label_type);
-+++++-      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d\n",
-++++++      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n",
-+++++          res->res_dev.max_rewind_wait, res->res_dev.min_block_size,
-+++++-         res->res_dev.max_block_size);
-++++++         res->res_dev.max_block_size, res->res_dev.max_changer_wait);
-+++++       sendit(sock, "        max_jobs=%d max_files=%" lld " max_size=%" lld "\n",
-+++++          res->res_dev.max_volume_jobs, res->res_dev.max_volume_files,
-+++++          res->res_dev.max_volume_size);
-+++++       sendit(sock, "        max_file_size=%" lld " capacity=%" lld "\n",
-+++++          res->res_dev.max_file_size, res->res_dev.volume_capacity);
-+++++-      sendit(sock, "         spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
-+++++-      sendit(sock, "         max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
-++++++      sendit(sock, "        spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
-++++++      sendit(sock, "        max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
-+++++          res->res_dev.max_spool_size, res->res_dev.max_job_spool_size);
-+++++       if (res->res_dev.changer_res) {
-+++++          sendit(sock, "         changer=%p\n", res->res_dev.changer_res);
-+++++Index: src/tray-monitor/tray-monitor.c
-+++++===================================================================
-+++++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v
-+++++retrieving revision 1.25.2.1
-+++++diff -u -r1.25.2.1 tray-monitor.c
-+++++--- src/tray-monitor/tray-monitor.c       1 Oct 2005 10:20:18 -0000       1.25.2.1
-++++++++ src/tray-monitor/tray-monitor.c       21 Nov 2005 13:13:04 -0000
-+++++@@ -4,7 +4,7 @@
-+++++  *
-+++++  *     Nicolas Boichat, August MMIV
-+++++  *
-+++++- *     Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++++ *     Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++++  */
-+++++ 
-+++++ /*
-+++++@@ -881,7 +881,7 @@
-+++++       }
-+++++ 
-+++++       if (item->D_sock == NULL) {
-+++++-         g_slist_append(*list, (void *)_("Cannot connect to daemon.\n"));
-++++++         g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n")));
-+++++          changeStatusMessage(item, _("Cannot connect to daemon."));
-+++++          item->state = error;
-+++++          item->oldstate = error;
-++++Index: patches/patches-1.38.0
-++++===================================================================
-++++RCS file: patches/patches-1.38.0
-++++diff -N patches/patches-1.38.0
-++++Index: patches/patches-1.38.1
-++++===================================================================
-++++RCS file: patches/patches-1.38.1
-++++diff -N patches/patches-1.38.1
-++++--- /dev/null      1 Jan 1970 00:00:00 -0000
-+++++++ patches/patches-1.38.1 21 Nov 2005 13:17:58 -0000
-++++@@ -0,0 +1,14 @@
-+++++20Nov05 1.38.1-to-1.38.2.patch
-+++++ This patch fixes the following bugs:
-+++++
-+++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-+++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
-+++++  says this patch does not fix his problem)
-+++++- Fix cancel failure bug. Bug #481
-+++++- Fix failure when Pool name has spaces. Bug #487
-+++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-+++++- Fix a couple of free()s in src/filed/acl.c
-+++++- Fix memory overrun in bfile.c in building OS X resource
-+++++  fork filename. Bug #489
-+++++                         
-+++++  
-++++Index: src/version.h
-++++===================================================================
-++++RCS file: /cvsroot/bacula/bacula/src/version.h,v
-++++retrieving revision 1.554.2.14
-++++diff -u -r1.554.2.14 version.h
-++++--- src/version.h  14 Nov 2005 14:21:58 -0000      1.554.2.14
-+++++++ src/version.h  21 Nov 2005 13:17:58 -0000
-++++@@ -3,9 +3,9 @@
-++++  */
-++++ 
-++++ #undef  VERSION
-++++-#define VERSION "1.38.1"
-++++-#define BDATE   "14 November 2005"
-++++-#define LSMDATE "14Nov05"
-+++++#define VERSION "1.38.2"
-+++++#define BDATE   "20 November 2005"
-+++++#define LSMDATE "20Nov05"
-++++ 
-++++ /* Debug flags */
-++++ #undef  DEBUG
-++++Index: src/dird/catreq.c
-++++===================================================================
-++++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v
-++++retrieving revision 1.77.2.1
-++++diff -u -r1.77.2.1 catreq.c
-++++--- src/dird/catreq.c      26 Oct 2005 14:02:04 -0000      1.77.2.1
-+++++++ src/dird/catreq.c      21 Nov 2005 13:17:59 -0000
-++++@@ -10,7 +10,7 @@
-++++  *  Basic tasks done here:
-++++  *      Handle Catalog services.
-++++  *
-++++- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++  */
-++++ /*
-++++    Copyright (C) 2001-2005 Kern Sibbald
-++++@@ -117,6 +117,7 @@
-++++    if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) {
-++++       memset(&pr, 0, sizeof(pr));
-++++       bstrncpy(pr.Name, pool_name, sizeof(pr.Name));
-+++++      unbash_spaces(pr.Name);
-++++       ok = db_get_pool_record(jcr, jcr->db, &pr);
-++++       if (ok) {
-++++          mr.PoolId = pr.PoolId;
-++++Index: src/dird/ua_restore.c
-++++===================================================================
-++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v
-++++retrieving revision 1.101.2.1
-++++diff -u -r1.101.2.1 ua_restore.c
-++++--- src/dird/ua_restore.c  26 Oct 2005 14:02:04 -0000      1.101.2.1
-+++++++ src/dird/ua_restore.c  21 Nov 2005 13:17:59 -0000
-++++@@ -10,7 +10,7 @@
-++++  *
-++++  *     Kern Sibbald, July MMII
-++++  *
-++++- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++  */
-++++ /*
-++++    Copyright (C) 2002-2005 Kern Sibbald
-++++@@ -409,7 +409,7 @@
-++++       }
-++++       done = true;
-++++       switch (do_prompt(ua, "", _("Select item: "), NULL, 0)) {
-++++-      case -1:                        /* error */
-+++++      case -1:                        /* error or cancel */
-++++          return 0;
-++++       case 0:                         /* list last 20 Jobs run */
-++++          gui_save = ua->jcr->gui;
-++++Index: src/dird/ua_run.c
-++++===================================================================
-++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v
-++++retrieving revision 1.71
-++++diff -u -r1.71 ua_run.c
-++++--- src/dird/ua_run.c      10 Aug 2005 16:35:19 -0000      1.71
-+++++++ src/dird/ua_run.c      21 Nov 2005 13:17:59 -0000
-++++@@ -851,6 +851,8 @@
-++++             bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
-++++          }
-++++          goto try_again;
-+++++      case -1:                        /* error or cancel */
-+++++         goto bail_out;
-++++       default:
-++++          goto try_again;
-++++       }
-++++Index: src/dird/ua_select.c
-++++===================================================================
-++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v
-++++retrieving revision 1.65.2.1
-++++diff -u -r1.65.2.1 ua_select.c
-++++--- src/dird/ua_select.c   12 Nov 2005 17:30:52 -0000      1.65.2.1
-+++++++ src/dird/ua_select.c   21 Nov 2005 13:17:59 -0000
-++++@@ -4,7 +4,7 @@
-++++  *
-++++  *     Kern Sibbald, October MMI
-++++  *
-++++- *   Version  $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++++ *   Version  $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++  */
-++++ /*
-++++    Copyright (C) 2001-2005 Kern Sibbald
-++++@@ -149,7 +149,9 @@
-++++       }
-++++    }
-++++    UnlockRes();
-++++-   do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name));
-+++++   if (do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name)) < 0) {
-+++++      return NULL;
-+++++   }
-++++    store = (STORE *)GetResWithName(R_STORAGE, name);
-++++    return store;
-++++ }
-++++@@ -170,7 +172,9 @@
-++++       }
-++++    }
-++++    UnlockRes();
-++++-   do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name));
-+++++   if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) {
-+++++      return NULL;
-+++++   }
-++++    fs = (FILESET *)GetResWithName(R_FILESET, name);
-++++    return fs;
-++++ }
-++++@@ -202,7 +206,9 @@
-++++          }
-++++       }
-++++       UnlockRes();
-++++-      do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name));
-+++++      if (do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name)) < 0) {
-+++++         return NULL;
-+++++      }
-++++       catalog = (CAT *)GetResWithName(R_CATALOG, name);
-++++    }
-++++    return catalog;
-++++@@ -225,7 +231,9 @@
-++++       }
-++++    }
-++++    UnlockRes();
-++++-   do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name));
-+++++   if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) {
-+++++      return NULL;
-+++++   }
-++++    job = (JOB *)GetResWithName(R_JOB, name);
-++++    return job;
-++++ }
-++++@@ -246,7 +254,9 @@
-++++       }
-++++    }
-++++    UnlockRes();
-++++-   do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name));
-+++++   if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) {
-+++++      return NULL;
-+++++   }
-++++    job = (JOB *)GetResWithName(R_JOB, name);
-++++    return job;
-++++ }
-++++@@ -269,7 +279,9 @@
-++++       }
-++++    }
-++++    UnlockRes();
-++++-   do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name));
-+++++   if (do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) {
-+++++      return NULL;
-+++++   }
-++++    client = (CLIENT *)GetResWithName(R_CLIENT, name);
-++++    return client;
-++++ }
-++++@@ -551,7 +563,9 @@
-++++       }
-++++    }
-++++    UnlockRes();
-++++-   do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name));
-+++++   if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) {
-+++++      return NULL;
-+++++   }
-++++    pool = (POOL *)GetResWithName(R_POOL, name);
-++++    return pool;
-++++ }
-++++@@ -673,12 +687,16 @@
-++++  *  Returns: -1 on error
-++++  *            index base 0 on success, and choice
-++++  *               is copied to prompt if not NULL
-+++++ *             prompt is set to the chosen prompt item string
-++++  */
-++++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
-++++ {
-++++    int i, item;
-++++    char pmsg[MAXSTRING];
-++++ 
-+++++   if (prompt) {
-+++++      *prompt = 0;
-+++++   }
-++++    if (ua->num_prompts == 2) {
-++++       item = 1;
-++++       if (prompt) {
-++++@@ -698,15 +716,11 @@
-++++       bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
-++++    }
-++++ 
-++++-   if (prompt) {
-++++-      *prompt = 0;
-++++-   }
-++++-
-++++    for ( ;; ) {
-++++       /* First item is the prompt string, not the items */
-++++       if (ua->num_prompts == 1) {
-++++          bsendmsg(ua, _("Selection is empty!\n"));
-++++-         item = 0;                    /* list is empty ! */
-+++++         item = -1;                    /* list is empty ! */
-++++          break;
-++++       }
-++++       if (ua->num_prompts == 2) {
-++++@@ -741,7 +755,7 @@
-++++       free(ua->prompt[i]);
-++++    }
-++++    ua->num_prompts = 0;
-++++-   return item - 1;
-+++++   return item>0 ? item-1 : item;
-++++ }
-++++ 
-++++ 
-++++Index: src/dird/ua_update.c
-++++===================================================================
-++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v
-++++retrieving revision 1.7
-++++diff -u -r1.7 ua_update.c
-++++--- src/dird/ua_update.c   28 Aug 2005 12:22:02 -0000      1.7
-+++++++ src/dird/ua_update.c   21 Nov 2005 13:17:59 -0000
-++++@@ -590,7 +590,7 @@
-++++          update_all_vols_from_pool(ua);
-++++          return 1;
-++++       default:                        /* Done or error */
-++++-         bsendmsg(ua, _("Selection done.\n"));
-+++++         bsendmsg(ua, _("Selection terminated.\n"));
-++++          return 1;
-++++       }
-++++    }
-++++Index: src/filed/acl.c
-++++===================================================================
-++++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v
-++++retrieving revision 1.10.2.1
-++++diff -u -r1.10.2.1 acl.c
-++++--- src/filed/acl.c        14 Nov 2005 20:20:38 -0000      1.10.2.1
-+++++++ src/filed/acl.c        21 Nov 2005 13:17:59 -0000
-++++@@ -26,7 +26,7 @@
-++++  *
-++++  *   Written by Preben 'Peppe' Guldberg, December MMIV
-++++  *
-++++- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++  */
-++++ /*
-++++    Copyright (C) 2004-2005 Kern Sibbald
-++++@@ -140,7 +140,7 @@
-++++ 
-++++    if ((acl_text = acl_get(jcr->last_fname)) != NULL) {
-++++       len = pm_strcpy(jcr->acl_text, acl_text);
-++++-      free(acl_text);
-+++++      actuallyfree(acl_text);
-++++       return len;
-++++    }
-++++    return -1;
-++++@@ -270,7 +270,7 @@
-++++    if ((n = getacl(jcr->last_fname, n, acls)) > 0) {
-++++       if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) {
-++++          len = pm_strcpy(jcr->acl_text, acl_text);
-++++-         free(acl_text);
-+++++         actuallyfree(acl_text);
-++++          return len;
-++++       }
-++++    }
-++++Index: src/findlib/bfile.c
-++++===================================================================
-++++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v
-++++retrieving revision 1.40
-++++diff -u -r1.40 bfile.c
-++++--- src/findlib/bfile.c    10 Aug 2005 16:35:19 -0000      1.40
-+++++++ src/findlib/bfile.c    21 Nov 2005 13:17:59 -0000
-++++@@ -623,13 +623,10 @@
-++++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
-++++ {
-++++    POOLMEM *rsrc_fname;
-++++-   size_t fname_len;
-++++ 
-++++-   fname_len = strlen(fname);
-++++    rsrc_fname = get_pool_memory(PM_FNAME);
-++++-   bstrncpy(rsrc_fname, fname, fname_len + 1);
-++++-   bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC,
-++++-      strlen(_PATH_RSRCFORKSPEC) + 1);
-+++++   pm_strcpy(rsrc_fname, fname);
-+++++   pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC);
-++++    bopen(bfd, rsrc_fname, flags, mode);
-++++    free_pool_memory(rsrc_fname);
-++++    return bfd->fid;
-++++Index: src/lib/bnet_server.c
-++++===================================================================
-++++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v
-++++retrieving revision 1.39
-++++diff -u -r1.39 bnet_server.c
-++++--- src/lib/bnet_server.c  18 Aug 2005 15:37:40 -0000      1.39
-+++++++ src/lib/bnet_server.c  21 Nov 2005 13:18:00 -0000
-++++@@ -153,7 +153,6 @@
-++++          /* Error, get out */
-++++          foreach_dlist(fd_ptr, &sockfds) {
-++++             close(fd_ptr->fd);
-++++-            free((void *)fd_ptr);
-++++          }
-++++          Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror());
-++++          break;
-++++Index: src/stored/autochanger.c
-++++===================================================================
-++++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
-++++retrieving revision 1.47.2.3
-++++diff -u -r1.47.2.3 autochanger.c
-++++--- src/stored/autochanger.c       12 Nov 2005 17:30:53 -0000      1.47.2.3
-+++++++ src/stored/autochanger.c       21 Nov 2005 13:18:00 -0000
-++++@@ -4,7 +4,7 @@
-++++  *
-++++  *   Kern Sibbald, August MMII
-++++  *                            
-++++- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++  */
-++++ /*
-++++    Copyright (C) 2002-2005 Kern Sibbald
-++++@@ -163,6 +163,7 @@
-++++             rtn_stat = -1;            /* hard error */
-++++          }
-++++          Dmsg2(400, "load slot %d status=%d\n", slot, status);
-+++++         unlock_changer(dcr);
-++++       } else {
-++++          status = 0;                  /* we got what we want */
-++++          dev->Slot = slot;            /* set currently loaded slot */
-++++@@ -174,7 +175,6 @@
-++++    } else {
-++++       rtn_stat = 0;                   /* no changer found */
-++++    }
-++++-   unlock_changer(dcr);
-++++    free_pool_memory(changer);
-++++    return rtn_stat;
-++++ 
-++++Index: src/stored/status.c
-++++===================================================================
-++++RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v
-++++retrieving revision 1.44.2.1
-++++diff -u -r1.44.2.1 status.c
-++++--- src/stored/status.c    6 Oct 2005 07:04:13 -0000       1.44.2.1
-+++++++ src/stored/status.c    21 Nov 2005 13:18:00 -0000
-++++@@ -264,6 +264,7 @@
-++++    bool found = false;
-++++    int bps, sec;
-++++    JCR *jcr;
-+++++   DCR *dcr;
-++++    char JobName[MAX_NAME_LENGTH];
-++++    char b1[30], b2[30], b3[30];
-++++ 
-++++@@ -273,7 +274,8 @@
-++++          bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"),
-++++             job_type_to_str(jcr->JobType), jcr->Job);
-++++       }
-++++-      if (jcr->dcr && jcr->dcr->device) {
-+++++      dcr = jcr->dcr;
-+++++      if (dcr && dcr->device) {
-++++          bstrncpy(JobName, jcr->Job, sizeof(JobName));
-++++          /* There are three periods after the Job name */
-++++          char *p;
-++++@@ -282,13 +284,16 @@
-++++                *p = 0;
-++++             }
-++++          }
-++++-         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"),
-+++++         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n"
-+++++                            "    pool=\"%s\" device=\"%s\"\n"),
-++++                    job_level_to_str(jcr->JobLevel),
-++++                    job_type_to_str(jcr->JobType),
-++++                    JobName,
-++++                    jcr->JobId,
-++++-                   jcr->dcr->VolumeName,
-++++-                   jcr->dcr->device->device_name);
-+++++                   dcr->VolumeName,
-+++++                   dcr->pool_name,
-+++++                   dcr->dev?dcr->dev->print_name(): 
-+++++                            dcr->device->device_name);
-++++          sec = time(NULL) - jcr->run_time;
-++++          if (sec <= 0) {
-++++             sec = 1;
-++++Index: src/stored/stored_conf.c
-++++===================================================================
-++++RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v
-++++retrieving revision 1.76
-++++diff -u -r1.76 stored_conf.c
-++++--- src/stored/stored_conf.c       9 Sep 2005 09:40:04 -0000       1.76
-+++++++ src/stored/stored_conf.c       21 Nov 2005 13:18:00 -0000
-++++@@ -222,16 +222,16 @@
-++++          res->res_dev.hdr.name,
-++++          res->res_dev.media_type, res->res_dev.device_name,
-++++          res->res_dev.label_type);
-++++-      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d\n",
-+++++      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n",
-++++          res->res_dev.max_rewind_wait, res->res_dev.min_block_size,
-++++-         res->res_dev.max_block_size);
-+++++         res->res_dev.max_block_size, res->res_dev.max_changer_wait);
-++++       sendit(sock, "        max_jobs=%d max_files=%" lld " max_size=%" lld "\n",
-++++          res->res_dev.max_volume_jobs, res->res_dev.max_volume_files,
-++++          res->res_dev.max_volume_size);
-++++       sendit(sock, "        max_file_size=%" lld " capacity=%" lld "\n",
-++++          res->res_dev.max_file_size, res->res_dev.volume_capacity);
-++++-      sendit(sock, "         spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
-++++-      sendit(sock, "         max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
-+++++      sendit(sock, "        spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
-+++++      sendit(sock, "        max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
-++++          res->res_dev.max_spool_size, res->res_dev.max_job_spool_size);
-++++       if (res->res_dev.changer_res) {
-++++          sendit(sock, "         changer=%p\n", res->res_dev.changer_res);
-++++Index: src/tray-monitor/tray-monitor.c
-++++===================================================================
-++++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v
-++++retrieving revision 1.25.2.1
-++++diff -u -r1.25.2.1 tray-monitor.c
-++++--- src/tray-monitor/tray-monitor.c        1 Oct 2005 10:20:18 -0000       1.25.2.1
-+++++++ src/tray-monitor/tray-monitor.c        21 Nov 2005 13:18:00 -0000
-++++@@ -4,7 +4,7 @@
-++++  *
-++++  *     Nicolas Boichat, August MMIV
-++++  *
-++++- *     Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++++ *     Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++  */
-++++ 
-++++ /*
-++++@@ -881,7 +881,7 @@
-++++       }
-++++ 
-++++       if (item->D_sock == NULL) {
-++++-         g_slist_append(*list, (void *)_("Cannot connect to daemon.\n"));
-+++++         g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n")));
-++++          changeStatusMessage(item, _("Cannot connect to daemon."));
-++++          item->state = error;
-++++          item->oldstate = error;
-+++Index: patches/patches-1.38.0
-+++===================================================================
-+++RCS file: patches/patches-1.38.0
-+++diff -N patches/patches-1.38.0
-+++Index: patches/patches-1.38.1
-+++===================================================================
-+++RCS file: patches/patches-1.38.1
-+++diff -N patches/patches-1.38.1
-+++--- /dev/null       1 Jan 1970 00:00:00 -0000
-++++++ patches/patches-1.38.1  21 Nov 2005 18:19:05 -0000
-+++@@ -0,0 +1,14 @@
-++++20Nov05 1.38.1-to-1.38.2.patch
-++++ This patch fixes the following bugs:
-++++
-++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
-++++  says this patch does not fix his problem)
-++++- Fix cancel failure bug. Bug #481
-++++- Fix failure when Pool name has spaces. Bug #487
-++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-++++- Fix a couple of free()s in src/filed/acl.c
-++++- Fix memory overrun in bfile.c in building OS X resource
-++++  fork filename. Bug #489
-++++                         
-++++  
-+++Index: src/version.h
-+++===================================================================
-+++RCS file: /cvsroot/bacula/bacula/src/version.h,v
-+++retrieving revision 1.554.2.14
-+++diff -u -r1.554.2.14 version.h
-+++--- src/version.h   14 Nov 2005 14:21:58 -0000      1.554.2.14
-++++++ src/version.h   21 Nov 2005 18:19:06 -0000
-+++@@ -3,9 +3,9 @@
-+++  */
-+++ 
-+++ #undef  VERSION
-+++-#define VERSION "1.38.1"
-+++-#define BDATE   "14 November 2005"
-+++-#define LSMDATE "14Nov05"
-++++#define VERSION "1.38.2"
-++++#define BDATE   "20 November 2005"
-++++#define LSMDATE "20Nov05"
-+++ 
-+++ /* Debug flags */
-+++ #undef  DEBUG
-+++Index: src/dird/catreq.c
-+++===================================================================
-+++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v
-+++retrieving revision 1.77.2.1
-+++diff -u -r1.77.2.1 catreq.c
-+++--- src/dird/catreq.c       26 Oct 2005 14:02:04 -0000      1.77.2.1
-++++++ src/dird/catreq.c       21 Nov 2005 18:19:06 -0000
-+++@@ -10,7 +10,7 @@
-+++  *  Basic tasks done here:
-+++  *      Handle Catalog services.
-+++  *
-+++- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++  */
-+++ /*
-+++    Copyright (C) 2001-2005 Kern Sibbald
-+++@@ -117,6 +117,7 @@
-+++    if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) {
-+++       memset(&pr, 0, sizeof(pr));
-+++       bstrncpy(pr.Name, pool_name, sizeof(pr.Name));
-++++      unbash_spaces(pr.Name);
-+++       ok = db_get_pool_record(jcr, jcr->db, &pr);
-+++       if (ok) {
-+++          mr.PoolId = pr.PoolId;
-+++Index: src/dird/ua_restore.c
-+++===================================================================
-+++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v
-+++retrieving revision 1.101.2.1
-+++diff -u -r1.101.2.1 ua_restore.c
-+++--- src/dird/ua_restore.c   26 Oct 2005 14:02:04 -0000      1.101.2.1
-++++++ src/dird/ua_restore.c   21 Nov 2005 18:19:06 -0000
-+++@@ -10,7 +10,7 @@
-+++  *
-+++  *     Kern Sibbald, July MMII
-+++  *
-+++- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++  */
-+++ /*
-+++    Copyright (C) 2002-2005 Kern Sibbald
-+++@@ -409,7 +409,7 @@
-+++       }
-+++       done = true;
-+++       switch (do_prompt(ua, "", _("Select item: "), NULL, 0)) {
-+++-      case -1:                        /* error */
-++++      case -1:                        /* error or cancel */
-+++          return 0;
-+++       case 0:                         /* list last 20 Jobs run */
-+++          gui_save = ua->jcr->gui;
-+++Index: src/dird/ua_run.c
-+++===================================================================
-+++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v
-+++retrieving revision 1.71
-+++diff -u -r1.71 ua_run.c
-+++--- src/dird/ua_run.c       10 Aug 2005 16:35:19 -0000      1.71
-++++++ src/dird/ua_run.c       21 Nov 2005 18:19:06 -0000
-+++@@ -851,6 +851,8 @@
-+++             bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
-+++          }
-+++          goto try_again;
-++++      case -1:                        /* error or cancel */
-++++         goto bail_out;
-+++       default:
-+++          goto try_again;
-+++       }
-+++Index: src/dird/ua_select.c
-+++===================================================================
-+++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v
-+++retrieving revision 1.65.2.1
-+++diff -u -r1.65.2.1 ua_select.c
-+++--- src/dird/ua_select.c    12 Nov 2005 17:30:52 -0000      1.65.2.1
-++++++ src/dird/ua_select.c    21 Nov 2005 18:19:06 -0000
-+++@@ -4,7 +4,7 @@
-+++  *
-+++  *     Kern Sibbald, October MMI
-+++  *
-+++- *   Version  $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++ *   Version  $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++  */
-+++ /*
-+++    Copyright (C) 2001-2005 Kern Sibbald
-+++@@ -149,7 +149,9 @@
-+++       }
-+++    }
-+++    UnlockRes();
-+++-   do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name));
-++++   if (do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name)) < 0) {
-++++      return NULL;
-++++   }
-+++    store = (STORE *)GetResWithName(R_STORAGE, name);
-+++    return store;
-+++ }
-+++@@ -170,7 +172,9 @@
-+++       }
-+++    }
-+++    UnlockRes();
-+++-   do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name));
-++++   if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) {
-++++      return NULL;
-++++   }
-+++    fs = (FILESET *)GetResWithName(R_FILESET, name);
-+++    return fs;
-+++ }
-+++@@ -202,7 +206,9 @@
-+++          }
-+++       }
-+++       UnlockRes();
-+++-      do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name));
-++++      if (do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name)) < 0) {
-++++         return NULL;
-++++      }
-+++       catalog = (CAT *)GetResWithName(R_CATALOG, name);
-+++    }
-+++    return catalog;
-+++@@ -225,7 +231,9 @@
-+++       }
-+++    }
-+++    UnlockRes();
-+++-   do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name));
-++++   if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) {
-++++      return NULL;
-++++   }
-+++    job = (JOB *)GetResWithName(R_JOB, name);
-+++    return job;
-+++ }
-+++@@ -246,7 +254,9 @@
-+++       }
-+++    }
-+++    UnlockRes();
-+++-   do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name));
-++++   if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) {
-++++      return NULL;
-++++   }
-+++    job = (JOB *)GetResWithName(R_JOB, name);
-+++    return job;
-+++ }
-+++@@ -269,7 +279,9 @@
-+++       }
-+++    }
-+++    UnlockRes();
-+++-   do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name));
-++++   if (do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) {
-++++      return NULL;
-++++   }
-+++    client = (CLIENT *)GetResWithName(R_CLIENT, name);
-+++    return client;
-+++ }
-+++@@ -551,7 +563,9 @@
-+++       }
-+++    }
-+++    UnlockRes();
-+++-   do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name));
-++++   if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) {
-++++      return NULL;
-++++   }
-+++    pool = (POOL *)GetResWithName(R_POOL, name);
-+++    return pool;
-+++ }
-+++@@ -673,12 +687,16 @@
-+++  *  Returns: -1 on error
-+++  *            index base 0 on success, and choice
-+++  *               is copied to prompt if not NULL
-++++ *             prompt is set to the chosen prompt item string
-+++  */
-+++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
-+++ {
-+++    int i, item;
-+++    char pmsg[MAXSTRING];
-+++ 
-++++   if (prompt) {
-++++      *prompt = 0;
-++++   }
-+++    if (ua->num_prompts == 2) {
-+++       item = 1;
-+++       if (prompt) {
-+++@@ -698,15 +716,11 @@
-+++       bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
-+++    }
-+++ 
-+++-   if (prompt) {
-+++-      *prompt = 0;
-+++-   }
-+++-
-+++    for ( ;; ) {
-+++       /* First item is the prompt string, not the items */
-+++       if (ua->num_prompts == 1) {
-+++          bsendmsg(ua, _("Selection is empty!\n"));
-+++-         item = 0;                    /* list is empty ! */
-++++         item = -1;                    /* list is empty ! */
-+++          break;
-+++       }
-+++       if (ua->num_prompts == 2) {
-+++@@ -741,7 +755,7 @@
-+++       free(ua->prompt[i]);
-+++    }
-+++    ua->num_prompts = 0;
-+++-   return item - 1;
-++++   return item>0 ? item-1 : item;
-+++ }
-+++ 
-+++ 
-+++Index: src/dird/ua_update.c
-+++===================================================================
-+++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v
-+++retrieving revision 1.7
-+++diff -u -r1.7 ua_update.c
-+++--- src/dird/ua_update.c    28 Aug 2005 12:22:02 -0000      1.7
-++++++ src/dird/ua_update.c    21 Nov 2005 18:19:06 -0000
-+++@@ -590,7 +590,7 @@
-+++          update_all_vols_from_pool(ua);
-+++          return 1;
-+++       default:                        /* Done or error */
-+++-         bsendmsg(ua, _("Selection done.\n"));
-++++         bsendmsg(ua, _("Selection terminated.\n"));
-+++          return 1;
-+++       }
-+++    }
-+++Index: src/filed/acl.c
-+++===================================================================
-+++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v
-+++retrieving revision 1.10.2.1
-+++diff -u -r1.10.2.1 acl.c
-+++--- src/filed/acl.c 14 Nov 2005 20:20:38 -0000      1.10.2.1
-++++++ src/filed/acl.c 21 Nov 2005 18:19:07 -0000
-+++@@ -26,7 +26,7 @@
-+++  *
-+++  *   Written by Preben 'Peppe' Guldberg, December MMIV
-+++  *
-+++- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++  */
-+++ /*
-+++    Copyright (C) 2004-2005 Kern Sibbald
-+++@@ -140,7 +140,7 @@
-+++ 
-+++    if ((acl_text = acl_get(jcr->last_fname)) != NULL) {
-+++       len = pm_strcpy(jcr->acl_text, acl_text);
-+++-      free(acl_text);
-++++      actuallyfree(acl_text);
-+++       return len;
-+++    }
-+++    return -1;
-+++@@ -270,7 +270,7 @@
-+++    if ((n = getacl(jcr->last_fname, n, acls)) > 0) {
-+++       if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) {
-+++          len = pm_strcpy(jcr->acl_text, acl_text);
-+++-         free(acl_text);
-++++         actuallyfree(acl_text);
-+++          return len;
-+++       }
-+++    }
-+++Index: src/findlib/bfile.c
-+++===================================================================
-+++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v
-+++retrieving revision 1.40
-+++diff -u -r1.40 bfile.c
-+++--- src/findlib/bfile.c     10 Aug 2005 16:35:19 -0000      1.40
-++++++ src/findlib/bfile.c     21 Nov 2005 18:19:07 -0000
-+++@@ -623,13 +623,10 @@
-+++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
-+++ {
-+++    POOLMEM *rsrc_fname;
-+++-   size_t fname_len;
-+++ 
-+++-   fname_len = strlen(fname);
-+++    rsrc_fname = get_pool_memory(PM_FNAME);
-+++-   bstrncpy(rsrc_fname, fname, fname_len + 1);
-+++-   bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC,
-+++-      strlen(_PATH_RSRCFORKSPEC) + 1);
-++++   pm_strcpy(rsrc_fname, fname);
-++++   pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC);
-+++    bopen(bfd, rsrc_fname, flags, mode);
-+++    free_pool_memory(rsrc_fname);
-+++    return bfd->fid;
-+++Index: src/lib/bnet_server.c
-+++===================================================================
-+++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v
-+++retrieving revision 1.39
-+++diff -u -r1.39 bnet_server.c
-+++--- src/lib/bnet_server.c   18 Aug 2005 15:37:40 -0000      1.39
-++++++ src/lib/bnet_server.c   21 Nov 2005 18:19:07 -0000
-+++@@ -153,7 +153,6 @@
-+++          /* Error, get out */
-+++          foreach_dlist(fd_ptr, &sockfds) {
-+++             close(fd_ptr->fd);
-+++-            free((void *)fd_ptr);
-+++          }
-+++          Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror());
-+++          break;
-+++Index: src/stored/autochanger.c
-+++===================================================================
-+++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
-+++retrieving revision 1.47.2.3
-+++diff -u -r1.47.2.3 autochanger.c
-+++--- src/stored/autochanger.c        12 Nov 2005 17:30:53 -0000      1.47.2.3
-++++++ src/stored/autochanger.c        21 Nov 2005 18:19:07 -0000
-+++@@ -4,7 +4,7 @@
-+++  *
-+++  *   Kern Sibbald, August MMII
-+++  *                            
-+++- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++  */
-+++ /*
-+++    Copyright (C) 2002-2005 Kern Sibbald
-+++@@ -163,6 +163,7 @@
-+++             rtn_stat = -1;            /* hard error */
-+++          }
-+++          Dmsg2(400, "load slot %d status=%d\n", slot, status);
-++++         unlock_changer(dcr);
-+++       } else {
-+++          status = 0;                  /* we got what we want */
-+++          dev->Slot = slot;            /* set currently loaded slot */
-+++@@ -174,7 +175,6 @@
-+++    } else {
-+++       rtn_stat = 0;                   /* no changer found */
-+++    }
-+++-   unlock_changer(dcr);
-+++    free_pool_memory(changer);
-+++    return rtn_stat;
-+++ 
-+++Index: src/stored/status.c
-+++===================================================================
-+++RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v
-+++retrieving revision 1.44.2.1
-+++diff -u -r1.44.2.1 status.c
-+++--- src/stored/status.c     6 Oct 2005 07:04:13 -0000       1.44.2.1
-++++++ src/stored/status.c     21 Nov 2005 18:19:08 -0000
-+++@@ -264,6 +264,7 @@
-+++    bool found = false;
-+++    int bps, sec;
-+++    JCR *jcr;
-++++   DCR *dcr;
-+++    char JobName[MAX_NAME_LENGTH];
-+++    char b1[30], b2[30], b3[30];
-+++ 
-+++@@ -273,7 +274,8 @@
-+++          bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"),
-+++             job_type_to_str(jcr->JobType), jcr->Job);
-+++       }
-+++-      if (jcr->dcr && jcr->dcr->device) {
-++++      dcr = jcr->dcr;
-++++      if (dcr && dcr->device) {
-+++          bstrncpy(JobName, jcr->Job, sizeof(JobName));
-+++          /* There are three periods after the Job name */
-+++          char *p;
-+++@@ -282,13 +284,16 @@
-+++                *p = 0;
-+++             }
-+++          }
-+++-         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"),
-++++         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n"
-++++                            "    pool=\"%s\" device=\"%s\"\n"),
-+++                    job_level_to_str(jcr->JobLevel),
-+++                    job_type_to_str(jcr->JobType),
-+++                    JobName,
-+++                    jcr->JobId,
-+++-                   jcr->dcr->VolumeName,
-+++-                   jcr->dcr->device->device_name);
-++++                   dcr->VolumeName,
-++++                   dcr->pool_name,
-++++                   dcr->dev?dcr->dev->print_name(): 
-++++                            dcr->device->device_name);
-+++          sec = time(NULL) - jcr->run_time;
-+++          if (sec <= 0) {
-+++             sec = 1;
-+++Index: src/stored/stored_conf.c
-+++===================================================================
-+++RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v
-+++retrieving revision 1.76
-+++diff -u -r1.76 stored_conf.c
-+++--- src/stored/stored_conf.c        9 Sep 2005 09:40:04 -0000       1.76
-++++++ src/stored/stored_conf.c        21 Nov 2005 18:19:08 -0000
-+++@@ -222,16 +222,16 @@
-+++          res->res_dev.hdr.name,
-+++          res->res_dev.media_type, res->res_dev.device_name,
-+++          res->res_dev.label_type);
-+++-      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d\n",
-++++      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n",
-+++          res->res_dev.max_rewind_wait, res->res_dev.min_block_size,
-+++-         res->res_dev.max_block_size);
-++++         res->res_dev.max_block_size, res->res_dev.max_changer_wait);
-+++       sendit(sock, "        max_jobs=%d max_files=%" lld " max_size=%" lld "\n",
-+++          res->res_dev.max_volume_jobs, res->res_dev.max_volume_files,
-+++          res->res_dev.max_volume_size);
-+++       sendit(sock, "        max_file_size=%" lld " capacity=%" lld "\n",
-+++          res->res_dev.max_file_size, res->res_dev.volume_capacity);
-+++-      sendit(sock, "         spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
-+++-      sendit(sock, "         max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
-++++      sendit(sock, "        spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
-++++      sendit(sock, "        max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
-+++          res->res_dev.max_spool_size, res->res_dev.max_job_spool_size);
-+++       if (res->res_dev.changer_res) {
-+++          sendit(sock, "         changer=%p\n", res->res_dev.changer_res);
-+++Index: src/tray-monitor/tray-monitor.c
-+++===================================================================
-+++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v
-+++retrieving revision 1.25.2.1
-+++diff -u -r1.25.2.1 tray-monitor.c
-+++--- src/tray-monitor/tray-monitor.c 1 Oct 2005 10:20:18 -0000       1.25.2.1
-++++++ src/tray-monitor/tray-monitor.c 21 Nov 2005 18:19:08 -0000
-+++@@ -4,7 +4,7 @@
-+++  *
-+++  *     Nicolas Boichat, August MMIV
-+++  *
-+++- *     Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++++ *     Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++  */
-+++ 
-+++ /*
-+++@@ -881,7 +881,7 @@
-+++       }
-+++ 
-+++       if (item->D_sock == NULL) {
-+++-         g_slist_append(*list, (void *)_("Cannot connect to daemon.\n"));
-++++         g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n")));
-+++          changeStatusMessage(item, _("Cannot connect to daemon."));
-+++          item->state = error;
-+++          item->oldstate = error;
-++Index: patches/patches-1.38.0
-++===================================================================
-++RCS file: patches/patches-1.38.0
-++diff -N patches/patches-1.38.0
-++Index: patches/patches-1.38.1
-++===================================================================
-++RCS file: patches/patches-1.38.1
-++diff -N patches/patches-1.38.1
-++--- /dev/null        1 Jan 1970 00:00:00 -0000
-+++++ patches/patches-1.38.1   22 Nov 2005 10:42:22 -0000
-++@@ -0,0 +1,14 @@
-+++20Nov05 1.38.1-to-1.38.2.patch
-+++ This patch fixes the following bugs:
-+++
-+++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-+++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
-+++  says this patch does not fix his problem)
-+++- Fix cancel failure bug. Bug #481
-+++- Fix failure when Pool name has spaces. Bug #487
-+++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-+++- Fix a couple of free()s in src/filed/acl.c
-+++- Fix memory overrun in bfile.c in building OS X resource
-+++  fork filename. Bug #489
-+++                         
-+++  
-++Index: src/version.h
-++===================================================================
-++RCS file: /cvsroot/bacula/bacula/src/version.h,v
-++retrieving revision 1.554.2.14
-++diff -u -r1.554.2.14 version.h
-++--- src/version.h    14 Nov 2005 14:21:58 -0000      1.554.2.14
-+++++ src/version.h    22 Nov 2005 10:42:22 -0000
-++@@ -3,9 +3,9 @@
-++  */
-++ 
-++ #undef  VERSION
-++-#define VERSION "1.38.1"
-++-#define BDATE   "14 November 2005"
-++-#define LSMDATE "14Nov05"
-+++#define VERSION "1.38.2"
-+++#define BDATE   "20 November 2005"
-+++#define LSMDATE "20Nov05"
-++ 
-++ /* Debug flags */
-++ #undef  DEBUG
-++Index: src/dird/catreq.c
-++===================================================================
-++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v
-++retrieving revision 1.77.2.1
-++diff -u -r1.77.2.1 catreq.c
-++--- src/dird/catreq.c        26 Oct 2005 14:02:04 -0000      1.77.2.1
-+++++ src/dird/catreq.c        22 Nov 2005 10:42:22 -0000
-++@@ -10,7 +10,7 @@
-++  *  Basic tasks done here:
-++  *      Handle Catalog services.
-++  *
-++- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++  */
-++ /*
-++    Copyright (C) 2001-2005 Kern Sibbald
-++@@ -117,6 +117,7 @@
-++    if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) {
-++       memset(&pr, 0, sizeof(pr));
-++       bstrncpy(pr.Name, pool_name, sizeof(pr.Name));
-+++      unbash_spaces(pr.Name);
-++       ok = db_get_pool_record(jcr, jcr->db, &pr);
-++       if (ok) {
-++          mr.PoolId = pr.PoolId;
-++Index: src/dird/ua_restore.c
-++===================================================================
-++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v
-++retrieving revision 1.101.2.1
-++diff -u -r1.101.2.1 ua_restore.c
-++--- src/dird/ua_restore.c    26 Oct 2005 14:02:04 -0000      1.101.2.1
-+++++ src/dird/ua_restore.c    22 Nov 2005 10:42:23 -0000
-++@@ -10,7 +10,7 @@
-++  *
-++  *     Kern Sibbald, July MMII
-++  *
-++- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++  */
-++ /*
-++    Copyright (C) 2002-2005 Kern Sibbald
-++@@ -409,7 +409,7 @@
-++       }
-++       done = true;
-++       switch (do_prompt(ua, "", _("Select item: "), NULL, 0)) {
-++-      case -1:                        /* error */
-+++      case -1:                        /* error or cancel */
-++          return 0;
-++       case 0:                         /* list last 20 Jobs run */
-++          gui_save = ua->jcr->gui;
-++Index: src/dird/ua_run.c
-++===================================================================
-++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v
-++retrieving revision 1.71
-++diff -u -r1.71 ua_run.c
-++--- src/dird/ua_run.c        10 Aug 2005 16:35:19 -0000      1.71
-+++++ src/dird/ua_run.c        22 Nov 2005 10:42:23 -0000
-++@@ -851,6 +851,8 @@
-++             bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
-++          }
-++          goto try_again;
-+++      case -1:                        /* error or cancel */
-+++         goto bail_out;
-++       default:
-++          goto try_again;
-++       }
-++Index: src/dird/ua_select.c
-++===================================================================
-++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v
-++retrieving revision 1.65.2.1
-++diff -u -r1.65.2.1 ua_select.c
-++--- src/dird/ua_select.c     12 Nov 2005 17:30:52 -0000      1.65.2.1
-+++++ src/dird/ua_select.c     22 Nov 2005 10:42:23 -0000
-++@@ -4,7 +4,7 @@
-++  *
-++  *     Kern Sibbald, October MMI
-++  *
-++- *   Version  $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++ *   Version  $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++  */
-++ /*
-++    Copyright (C) 2001-2005 Kern Sibbald
-++@@ -149,7 +149,9 @@
-++       }
-++    }
-++    UnlockRes();
-++-   do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name));
-+++   if (do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name)) < 0) {
-+++      return NULL;
-+++   }
-++    store = (STORE *)GetResWithName(R_STORAGE, name);
-++    return store;
-++ }
-++@@ -170,7 +172,9 @@
-++       }
-++    }
-++    UnlockRes();
-++-   do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name));
-+++   if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) {
-+++      return NULL;
-+++   }
-++    fs = (FILESET *)GetResWithName(R_FILESET, name);
-++    return fs;
-++ }
-++@@ -202,7 +206,9 @@
-++          }
-++       }
-++       UnlockRes();
-++-      do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name));
-+++      if (do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name)) < 0) {
-+++         return NULL;
-+++      }
-++       catalog = (CAT *)GetResWithName(R_CATALOG, name);
-++    }
-++    return catalog;
-++@@ -225,7 +231,9 @@
-++       }
-++    }
-++    UnlockRes();
-++-   do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name));
-+++   if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) {
-+++      return NULL;
-+++   }
-++    job = (JOB *)GetResWithName(R_JOB, name);
-++    return job;
-++ }
-++@@ -246,7 +254,9 @@
-++       }
-++    }
-++    UnlockRes();
-++-   do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name));
-+++   if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) {
-+++      return NULL;
-+++   }
-++    job = (JOB *)GetResWithName(R_JOB, name);
-++    return job;
-++ }
-++@@ -269,7 +279,9 @@
-++       }
-++    }
-++    UnlockRes();
-++-   do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name));
-+++   if (do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) {
-+++      return NULL;
-+++   }
-++    client = (CLIENT *)GetResWithName(R_CLIENT, name);
-++    return client;
-++ }
-++@@ -551,7 +563,9 @@
-++       }
-++    }
-++    UnlockRes();
-++-   do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name));
-+++   if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) {
-+++      return NULL;
-+++   }
-++    pool = (POOL *)GetResWithName(R_POOL, name);
-++    return pool;
-++ }
-++@@ -673,12 +687,16 @@
-++  *  Returns: -1 on error
-++  *            index base 0 on success, and choice
-++  *               is copied to prompt if not NULL
-+++ *             prompt is set to the chosen prompt item string
-++  */
-++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
-++ {
-++    int i, item;
-++    char pmsg[MAXSTRING];
-++ 
-+++   if (prompt) {
-+++      *prompt = 0;
-+++   }
-++    if (ua->num_prompts == 2) {
-++       item = 1;
-++       if (prompt) {
-++@@ -698,15 +716,11 @@
-++       bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
-++    }
-++ 
-++-   if (prompt) {
-++-      *prompt = 0;
-++-   }
-++-
-++    for ( ;; ) {
-++       /* First item is the prompt string, not the items */
-++       if (ua->num_prompts == 1) {
-++          bsendmsg(ua, _("Selection is empty!\n"));
-++-         item = 0;                    /* list is empty ! */
-+++         item = -1;                    /* list is empty ! */
-++          break;
-++       }
-++       if (ua->num_prompts == 2) {
-++@@ -741,7 +755,7 @@
-++       free(ua->prompt[i]);
-++    }
-++    ua->num_prompts = 0;
-++-   return item - 1;
-+++   return item>0 ? item-1 : item;
-++ }
-++ 
-++ 
-++Index: src/dird/ua_update.c
-++===================================================================
-++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v
-++retrieving revision 1.7
-++diff -u -r1.7 ua_update.c
-++--- src/dird/ua_update.c     28 Aug 2005 12:22:02 -0000      1.7
-+++++ src/dird/ua_update.c     22 Nov 2005 10:42:23 -0000
-++@@ -590,7 +590,7 @@
-++          update_all_vols_from_pool(ua);
-++          return 1;
-++       default:                        /* Done or error */
-++-         bsendmsg(ua, _("Selection done.\n"));
-+++         bsendmsg(ua, _("Selection terminated.\n"));
-++          return 1;
-++       }
-++    }
-++Index: src/filed/acl.c
-++===================================================================
-++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v
-++retrieving revision 1.10.2.1
-++diff -u -r1.10.2.1 acl.c
-++--- src/filed/acl.c  14 Nov 2005 20:20:38 -0000      1.10.2.1
-+++++ src/filed/acl.c  22 Nov 2005 10:42:23 -0000
-++@@ -26,7 +26,7 @@
-++  *
-++  *   Written by Preben 'Peppe' Guldberg, December MMIV
-++  *
-++- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++  */
-++ /*
-++    Copyright (C) 2004-2005 Kern Sibbald
-++@@ -140,7 +140,7 @@
-++ 
-++    if ((acl_text = acl_get(jcr->last_fname)) != NULL) {
-++       len = pm_strcpy(jcr->acl_text, acl_text);
-++-      free(acl_text);
-+++      actuallyfree(acl_text);
-++       return len;
-++    }
-++    return -1;
-++@@ -270,7 +270,7 @@
-++    if ((n = getacl(jcr->last_fname, n, acls)) > 0) {
-++       if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) {
-++          len = pm_strcpy(jcr->acl_text, acl_text);
-++-         free(acl_text);
-+++         actuallyfree(acl_text);
-++          return len;
-++       }
-++    }
-++Index: src/findlib/bfile.c
-++===================================================================
-++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v
-++retrieving revision 1.40
-++diff -u -r1.40 bfile.c
-++--- src/findlib/bfile.c      10 Aug 2005 16:35:19 -0000      1.40
-+++++ src/findlib/bfile.c      22 Nov 2005 10:42:24 -0000
-++@@ -623,13 +623,10 @@
-++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
-++ {
-++    POOLMEM *rsrc_fname;
-++-   size_t fname_len;
-++ 
-++-   fname_len = strlen(fname);
-++    rsrc_fname = get_pool_memory(PM_FNAME);
-++-   bstrncpy(rsrc_fname, fname, fname_len + 1);
-++-   bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC,
-++-      strlen(_PATH_RSRCFORKSPEC) + 1);
-+++   pm_strcpy(rsrc_fname, fname);
-+++   pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC);
-++    bopen(bfd, rsrc_fname, flags, mode);
-++    free_pool_memory(rsrc_fname);
-++    return bfd->fid;
-++Index: src/lib/bnet_server.c
-++===================================================================
-++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v
-++retrieving revision 1.39
-++diff -u -r1.39 bnet_server.c
-++--- src/lib/bnet_server.c    18 Aug 2005 15:37:40 -0000      1.39
-+++++ src/lib/bnet_server.c    22 Nov 2005 10:42:24 -0000
-++@@ -153,7 +153,6 @@
-++          /* Error, get out */
-++          foreach_dlist(fd_ptr, &sockfds) {
-++             close(fd_ptr->fd);
-++-            free((void *)fd_ptr);
-++          }
-++          Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror());
-++          break;
-++Index: src/stored/autochanger.c
-++===================================================================
-++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
-++retrieving revision 1.47.2.3
-++diff -u -r1.47.2.3 autochanger.c
-++--- src/stored/autochanger.c 12 Nov 2005 17:30:53 -0000      1.47.2.3
-+++++ src/stored/autochanger.c 22 Nov 2005 10:42:24 -0000
-++@@ -4,7 +4,7 @@
-++  *
-++  *   Kern Sibbald, August MMII
-++  *                            
-++- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++  */
-++ /*
-++    Copyright (C) 2002-2005 Kern Sibbald
-++@@ -163,6 +163,7 @@
-++             rtn_stat = -1;            /* hard error */
-++          }
-++          Dmsg2(400, "load slot %d status=%d\n", slot, status);
-+++         unlock_changer(dcr);
-++       } else {
-++          status = 0;                  /* we got what we want */
-++          dev->Slot = slot;            /* set currently loaded slot */
-++@@ -174,7 +175,6 @@
-++    } else {
-++       rtn_stat = 0;                   /* no changer found */
-++    }
-++-   unlock_changer(dcr);
-++    free_pool_memory(changer);
-++    return rtn_stat;
-++ 
-++Index: src/stored/status.c
-++===================================================================
-++RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v
-++retrieving revision 1.44.2.1
-++diff -u -r1.44.2.1 status.c
-++--- src/stored/status.c      6 Oct 2005 07:04:13 -0000       1.44.2.1
-+++++ src/stored/status.c      22 Nov 2005 10:42:24 -0000
-++@@ -264,6 +264,7 @@
-++    bool found = false;
-++    int bps, sec;
-++    JCR *jcr;
-+++   DCR *dcr;
-++    char JobName[MAX_NAME_LENGTH];
-++    char b1[30], b2[30], b3[30];
-++ 
-++@@ -273,7 +274,8 @@
-++          bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"),
-++             job_type_to_str(jcr->JobType), jcr->Job);
-++       }
-++-      if (jcr->dcr && jcr->dcr->device) {
-+++      dcr = jcr->dcr;
-+++      if (dcr && dcr->device) {
-++          bstrncpy(JobName, jcr->Job, sizeof(JobName));
-++          /* There are three periods after the Job name */
-++          char *p;
-++@@ -282,13 +284,16 @@
-++                *p = 0;
-++             }
-++          }
-++-         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"),
-+++         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n"
-+++                            "    pool=\"%s\" device=\"%s\"\n"),
-++                    job_level_to_str(jcr->JobLevel),
-++                    job_type_to_str(jcr->JobType),
-++                    JobName,
-++                    jcr->JobId,
-++-                   jcr->dcr->VolumeName,
-++-                   jcr->dcr->device->device_name);
-+++                   dcr->VolumeName,
-+++                   dcr->pool_name,
-+++                   dcr->dev?dcr->dev->print_name(): 
-+++                            dcr->device->device_name);
-++          sec = time(NULL) - jcr->run_time;
-++          if (sec <= 0) {
-++             sec = 1;
-++Index: src/stored/stored_conf.c
-++===================================================================
-++RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v
-++retrieving revision 1.76
-++diff -u -r1.76 stored_conf.c
-++--- src/stored/stored_conf.c 9 Sep 2005 09:40:04 -0000       1.76
-+++++ src/stored/stored_conf.c 22 Nov 2005 10:42:24 -0000
-++@@ -222,16 +222,16 @@
-++          res->res_dev.hdr.name,
-++          res->res_dev.media_type, res->res_dev.device_name,
-++          res->res_dev.label_type);
-++-      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d\n",
-+++      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n",
-++          res->res_dev.max_rewind_wait, res->res_dev.min_block_size,
-++-         res->res_dev.max_block_size);
-+++         res->res_dev.max_block_size, res->res_dev.max_changer_wait);
-++       sendit(sock, "        max_jobs=%d max_files=%" lld " max_size=%" lld "\n",
-++          res->res_dev.max_volume_jobs, res->res_dev.max_volume_files,
-++          res->res_dev.max_volume_size);
-++       sendit(sock, "        max_file_size=%" lld " capacity=%" lld "\n",
-++          res->res_dev.max_file_size, res->res_dev.volume_capacity);
-++-      sendit(sock, "         spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
-++-      sendit(sock, "         max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
-+++      sendit(sock, "        spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
-+++      sendit(sock, "        max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
-++          res->res_dev.max_spool_size, res->res_dev.max_job_spool_size);
-++       if (res->res_dev.changer_res) {
-++          sendit(sock, "         changer=%p\n", res->res_dev.changer_res);
-++Index: src/tray-monitor/tray-monitor.c
-++===================================================================
-++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v
-++retrieving revision 1.25.2.1
-++diff -u -r1.25.2.1 tray-monitor.c
-++--- src/tray-monitor/tray-monitor.c  1 Oct 2005 10:20:18 -0000       1.25.2.1
-+++++ src/tray-monitor/tray-monitor.c  22 Nov 2005 10:42:24 -0000
-++@@ -4,7 +4,7 @@
-++  *
-++  *     Nicolas Boichat, August MMIV
-++  *
-++- *     Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+++ *     Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++  */
-++ 
-++ /*
-++@@ -881,7 +881,7 @@
-++       }
-++ 
-++       if (item->D_sock == NULL) {
-++-         g_slist_append(*list, (void *)_("Cannot connect to daemon.\n"));
-+++         g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n")));
-++          changeStatusMessage(item, _("Cannot connect to daemon."));
-++          item->state = error;
-++          item->oldstate = error;
-++Index: updatedb/kes-1.38
-++===================================================================
-++RCS file: updatedb/kes-1.38
-++diff -N updatedb/kes-1.38
-++--- updatedb/kes-1.38        3 Nov 2005 14:54:28 -0000       1.1.2.1
-+++++ /dev/null        1 Jan 1970 00:00:00 -0000
-++@@ -1,19 +0,0 @@
-++-              Technical notes on version 1.38  
-++-                        Kern Sibbald
-++-
-++-General:
-++-
-++-Changes to 1.38.0:
-++-- Modify configure.in to add execute option to sqlite3 catalog  
-++-  scripts.
-++-- Create update_xxx_table_8_to_9 scripts for updatedb
-++-- Fix wrong variable in bpipe.c debug output reported by user.
-++-- Fix improper placement of encode_and_send_attributes() in
-++-  FD backup.c causing first file of non-portable Win32 backup
-++-  to have wrong stream. Reported by Thorsten.
-++-- Move the -lcrypt for PostgreSQL after the PostgreSQL libs in
-++-  autoconf/bacula-macros/db.m4 as suggested by user.  Fixes bug #457.
-++-- Remove @STATIC_CONS@ from tray-monitor Makefile as suggested
-++-  by user. Fixes bug #456.
-++-
-++-Released 1.38.0 (28Oct05): 31 October 2005
-+Index: patches/patches-1.38.0
-+===================================================================
-+RCS file: patches/patches-1.38.0
-+diff -N patches/patches-1.38.0
-+Index: patches/patches-1.38.1
-+===================================================================
-+RCS file: patches/patches-1.38.1
-+diff -N patches/patches-1.38.1
-+--- /dev/null 1 Jan 1970 00:00:00 -0000
-++++ patches/patches-1.38.1    22 Nov 2005 10:50:55 -0000      1.1.2.2
-+@@ -0,0 +1,14 @@
-++20Nov05 1.38.1-to-1.38.2.patch
-++ This patch fixes the following bugs:
-++
-++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
-++  says this patch does not fix his problem)
-++- Fix cancel failure bug. Bug #481
-++- Fix failure when Pool name has spaces. Bug #487
-++- Fix SD crash in autochanger code. Mutex failure. Bug #488
-++- Fix a couple of free()s in src/filed/acl.c
-++- Fix memory overrun in bfile.c in building OS X resource
-++  fork filename. Bug #489
-++                         
-++  
-+Index: src/version.h
-+===================================================================
-+RCS file: /cvsroot/bacula/bacula/src/version.h,v
-+retrieving revision 1.554.2.14
-+retrieving revision 1.554.2.15
-+diff -u -r1.554.2.14 -r1.554.2.15
-+--- src/version.h     14 Nov 2005 14:21:58 -0000      1.554.2.14
-++++ src/version.h     22 Nov 2005 10:50:55 -0000      1.554.2.15
-+@@ -1,11 +1,11 @@
-+ /*
-+- *  Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++ *  Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+  */
-+ 
-+ #undef  VERSION
-+-#define VERSION "1.38.1"
-+-#define BDATE   "14 November 2005"
-+-#define LSMDATE "14Nov05"
-++#define VERSION "1.38.2"
-++#define BDATE   "20 November 2005"
-++#define LSMDATE "20Nov05"
-+ 
-+ /* Debug flags */
-+ #undef  DEBUG
-+Index: src/dird/catreq.c
-+===================================================================
-+RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v
-+retrieving revision 1.77.2.1
-+retrieving revision 1.77.2.2
-+diff -u -r1.77.2.1 -r1.77.2.2
-+--- src/dird/catreq.c 26 Oct 2005 14:02:04 -0000      1.77.2.1
-++++ src/dird/catreq.c 22 Nov 2005 10:50:55 -0000      1.77.2.2
-+@@ -10,7 +10,7 @@
-+  *  Basic tasks done here:
-+  *      Handle Catalog services.
-+  *
-+- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+  */
-+ /*
-+    Copyright (C) 2001-2005 Kern Sibbald
-+@@ -117,6 +117,7 @@
-+    if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) {
-+       memset(&pr, 0, sizeof(pr));
-+       bstrncpy(pr.Name, pool_name, sizeof(pr.Name));
-++      unbash_spaces(pr.Name);
-+       ok = db_get_pool_record(jcr, jcr->db, &pr);
-+       if (ok) {
-+          mr.PoolId = pr.PoolId;
-+Index: src/dird/ua_restore.c
-+===================================================================
-+RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v
-+retrieving revision 1.101.2.1
-+retrieving revision 1.101.2.2
-+diff -u -r1.101.2.1 -r1.101.2.2
-+--- src/dird/ua_restore.c     26 Oct 2005 14:02:04 -0000      1.101.2.1
-++++ src/dird/ua_restore.c     22 Nov 2005 10:50:55 -0000      1.101.2.2
-+@@ -10,7 +10,7 @@
-+  *
-+  *     Kern Sibbald, July MMII
-+  *
-+- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+  */
-+ /*
-+    Copyright (C) 2002-2005 Kern Sibbald
-+@@ -409,7 +409,7 @@
-+       }
-+       done = true;
-+       switch (do_prompt(ua, "", _("Select item: "), NULL, 0)) {
-+-      case -1:                        /* error */
-++      case -1:                        /* error or cancel */
-+          return 0;
-+       case 0:                         /* list last 20 Jobs run */
-+          gui_save = ua->jcr->gui;
-+Index: src/dird/ua_run.c
-+===================================================================
-+RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v
-+retrieving revision 1.71
-+retrieving revision 1.71.2.1
-+diff -u -r1.71 -r1.71.2.1
-+--- src/dird/ua_run.c 10 Aug 2005 16:35:19 -0000      1.71
-++++ src/dird/ua_run.c 22 Nov 2005 10:50:55 -0000      1.71.2.1
-+@@ -4,7 +4,7 @@
-+  *
-+  *     Kern Sibbald, December MMI
-+  *
-+- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+  */
-+ /*
-+    Copyright (C) 2001-2005 Kern Sibbald
-+@@ -851,6 +851,8 @@
-+             bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
-+          }
-+          goto try_again;
-++      case -1:                        /* error or cancel */
-++         goto bail_out;
-+       default:
-+          goto try_again;
-+       }
-+Index: src/dird/ua_select.c
-+===================================================================
-+RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v
-+retrieving revision 1.65.2.1
-+retrieving revision 1.65.2.2
-+diff -u -r1.65.2.1 -r1.65.2.2
-+--- src/dird/ua_select.c      12 Nov 2005 17:30:52 -0000      1.65.2.1
-++++ src/dird/ua_select.c      22 Nov 2005 10:50:55 -0000      1.65.2.2
-+@@ -4,7 +4,7 @@
-+  *
-+  *     Kern Sibbald, October MMI
-+  *
-+- *   Version  $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++ *   Version  $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+  */
-+ /*
-+    Copyright (C) 2001-2005 Kern Sibbald
-+@@ -149,7 +149,9 @@
-+       }
-+    }
-+    UnlockRes();
-+-   do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name));
-++   if (do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name)) < 0) {
-++      return NULL;
-++   }
-+    store = (STORE *)GetResWithName(R_STORAGE, name);
-+    return store;
-+ }
-+@@ -170,7 +172,9 @@
-+       }
-+    }
-+    UnlockRes();
-+-   do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name));
-++   if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) {
-++      return NULL;
-++   }
-+    fs = (FILESET *)GetResWithName(R_FILESET, name);
-+    return fs;
-+ }
-+@@ -202,7 +206,9 @@
-+          }
-+       }
-+       UnlockRes();
-+-      do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name));
-++      if (do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name)) < 0) {
-++         return NULL;
-++      }
-+       catalog = (CAT *)GetResWithName(R_CATALOG, name);
-+    }
-+    return catalog;
-+@@ -225,7 +231,9 @@
-+       }
-+    }
-+    UnlockRes();
-+-   do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name));
-++   if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) {
-++      return NULL;
-++   }
-+    job = (JOB *)GetResWithName(R_JOB, name);
-+    return job;
-+ }
-+@@ -246,7 +254,9 @@
-+       }
-+    }
-+    UnlockRes();
-+-   do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name));
-++   if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) {
-++      return NULL;
-++   }
-+    job = (JOB *)GetResWithName(R_JOB, name);
-+    return job;
-+ }
-+@@ -269,7 +279,9 @@
-+       }
-+    }
-+    UnlockRes();
-+-   do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name));
-++   if (do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) {
-++      return NULL;
-++   }
-+    client = (CLIENT *)GetResWithName(R_CLIENT, name);
-+    return client;
-+ }
-+@@ -551,7 +563,9 @@
-+       }
-+    }
-+    UnlockRes();
-+-   do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name));
-++   if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) {
-++      return NULL;
-++   }
-+    pool = (POOL *)GetResWithName(R_POOL, name);
-+    return pool;
-+ }
-+@@ -673,12 +687,16 @@
-+  *  Returns: -1 on error
-+  *            index base 0 on success, and choice
-+  *               is copied to prompt if not NULL
-++ *             prompt is set to the chosen prompt item string
-+  */
-+ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
-+ {
-+    int i, item;
-+    char pmsg[MAXSTRING];
-+ 
-++   if (prompt) {
-++      *prompt = 0;
-++   }
-+    if (ua->num_prompts == 2) {
-+       item = 1;
-+       if (prompt) {
-+@@ -698,15 +716,11 @@
-+       bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
-+    }
-+ 
-+-   if (prompt) {
-+-      *prompt = 0;
-+-   }
-+-
-+    for ( ;; ) {
-+       /* First item is the prompt string, not the items */
-+       if (ua->num_prompts == 1) {
-+          bsendmsg(ua, _("Selection is empty!\n"));
-+-         item = 0;                    /* list is empty ! */
-++         item = -1;                    /* list is empty ! */
-+          break;
-+       }
-+       if (ua->num_prompts == 2) {
-+@@ -741,7 +755,7 @@
-+       free(ua->prompt[i]);
-+    }
-+    ua->num_prompts = 0;
-+-   return item - 1;
-++   return item>0 ? item-1 : item;
-+ }
-+ 
-+ 
-+Index: src/dird/ua_update.c
-+===================================================================
-+RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v
-+retrieving revision 1.7
-+retrieving revision 1.7.2.1
-+diff -u -r1.7 -r1.7.2.1
-+--- src/dird/ua_update.c      28 Aug 2005 12:22:02 -0000      1.7
-++++ src/dird/ua_update.c      22 Nov 2005 10:50:55 -0000      1.7.2.1
-+@@ -5,7 +5,7 @@
-+  *
-+  *     Kern Sibbald, September MM
-+  *
-+- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+  */
-+ /*
-+    Copyright (C) 2000-2005 Kern Sibbald
-+@@ -590,7 +590,7 @@
-+          update_all_vols_from_pool(ua);
-+          return 1;
-+       default:                        /* Done or error */
-+-         bsendmsg(ua, _("Selection done.\n"));
-++         bsendmsg(ua, _("Selection terminated.\n"));
-+          return 1;
-+       }
-+    }
-+Index: src/filed/acl.c
-+===================================================================
-+RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v
-+retrieving revision 1.10.2.1
-+retrieving revision 1.10.2.2
-+diff -u -r1.10.2.1 -r1.10.2.2
-+--- src/filed/acl.c   14 Nov 2005 20:20:38 -0000      1.10.2.1
-++++ src/filed/acl.c   22 Nov 2005 10:50:55 -0000      1.10.2.2
-+@@ -26,7 +26,7 @@
-+  *
-+  *   Written by Preben 'Peppe' Guldberg, December MMIV
-+  *
-+- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+  */
-+ /*
-+    Copyright (C) 2004-2005 Kern Sibbald
-+@@ -140,7 +140,7 @@
-+ 
-+    if ((acl_text = acl_get(jcr->last_fname)) != NULL) {
-+       len = pm_strcpy(jcr->acl_text, acl_text);
-+-      free(acl_text);
-++      actuallyfree(acl_text);
-+       return len;
-+    }
-+    return -1;
-+@@ -270,7 +270,7 @@
-+    if ((n = getacl(jcr->last_fname, n, acls)) > 0) {
-+       if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) {
-+          len = pm_strcpy(jcr->acl_text, acl_text);
-+-         free(acl_text);
-++         actuallyfree(acl_text);
-+          return len;
-+       }
-+    }
-+Index: src/findlib/bfile.c
-+===================================================================
-+RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v
-+retrieving revision 1.40
-+retrieving revision 1.40.2.1
-+diff -u -r1.40 -r1.40.2.1
-+--- src/findlib/bfile.c       10 Aug 2005 16:35:19 -0000      1.40
-++++ src/findlib/bfile.c       22 Nov 2005 10:50:55 -0000      1.40.2.1
-+@@ -5,7 +5,7 @@
-+  *
-+  *    Kern Sibbald, April MMIII
-+  *
-+- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+  *
-+  */
-+ /*
-+@@ -623,13 +623,10 @@
-+ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
-+ {
-+    POOLMEM *rsrc_fname;
-+-   size_t fname_len;
-+ 
-+-   fname_len = strlen(fname);
-+    rsrc_fname = get_pool_memory(PM_FNAME);
-+-   bstrncpy(rsrc_fname, fname, fname_len + 1);
-+-   bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC,
-+-      strlen(_PATH_RSRCFORKSPEC) + 1);
-++   pm_strcpy(rsrc_fname, fname);
-++   pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC);
-+    bopen(bfd, rsrc_fname, flags, mode);
-+    free_pool_memory(rsrc_fname);
-+    return bfd->fid;
-+Index: src/lib/bnet_server.c
-+===================================================================
-+RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v
-+retrieving revision 1.39
-+retrieving revision 1.39.2.1
-+diff -u -r1.39 -r1.39.2.1
-+--- src/lib/bnet_server.c     18 Aug 2005 15:37:40 -0000      1.39
-++++ src/lib/bnet_server.c     22 Nov 2005 10:50:55 -0000      1.39.2.1
-+@@ -16,7 +16,7 @@
-+   * Originally written by Kern Sibbald for inclusion in apcupsd,
-+   *  but heavily modified for Bacula
-+   *
-+-  *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++  *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+   */
-+ 
-+ #include "bacula.h"
-+@@ -153,7 +153,6 @@
-+          /* Error, get out */
-+          foreach_dlist(fd_ptr, &sockfds) {
-+             close(fd_ptr->fd);
-+-            free((void *)fd_ptr);
-+          }
-+          Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror());
-+          break;
-+Index: src/stored/autochanger.c
-+===================================================================
-+RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
-+retrieving revision 1.47.2.3
-+retrieving revision 1.47.2.4
-+diff -u -r1.47.2.3 -r1.47.2.4
-+--- src/stored/autochanger.c  12 Nov 2005 17:30:53 -0000      1.47.2.3
-++++ src/stored/autochanger.c  22 Nov 2005 10:50:55 -0000      1.47.2.4
-+@@ -4,7 +4,7 @@
-+  *
-+  *   Kern Sibbald, August MMII
-+  *                            
-+- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+  */
-+ /*
-+    Copyright (C) 2002-2005 Kern Sibbald
-+@@ -163,6 +163,7 @@
-+             rtn_stat = -1;            /* hard error */
-+          }
-+          Dmsg2(400, "load slot %d status=%d\n", slot, status);
-++         unlock_changer(dcr);
-+       } else {
-+          status = 0;                  /* we got what we want */
-+          dev->Slot = slot;            /* set currently loaded slot */
-+@@ -174,7 +175,6 @@
-+    } else {
-+       rtn_stat = 0;                   /* no changer found */
-+    }
-+-   unlock_changer(dcr);
-+    free_pool_memory(changer);
-+    return rtn_stat;
-+ 
-+Index: src/stored/status.c
-+===================================================================
-+RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v
-+retrieving revision 1.44.2.1
-+retrieving revision 1.44.2.2
-+diff -u -r1.44.2.1 -r1.44.2.2
-+--- src/stored/status.c       6 Oct 2005 07:04:13 -0000       1.44.2.1
-++++ src/stored/status.c       22 Nov 2005 10:50:55 -0000      1.44.2.2
-+@@ -3,7 +3,7 @@
-+  *
-+  *     Kern Sibbald, May MMIII
-+  *
-+- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+  *
-+  */
-+ /*
-+@@ -264,6 +264,7 @@
-+    bool found = false;
-+    int bps, sec;
-+    JCR *jcr;
-++   DCR *dcr;
-+    char JobName[MAX_NAME_LENGTH];
-+    char b1[30], b2[30], b3[30];
-+ 
-+@@ -273,7 +274,8 @@
-+          bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"),
-+             job_type_to_str(jcr->JobType), jcr->Job);
-+       }
-+-      if (jcr->dcr && jcr->dcr->device) {
-++      dcr = jcr->dcr;
-++      if (dcr && dcr->device) {
-+          bstrncpy(JobName, jcr->Job, sizeof(JobName));
-+          /* There are three periods after the Job name */
-+          char *p;
-+@@ -282,13 +284,16 @@
-+                *p = 0;
-+             }
-+          }
-+-         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"),
-++         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n"
-++                            "    pool=\"%s\" device=\"%s\"\n"),
-+                    job_level_to_str(jcr->JobLevel),
-+                    job_type_to_str(jcr->JobType),
-+                    JobName,
-+                    jcr->JobId,
-+-                   jcr->dcr->VolumeName,
-+-                   jcr->dcr->device->device_name);
-++                   dcr->VolumeName,
-++                   dcr->pool_name,
-++                   dcr->dev?dcr->dev->print_name(): 
-++                            dcr->device->device_name);
-+          sec = time(NULL) - jcr->run_time;
-+          if (sec <= 0) {
-+             sec = 1;
-+Index: src/stored/stored_conf.c
-+===================================================================
-+RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v
-+retrieving revision 1.76
-+retrieving revision 1.76.2.1
-+diff -u -r1.76 -r1.76.2.1
-+--- src/stored/stored_conf.c  9 Sep 2005 09:40:04 -0000       1.76
-++++ src/stored/stored_conf.c  22 Nov 2005 10:50:55 -0000      1.76.2.1
-+@@ -3,7 +3,7 @@
-+  *
-+  *     Kern Sibbald, March MM
-+  *
-+- *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++ *   Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+  */
-+ /*
-+    Copyright (C) 2000-2005 Kern Sibbald
-+@@ -222,16 +222,16 @@
-+          res->res_dev.hdr.name,
-+          res->res_dev.media_type, res->res_dev.device_name,
-+          res->res_dev.label_type);
-+-      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d\n",
-++      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n",
-+          res->res_dev.max_rewind_wait, res->res_dev.min_block_size,
-+-         res->res_dev.max_block_size);
-++         res->res_dev.max_block_size, res->res_dev.max_changer_wait);
-+       sendit(sock, "        max_jobs=%d max_files=%" lld " max_size=%" lld "\n",
-+          res->res_dev.max_volume_jobs, res->res_dev.max_volume_files,
-+          res->res_dev.max_volume_size);
-+       sendit(sock, "        max_file_size=%" lld " capacity=%" lld "\n",
-+          res->res_dev.max_file_size, res->res_dev.volume_capacity);
-+-      sendit(sock, "         spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
-+-      sendit(sock, "         max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
-++      sendit(sock, "        spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
-++      sendit(sock, "        max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
-+          res->res_dev.max_spool_size, res->res_dev.max_job_spool_size);
-+       if (res->res_dev.changer_res) {
-+          sendit(sock, "         changer=%p\n", res->res_dev.changer_res);
-+Index: src/tray-monitor/tray-monitor.c
-+===================================================================
-+RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v
-+retrieving revision 1.25.2.1
-+retrieving revision 1.25.2.2
-+diff -u -r1.25.2.1 -r1.25.2.2
-+--- src/tray-monitor/tray-monitor.c   1 Oct 2005 10:20:18 -0000       1.25.2.1
-++++ src/tray-monitor/tray-monitor.c   22 Nov 2005 10:50:55 -0000      1.25.2.2
-+@@ -4,7 +4,7 @@
-+  *
-+  *     Nicolas Boichat, August MMIV
-+  *
-+- *     Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-++ *     Version $Id: 1.38.1-to-1.38.2.patch,v 1.1.2.3 2005/11/22 10:52:49 kerns Exp $
-+  */
-+ 
-+ /*
-+@@ -881,7 +881,7 @@
-+       }
-+ 
-+       if (item->D_sock == NULL) {
-+-         g_slist_append(*list, (void *)_("Cannot connect to daemon.\n"));
-++         g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n")));
-+          changeStatusMessage(item, _("Cannot connect to daemon."));
-+          item->state = error;
-+          item->oldstate = error;
-+Index: updatedb/kes-1.38
-+===================================================================
-+RCS file: updatedb/kes-1.38
-+diff -N updatedb/kes-1.38
-+--- updatedb/kes-1.38 3 Nov 2005 14:54:28 -0000       1.1.2.1
-++++ /dev/null 1 Jan 1970 00:00:00 -0000
-+@@ -1,19 +0,0 @@
-+-              Technical notes on version 1.38  
-+-                        Kern Sibbald
-+-
-+-General:
-+-
-+-Changes to 1.38.0:
-+-- Modify configure.in to add execute option to sqlite3 catalog  
-+-  scripts.
-+-- Create update_xxx_table_8_to_9 scripts for updatedb
-+-- Fix wrong variable in bpipe.c debug output reported by user.
-+-- Fix improper placement of encode_and_send_attributes() in
-+-  FD backup.c causing first file of non-portable Win32 backup
-+-  to have wrong stream. Reported by Thorsten.
-+-- Move the -lcrypt for PostgreSQL after the PostgreSQL libs in
-+-  autoconf/bacula-macros/db.m4 as suggested by user.  Fixes bug #457.
-+-- Remove @STATIC_CONS@ from tray-monitor Makefile as suggested
-+-  by user. Fixes bug #456.
-+-
-+-Released 1.38.0 (28Oct05): 31 October 2005
-Index: patches/patches-1.38.0
-===================================================================
-RCS file: patches/patches-1.38.0
-diff -N patches/patches-1.38.0
-Index: patches/patches-1.38.1
-===================================================================
-RCS file: patches/patches-1.38.1
-diff -N patches/patches-1.38.1
---- /dev/null  1 Jan 1970 00:00:00 -0000
-+++ patches/patches-1.38.1     22 Nov 2005 10:50:55 -0000      1.1.2.2
-@@ -0,0 +1,14 @@
-+20Nov05 1.38.1-to-1.38.2.patch
-+ This patch fixes the following bugs:
-+
-+- Fix crash in tray-monitor when daemon disconnects. Bug #479.
-+- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
-+  says this patch does not fix his problem)
-+- Fix cancel failure bug. Bug #481
-+- Fix failure when Pool name has spaces. Bug #487
-+- Fix SD crash in autochanger code. Mutex failure. Bug #488
-+- Fix a couple of free()s in src/filed/acl.c
-+- Fix memory overrun in bfile.c in building OS X resource
-+  fork filename. Bug #489
-+                         
-+  
-Index: src/version.h
-===================================================================
-RCS file: /cvsroot/bacula/bacula/src/version.h,v
-retrieving revision 1.554.2.14
-retrieving revision 1.554.2.15
-diff -u -r1.554.2.14 -r1.554.2.15
---- src/version.h      14 Nov 2005 14:21:58 -0000      1.554.2.14
-+++ src/version.h      22 Nov 2005 10:50:55 -0000      1.554.2.15
-@@ -1,11 +1,11 @@
- /*
-- *  Version $Id: version.h,v 1.554.2.14 2005/11/14 14:21:58 kerns Exp $
-+ *  Version $Id: version.h,v 1.554.2.15 2005/11/22 10:50:55 kerns Exp $
-  */
- #undef  VERSION
--#define VERSION "1.38.1"
--#define BDATE   "14 November 2005"
--#define LSMDATE "14Nov05"
-+#define VERSION "1.38.2"
-+#define BDATE   "20 November 2005"
-+#define LSMDATE "20Nov05"
- /* Debug flags */
- #undef  DEBUG
-Index: src/dird/catreq.c
-===================================================================
-RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v
-retrieving revision 1.77.2.1
-retrieving revision 1.77.2.2
-diff -u -r1.77.2.1 -r1.77.2.2
---- src/dird/catreq.c  26 Oct 2005 14:02:04 -0000      1.77.2.1
-+++ src/dird/catreq.c  22 Nov 2005 10:50:55 -0000      1.77.2.2
-@@ -10,7 +10,7 @@
-  *  Basic tasks done here:
-  *      Handle Catalog services.
-  *
-- *   Version $Id: catreq.c,v 1.77.2.1 2005/10/26 14:02:04 kerns Exp $
-+ *   Version $Id: catreq.c,v 1.77.2.2 2005/11/22 10:50:55 kerns Exp $
-  */
- /*
-    Copyright (C) 2001-2005 Kern Sibbald
-@@ -117,6 +117,7 @@
-    if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) {
-       memset(&pr, 0, sizeof(pr));
-       bstrncpy(pr.Name, pool_name, sizeof(pr.Name));
-+      unbash_spaces(pr.Name);
-       ok = db_get_pool_record(jcr, jcr->db, &pr);
-       if (ok) {
-          mr.PoolId = pr.PoolId;
-Index: src/dird/ua_restore.c
-===================================================================
-RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v
-retrieving revision 1.101.2.1
-retrieving revision 1.101.2.2
-diff -u -r1.101.2.1 -r1.101.2.2
---- src/dird/ua_restore.c      26 Oct 2005 14:02:04 -0000      1.101.2.1
-+++ src/dird/ua_restore.c      22 Nov 2005 10:50:55 -0000      1.101.2.2
-@@ -10,7 +10,7 @@
-  *
-  *     Kern Sibbald, July MMII
-  *
-- *   Version $Id: ua_restore.c,v 1.101.2.1 2005/10/26 14:02:04 kerns Exp $
-+ *   Version $Id: ua_restore.c,v 1.101.2.2 2005/11/22 10:50:55 kerns Exp $
-  */
- /*
-    Copyright (C) 2002-2005 Kern Sibbald
-@@ -409,7 +409,7 @@
-       }
-       done = true;
-       switch (do_prompt(ua, "", _("Select item: "), NULL, 0)) {
--      case -1:                        /* error */
-+      case -1:                        /* error or cancel */
-          return 0;
-       case 0:                         /* list last 20 Jobs run */
-          gui_save = ua->jcr->gui;
-Index: src/dird/ua_run.c
-===================================================================
-RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v
-retrieving revision 1.71
-retrieving revision 1.71.2.1
-diff -u -r1.71 -r1.71.2.1
---- src/dird/ua_run.c  10 Aug 2005 16:35:19 -0000      1.71
-+++ src/dird/ua_run.c  22 Nov 2005 10:50:55 -0000      1.71.2.1
-@@ -4,7 +4,7 @@
-  *
-  *     Kern Sibbald, December MMI
-  *
-- *   Version $Id: ua_run.c,v 1.71 2005/08/10 16:35:19 nboichat Exp $
-+ *   Version $Id: ua_run.c,v 1.71.2.1 2005/11/22 10:50:55 kerns Exp $
-  */
- /*
-    Copyright (C) 2001-2005 Kern Sibbald
-@@ -851,6 +851,8 @@
-             bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
-          }
-          goto try_again;
-+      case -1:                        /* error or cancel */
-+         goto bail_out;
-       default:
-          goto try_again;
-       }
-Index: src/dird/ua_select.c
-===================================================================
-RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v
-retrieving revision 1.65.2.1
-retrieving revision 1.65.2.2
-diff -u -r1.65.2.1 -r1.65.2.2
---- src/dird/ua_select.c       12 Nov 2005 17:30:52 -0000      1.65.2.1
-+++ src/dird/ua_select.c       22 Nov 2005 10:50:55 -0000      1.65.2.2
-@@ -4,7 +4,7 @@
-  *
-  *     Kern Sibbald, October MMI
-  *
-- *   Version  $Id: ua_select.c,v 1.65.2.1 2005/11/12 17:30:52 kerns Exp $
-+ *   Version  $Id: ua_select.c,v 1.65.2.2 2005/11/22 10:50:55 kerns Exp $
-  */
- /*
-    Copyright (C) 2001-2005 Kern Sibbald
-@@ -149,7 +149,9 @@
-       }
-    }
-    UnlockRes();
--   do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name));
-+   if (do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name)) < 0) {
-+      return NULL;
-+   }
-    store = (STORE *)GetResWithName(R_STORAGE, name);
-    return store;
- }
-@@ -170,7 +172,9 @@
-       }
-    }
-    UnlockRes();
--   do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name));
-+   if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) {
-+      return NULL;
-+   }
-    fs = (FILESET *)GetResWithName(R_FILESET, name);
-    return fs;
- }
-@@ -202,7 +206,9 @@
-          }
-       }
-       UnlockRes();
--      do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name));
-+      if (do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name)) < 0) {
-+         return NULL;
-+      }
-       catalog = (CAT *)GetResWithName(R_CATALOG, name);
-    }
-    return catalog;
-@@ -225,7 +231,9 @@
-       }
-    }
-    UnlockRes();
--   do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name));
-+   if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) {
-+      return NULL;
-+   }
-    job = (JOB *)GetResWithName(R_JOB, name);
-    return job;
- }
-@@ -246,7 +254,9 @@
-       }
-    }
-    UnlockRes();
--   do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name));
-+   if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) {
-+      return NULL;
-+   }
-    job = (JOB *)GetResWithName(R_JOB, name);
-    return job;
- }
-@@ -269,7 +279,9 @@
-       }
-    }
-    UnlockRes();
--   do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name));
-+   if (do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) {
-+      return NULL;
-+   }
-    client = (CLIENT *)GetResWithName(R_CLIENT, name);
-    return client;
- }
-@@ -551,7 +563,9 @@
-       }
-    }
-    UnlockRes();
--   do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name));
-+   if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) {
-+      return NULL;
-+   }
-    pool = (POOL *)GetResWithName(R_POOL, name);
-    return pool;
- }
-@@ -673,12 +687,16 @@
-  *  Returns: -1 on error
-  *            index base 0 on success, and choice
-  *               is copied to prompt if not NULL
-+ *             prompt is set to the chosen prompt item string
-  */
- int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
- {
-    int i, item;
-    char pmsg[MAXSTRING];
-+   if (prompt) {
-+      *prompt = 0;
-+   }
-    if (ua->num_prompts == 2) {
-       item = 1;
-       if (prompt) {
-@@ -698,15 +716,11 @@
-       bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
-    }
--   if (prompt) {
--      *prompt = 0;
--   }
--
-    for ( ;; ) {
-       /* First item is the prompt string, not the items */
-       if (ua->num_prompts == 1) {
-          bsendmsg(ua, _("Selection is empty!\n"));
--         item = 0;                    /* list is empty ! */
-+         item = -1;                    /* list is empty ! */
-          break;
-       }
-       if (ua->num_prompts == 2) {
-@@ -741,7 +755,7 @@
-       free(ua->prompt[i]);
-    }
-    ua->num_prompts = 0;
--   return item - 1;
-+   return item>0 ? item-1 : item;
- }
-Index: src/dird/ua_update.c
-===================================================================
-RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v
-retrieving revision 1.7
-retrieving revision 1.7.2.1
-diff -u -r1.7 -r1.7.2.1
---- src/dird/ua_update.c       28 Aug 2005 12:22:02 -0000      1.7
-+++ src/dird/ua_update.c       22 Nov 2005 10:50:55 -0000      1.7.2.1
-@@ -5,7 +5,7 @@
-  *
-  *     Kern Sibbald, September MM
-  *
-- *   Version $Id: ua_update.c,v 1.7 2005/08/28 12:22:02 kerns Exp $
-+ *   Version $Id: ua_update.c,v 1.7.2.1 2005/11/22 10:50:55 kerns Exp $
-  */
- /*
-    Copyright (C) 2000-2005 Kern Sibbald
-@@ -590,7 +590,7 @@
-          update_all_vols_from_pool(ua);
-          return 1;
-       default:                        /* Done or error */
--         bsendmsg(ua, _("Selection done.\n"));
-+         bsendmsg(ua, _("Selection terminated.\n"));
-          return 1;
-       }
-    }
-Index: src/filed/acl.c
-===================================================================
-RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v
-retrieving revision 1.10.2.1
-retrieving revision 1.10.2.2
-diff -u -r1.10.2.1 -r1.10.2.2
---- src/filed/acl.c    14 Nov 2005 20:20:38 -0000      1.10.2.1
-+++ src/filed/acl.c    22 Nov 2005 10:50:55 -0000      1.10.2.2
-@@ -26,7 +26,7 @@
-  *
-  *   Written by Preben 'Peppe' Guldberg, December MMIV
-  *
-- *   Version $Id: acl.c,v 1.10.2.1 2005/11/14 20:20:38 kerns Exp $
-+ *   Version $Id: acl.c,v 1.10.2.2 2005/11/22 10:50:55 kerns Exp $
-  */
- /*
-    Copyright (C) 2004-2005 Kern Sibbald
-@@ -140,7 +140,7 @@
-    if ((acl_text = acl_get(jcr->last_fname)) != NULL) {
-       len = pm_strcpy(jcr->acl_text, acl_text);
--      free(acl_text);
-+      actuallyfree(acl_text);
-       return len;
-    }
-    return -1;
-@@ -270,7 +270,7 @@
-    if ((n = getacl(jcr->last_fname, n, acls)) > 0) {
-       if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) {
-          len = pm_strcpy(jcr->acl_text, acl_text);
--         free(acl_text);
-+         actuallyfree(acl_text);
-          return len;
-       }
-    }
-Index: src/findlib/bfile.c
-===================================================================
-RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v
-retrieving revision 1.40
-retrieving revision 1.40.2.1
-diff -u -r1.40 -r1.40.2.1
---- src/findlib/bfile.c        10 Aug 2005 16:35:19 -0000      1.40
-+++ src/findlib/bfile.c        22 Nov 2005 10:50:55 -0000      1.40.2.1
-@@ -5,7 +5,7 @@
-  *
-  *    Kern Sibbald, April MMIII
-  *
-- *   Version $Id: bfile.c,v 1.40 2005/08/10 16:35:19 nboichat Exp $
-+ *   Version $Id: bfile.c,v 1.40.2.1 2005/11/22 10:50:55 kerns Exp $
-  *
-  */
- /*
-@@ -623,13 +623,10 @@
- int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
- {
-    POOLMEM *rsrc_fname;
--   size_t fname_len;
--   fname_len = strlen(fname);
-    rsrc_fname = get_pool_memory(PM_FNAME);
--   bstrncpy(rsrc_fname, fname, fname_len + 1);
--   bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC,
--      strlen(_PATH_RSRCFORKSPEC) + 1);
-+   pm_strcpy(rsrc_fname, fname);
-+   pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC);
-    bopen(bfd, rsrc_fname, flags, mode);
-    free_pool_memory(rsrc_fname);
-    return bfd->fid;
-Index: src/lib/bnet_server.c
-===================================================================
-RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v
-retrieving revision 1.39
-retrieving revision 1.39.2.1
-diff -u -r1.39 -r1.39.2.1
---- src/lib/bnet_server.c      18 Aug 2005 15:37:40 -0000      1.39
-+++ src/lib/bnet_server.c      22 Nov 2005 10:50:55 -0000      1.39.2.1
-@@ -16,7 +16,7 @@
-   * Originally written by Kern Sibbald for inclusion in apcupsd,
-   *  but heavily modified for Bacula
-   *
--  *   Version $Id: bnet_server.c,v 1.39 2005/08/18 15:37:40 kerns Exp $
-+  *   Version $Id: bnet_server.c,v 1.39.2.1 2005/11/22 10:50:55 kerns Exp $
-   */
- #include "bacula.h"
-@@ -153,7 +153,6 @@
-          /* Error, get out */
-          foreach_dlist(fd_ptr, &sockfds) {
-             close(fd_ptr->fd);
--            free((void *)fd_ptr);
-          }
-          Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror());
-          break;
-Index: src/stored/autochanger.c
-===================================================================
-RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
-retrieving revision 1.47.2.3
-retrieving revision 1.47.2.4
-diff -u -r1.47.2.3 -r1.47.2.4
---- src/stored/autochanger.c   12 Nov 2005 17:30:53 -0000      1.47.2.3
-+++ src/stored/autochanger.c   22 Nov 2005 10:50:55 -0000      1.47.2.4
-@@ -4,7 +4,7 @@
-  *
-  *   Kern Sibbald, August MMII
-  *                            
-- *   Version $Id: autochanger.c,v 1.47.2.3 2005/11/12 17:30:53 kerns Exp $
-+ *   Version $Id: autochanger.c,v 1.47.2.4 2005/11/22 10:50:55 kerns Exp $
-  */
- /*
-    Copyright (C) 2002-2005 Kern Sibbald
-@@ -163,6 +163,7 @@
-             rtn_stat = -1;            /* hard error */
-          }
-          Dmsg2(400, "load slot %d status=%d\n", slot, status);
-+         unlock_changer(dcr);
-       } else {
-          status = 0;                  /* we got what we want */
-          dev->Slot = slot;            /* set currently loaded slot */
-@@ -174,7 +175,6 @@
-    } else {
-       rtn_stat = 0;                   /* no changer found */
-    }
--   unlock_changer(dcr);
-    free_pool_memory(changer);
-    return rtn_stat;
-Index: src/stored/status.c
-===================================================================
-RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v
-retrieving revision 1.44.2.1
-retrieving revision 1.44.2.2
-diff -u -r1.44.2.1 -r1.44.2.2
---- src/stored/status.c        6 Oct 2005 07:04:13 -0000       1.44.2.1
-+++ src/stored/status.c        22 Nov 2005 10:50:55 -0000      1.44.2.2
-@@ -3,7 +3,7 @@
-  *
-  *     Kern Sibbald, May MMIII
-  *
-- *   Version $Id: status.c,v 1.44.2.1 2005/10/06 07:04:13 kerns Exp $
-+ *   Version $Id: status.c,v 1.44.2.2 2005/11/22 10:50:55 kerns Exp $
-  *
-  */
- /*
-@@ -264,6 +264,7 @@
-    bool found = false;
-    int bps, sec;
-    JCR *jcr;
-+   DCR *dcr;
-    char JobName[MAX_NAME_LENGTH];
-    char b1[30], b2[30], b3[30];
-@@ -273,7 +274,8 @@
-          bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"),
-             job_type_to_str(jcr->JobType), jcr->Job);
-       }
--      if (jcr->dcr && jcr->dcr->device) {
-+      dcr = jcr->dcr;
-+      if (dcr && dcr->device) {
-          bstrncpy(JobName, jcr->Job, sizeof(JobName));
-          /* There are three periods after the Job name */
-          char *p;
-@@ -282,13 +284,16 @@
-                *p = 0;
-             }
-          }
--         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"),
-+         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n"
-+                            "    pool=\"%s\" device=\"%s\"\n"),
-                    job_level_to_str(jcr->JobLevel),
-                    job_type_to_str(jcr->JobType),
-                    JobName,
-                    jcr->JobId,
--                   jcr->dcr->VolumeName,
--                   jcr->dcr->device->device_name);
-+                   dcr->VolumeName,
-+                   dcr->pool_name,
-+                   dcr->dev?dcr->dev->print_name(): 
-+                            dcr->device->device_name);
-          sec = time(NULL) - jcr->run_time;
-          if (sec <= 0) {
-             sec = 1;
-Index: src/stored/stored_conf.c
-===================================================================
-RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v
-retrieving revision 1.76
-retrieving revision 1.76.2.1
-diff -u -r1.76 -r1.76.2.1
---- src/stored/stored_conf.c   9 Sep 2005 09:40:04 -0000       1.76
-+++ src/stored/stored_conf.c   22 Nov 2005 10:50:55 -0000      1.76.2.1
-@@ -3,7 +3,7 @@
-  *
-  *     Kern Sibbald, March MM
-  *
-- *   Version $Id: stored_conf.c,v 1.76 2005/09/09 09:40:04 kerns Exp $
-+ *   Version $Id: stored_conf.c,v 1.76.2.1 2005/11/22 10:50:55 kerns Exp $
-  */
- /*
-    Copyright (C) 2000-2005 Kern Sibbald
-@@ -222,16 +222,16 @@
-          res->res_dev.hdr.name,
-          res->res_dev.media_type, res->res_dev.device_name,
-          res->res_dev.label_type);
--      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d\n",
-+      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n",
-          res->res_dev.max_rewind_wait, res->res_dev.min_block_size,
--         res->res_dev.max_block_size);
-+         res->res_dev.max_block_size, res->res_dev.max_changer_wait);
-       sendit(sock, "        max_jobs=%d max_files=%" lld " max_size=%" lld "\n",
-          res->res_dev.max_volume_jobs, res->res_dev.max_volume_files,
-          res->res_dev.max_volume_size);
-       sendit(sock, "        max_file_size=%" lld " capacity=%" lld "\n",
-          res->res_dev.max_file_size, res->res_dev.volume_capacity);
--      sendit(sock, "         spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
--      sendit(sock, "         max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
-+      sendit(sock, "        spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
-+      sendit(sock, "        max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
-          res->res_dev.max_spool_size, res->res_dev.max_job_spool_size);
-       if (res->res_dev.changer_res) {
-          sendit(sock, "         changer=%p\n", res->res_dev.changer_res);
-Index: src/tray-monitor/tray-monitor.c
-===================================================================
-RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v
-retrieving revision 1.25.2.1
-retrieving revision 1.25.2.2
-diff -u -r1.25.2.1 -r1.25.2.2
---- src/tray-monitor/tray-monitor.c    1 Oct 2005 10:20:18 -0000       1.25.2.1
-+++ src/tray-monitor/tray-monitor.c    22 Nov 2005 10:50:55 -0000      1.25.2.2
-@@ -4,7 +4,7 @@
-  *
-  *     Nicolas Boichat, August MMIV
-  *
-- *     Version $Id: tray-monitor.c,v 1.25.2.1 2005/10/01 10:20:18 kerns Exp $
-+ *     Version $Id: tray-monitor.c,v 1.25.2.2 2005/11/22 10:50:55 kerns Exp $
-  */
- /*
-@@ -881,7 +881,7 @@
-       }
-       if (item->D_sock == NULL) {
--         g_slist_append(*list, (void *)_("Cannot connect to daemon.\n"));
-+         g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n")));
-          changeStatusMessage(item, _("Cannot connect to daemon."));
-          item->state = error;
-          item->oldstate = error;
-Index: updatedb/kes-1.38
-===================================================================
-RCS file: updatedb/kes-1.38
-diff -N updatedb/kes-1.38
---- updatedb/kes-1.38  3 Nov 2005 14:54:28 -0000       1.1.2.1
-+++ /dev/null  1 Jan 1970 00:00:00 -0000
-@@ -1,19 +0,0 @@
--              Technical notes on version 1.38  
--                        Kern Sibbald
--
--General:
--
--Changes to 1.38.0:
--- Modify configure.in to add execute option to sqlite3 catalog  
--  scripts.
--- Create update_xxx_table_8_to_9 scripts for updatedb
--- Fix wrong variable in bpipe.c debug output reported by user.
--- Fix improper placement of encode_and_send_attributes() in
--  FD backup.c causing first file of non-portable Win32 backup
--  to have wrong stream. Reported by Thorsten.
--- Move the -lcrypt for PostgreSQL after the PostgreSQL libs in
--  autoconf/bacula-macros/db.m4 as suggested by user.  Fixes bug #457.
--- Remove @STATIC_CONS@ from tray-monitor Makefile as suggested
--  by user. Fixes bug #456.
--
--Released 1.38.0 (28Oct05): 31 October 2005
diff --git a/bacula/patches/1.38.10-dvd-eof.patch b/bacula/patches/1.38.10-dvd-eof.patch
deleted file mode 100644 (file)
index 26cb3a7..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-Index: src/stored/block.c
-===================================================================
-RCS file: /cvsroot/bacula/bacula/src/stored/block.c,v
-retrieving revision 1.116.2.3
-diff -u -u -b -r1.116.2.3 block.c
---- src/stored/block.c 24 Mar 2006 16:35:23 -0000      1.116.2.3
-+++ src/stored/block.c 12 Jun 2006 16:19:27 -0000
-@@ -9,7 +9,7 @@
-  *
-  */
- /*
--   Copyright (C) 2001-2005 Kern Sibbald
-+   Copyright (C) 2001-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
-@@ -910,13 +910,12 @@
-    Dmsg3(100, "Tests : %d %d %d\n", (dev->VolCatInfo.VolCatParts > 0), 
-          ((dev->file_addr-dev->part_start) == dev->part_size), 
-          (dev->part <= dev->VolCatInfo.VolCatParts));*/
--   /* Check for part file end */
--   if ((dev->num_parts > 0) &&
--        ((dev->file_addr-dev->part_start) == dev->part_size) && 
--        (dev->part < dev->num_parts)) {
-+   /* Check for DVD part file end */
-+   if (dev->at_eof() && dev->is_dvd() && dev->num_parts > 0 &&
-+        dev->part < dev->num_parts) {
-       if (dvd_open_next_part(dcr) < 0) {
--         Jmsg2(dcr->jcr, M_FATAL, 0, _("Unable to open device next part %s: ERR=%s\n"),
--               dev->print_name(), strerror_dev(dev));
-+         Jmsg3(dcr->jcr, M_FATAL, 0, _("Unable to open device part=%d %s: ERR=%s\n"),
-+               dev->part, dev->print_name(), strerror_dev(dev));
-          dev->dev_errno = EIO;
-          return false;
-       }
diff --git a/bacula/patches/1.38.10-scheduler.patch b/bacula/patches/1.38.10-scheduler.patch
deleted file mode 100644 (file)
index 292c4d6..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-
- This patch should correct the FreeBSD mutex crash that happens in
- the Director after a sudden clock shift or after the "reload" command.
- Apply it to 1.38.10 (will not work with prior version) with:
-
-  cd <bacula-source>
-  patch -p0 <1.38.10-scheduler.patch
-  make
-  make install
-  ...
-
-
-
-Index: src/dird/scheduler.c
-===================================================================
-RCS file: /cvsroot/bacula/bacula/src/dird/scheduler.c,v
-retrieving revision 1.33.2.2
-diff -u -r1.33.2.2 scheduler.c
---- src/dird/scheduler.c       4 Jun 2006 12:24:39 -0000       1.33.2.2
-+++ src/dird/scheduler.c       24 Jun 2006 17:25:58 -0000
-@@ -151,6 +151,7 @@
-               free(next_job);
-           }
-           schedules_invalidated = false;
-+          unlock_jobs();
-           goto again;
-       }
-       unlock_jobs();
diff --git a/bacula/patches/1.38.6-script.patch b/bacula/patches/1.38.6-script.patch
deleted file mode 100644 (file)
index 7bce5fd..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-
- This patch fixes a bug in the bacula start/stop script where
- the binary directory is used rather than the scripts directory.
- Apply the patch to version 1.38.6 with:
-
- cd <bacula-source>
- patch -p0 <1.38.6-script.patch
- make Makefiles
- make install
- ...
-
-Index: scripts/bacula.in
-===================================================================
-RCS file: /cvsroot/bacula/bacula/scripts/bacula.in,v
-retrieving revision 1.13.2.3
-diff -u -r1.13.2.3 bacula.in
---- scripts/bacula.in  28 Mar 2006 16:42:19 -0000      1.13.2.3
-+++ scripts/bacula.in  29 Mar 2006 16:24:51 -0000
-@@ -13,25 +13,22 @@
- #  easier to "steal" this code for the development 
- #  environment where they are different.
- #  
--BACFDBIN=@sbindir@
- BACFDCFG=@sysconfdir@
--BACSDBIN=@sbindir@
- BACSDCFG=@sysconfdir@
--BACDIRBIN=@sbindir@
- BACDIRCFG=@sysconfdir@
- case "$1" in
-    start)
--      [ -x ${BACSDBIN}/bacula-ctl-sd ] && ${BACSDBIN}/bacula-ctl-sd $1 $2
--      [ -x ${BACFDBIN}/bacula-ctl-fd ] && ${BACFDBIN}/bacula-ctl-fd $1 $2
--      [ -x ${BACDIRBIN}/bacula-ctl-dir ] && ${BACDIRBIN}/bacula-ctl-dir $1 $2
-+      [ -x ${BACSDCFG}/bacula-ctl-sd ] && ${BACSDCFG}/bacula-ctl-sd $1 $2
-+      [ -x ${BACFDCFG}/bacula-ctl-fd ] && ${BACFDCFG}/bacula-ctl-fd $1 $2
-+      [ -x ${BACDIRCFG}/bacula-ctl-dir ] && ${BACDIRCFG}/bacula-ctl-dir $1 $2
-       ;;
-    stop)
-       # Stop the FD first so that SD will fail jobs and update catalog
--      [ -x ${BACFDBIN}/bacula-ctl-fd ] && ${BACFDBIN}/bacula-ctl-fd $1 $2
--      [ -x ${BACSDBIN}/bacula-ctl-sd ] && ${BACSDBIN}/bacula-ctl-sd $1 $2
--      [ -x ${BACDIRBIN}/bacula-ctl-dir ] && ${BACDIRBIN}/bacula-ctl-dir $1 $2
-+      [ -x ${BACFDCFG}/bacula-ctl-fd ] && ${BACFDCFG}/bacula-ctl-fd $1 $2
-+      [ -x ${BACSDCFG}/bacula-ctl-sd ] && ${BACSDCFG}/bacula-ctl-sd $1 $2
-+      [ -x ${BACDIRCFG}/bacula-ctl-dir ] && ${BACDIRCFG}/bacula-ctl-dir $1 $2
-       echo
-       sleep 6
-       ;;
-@@ -42,9 +39,9 @@
-       ;;
-    status)
--      [ -x ${BACSDBIN}/bacula-ctl-sd ] && ${BACSDBIN}/bacula-ctl-sd status
--      [ -x ${BACFDBIN}/bacula-ctl-fd ] && ${BACFDBIN}/bacula-ctl-fd status
--      [ -x ${BACDIRBIN}/bacula-ctl-dir ] && ${BACDIRBIN}/bacula-ctl-dir status
-+      [ -x ${BACSDCFG}/bacula-ctl-sd ] && ${BACSDCFG}/bacula-ctl-sd status
-+      [ -x ${BACFDCFG}/bacula-ctl-fd ] && ${BACFDCFG}/bacula-ctl-fd status
-+      [ -x ${BACDIRCFG}/bacula-ctl-dir ] && ${BACDIRCFG}/bacula-ctl-dir status
-       ;;
-    *)
diff --git a/bacula/patches/1.38.7-mysql.patch b/bacula/patches/1.38.7-mysql.patch
deleted file mode 100644 (file)
index 43e18a1..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-
-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);
diff --git a/bacula/patches/1.38.x/1.38.1-to-1.38.2.patch b/bacula/patches/1.38.x/1.38.1-to-1.38.2.patch
new file mode 100644 (file)
index 0000000..be37702
--- /dev/null
@@ -0,0 +1,8098 @@
+
+ This patch fixes the following bugs:
+
+- Fix crash in tray-monitor when daemon disconnects. Bug #479.
+- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
+  says that this patch does not fix his problem)
+- Fix cancel failure bug. Bug #481
+- Fix failure when Pool name has spaces. Bug #487
+- Fix SD crash in autochanger code. Mutex failure. Bug #488
+- Fix a couple of free()s in src/filed/acl.c
+- Fix memory overrun in bfile.c in building OS X resource
+  fork filename. Bug #489
+- Add Pool name to SD status output.
+- Add Python install dir for Solaris to configure. Bug #492
+
+This patch is applied to Bacula source version 1.38.1 and will
+produce Bacula source version 1.38.2.  Apply it with:
+
+   cd <bacula-1.38.1-source>
+   ./configure (your options) if not already done
+   patch -p0 <1.38.1-to-1.38.2.patch
+   make
+   make install
+
+Index: ChangeLog
+===================================================================
+RCS file: /cvsroot/bacula/bacula/ChangeLog,v
+retrieving revision 1.154.2.7
+retrieving revision 1.154.2.8
+diff -u -r1.154.2.7 -r1.154.2.8
+--- ChangeLog  15 Nov 2005 09:27:19 -0000      1.154.2.7
++++ ChangeLog  22 Nov 2005 10:50:54 -0000      1.154.2.8
+@@ -1,4 +1,15 @@
++Changes to 1.38.2:
++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
++- Fix bnet-server bug found on OpenBSD. Bug #486
++- Fix cancel failure bug. Bug #481
++- Fix failure when Pool name has spaces. Bug #487   
++- Fix SD crash in autochanger code. Mutex failure. Bug #488
++- Fix a couple of free()s in src/filed/acl.c
++- Fix memory overrun in bfile.c in building OS X resource
++  fork filename. Bug #489 
++- Add Pool name to SD status output.
++- Add Python install dir for Solaris to configure. Bug #492
+ Changes to 1.38.1:
+ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
+Index: ReleaseNotes
+===================================================================
+RCS file: /cvsroot/bacula/bacula/ReleaseNotes,v
+retrieving revision 1.147.2.9
+retrieving revision 1.147.2.10
+diff -u -r1.147.2.9 -r1.147.2.10
+--- ReleaseNotes       15 Nov 2005 09:27:19 -0000      1.147.2.9
++++ ReleaseNotes       22 Nov 2005 10:50:54 -0000      1.147.2.10
+@@ -1,10 +1,22 @@
+-          Release Notes for Bacula 1.38.1
++          Release Notes for Bacula 1.38.2
+   Bacula code: Total files = 420 Total lines = 138,440 (*.h *.c *.in)
+       20,440 additional lines of code since version 1.36.3
+-Changes since 1.38.0:
++Changes to 1.38.2:
++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
++- Fix bnet-server bug found on OpenBSD. Bug #486
++- Fix cancel failure bug. Bug #481
++- Fix failure when Pool name has spaces. Bug #487   
++- Fix SD crash in autochanger code. Mutex failure. Bug #488
++- Fix a couple of free()s in src/filed/acl.c
++- Fix memory overrun in bfile.c in building OS X resource
++  fork filename. Bug #489 
++- Add Pool name to SD status output.
++- Add Python install dir for Solaris to configure. Bug #492
++
++Changes to 1.38.1:
+ - Corrected ACL for Solaris (David Duchscher and Attila Fulop).
+ - Add bacula_mail_summary.sh to examples directory. It makes
+   a single email summary of any number of jobs. Submitted
+Index: configure
+===================================================================
+RCS file: /cvsroot/bacula/bacula/configure,v
+retrieving revision 1.203.2.5
+retrieving revision 1.203.2.6
+diff -u -r1.203.2.5 -r1.203.2.6
+--- configure  13 Nov 2005 10:51:17 -0000      1.203.2.5
++++ configure  22 Nov 2005 10:50:54 -0000      1.203.2.6
+@@ -14948,7 +14948,7 @@
+   PYTHON_LIBS=
+   if test "$withval" != "no"; then
+      if test "$withval" = "yes"; then
+-      for python_root in /usr /usr/local; do
++      for python_root in /usr /usr/local /usr/sfw; do
+         if test -f $python_root/include/python2.2/Python.h; then
+            PYTHON_INCDIR=-I$python_root/include/python2.2
+            PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
+Index: kernstodo
+===================================================================
+RCS file: /cvsroot/bacula/bacula/kernstodo,v
+retrieving revision 1.570.2.6
+retrieving revision 1.570.2.7
+diff -u -r1.570.2.6 -r1.570.2.7
+--- kernstodo  4 Nov 2005 09:16:49 -0000       1.570.2.6
++++ kernstodo  22 Nov 2005 10:50:55 -0000      1.570.2.7
+@@ -1,5 +1,5 @@
+                     Kern's ToDo List
+-                     03 November 2005
++                     21 November 2005
+ Major development:      
+ Project                     Developer
+@@ -7,8 +7,6 @@
+ Version 1.37                Kern (see below)
+ ========================================================
+-Final items for 1.37 before release:
+-
+ Document:
+ - Does ClientRunAfterJob fail the job on a bad return code?
+ - Document cleaning up the spool files:
+@@ -18,6 +16,8 @@
+ - Does WildFile match against full name?  Doc.
+ For 1.39:
++- Make sure that all do_prompt() calls in Dir check for
++  -1 (error) and -2 (cancel) returns.
+ - Look at -D_FORTIFY_SOURCE=2
+ - Add Win32 FileSet definition somewhere
+ - Look at fixing restore status stats in SD.
+@@ -27,6 +27,12 @@
+   encountered, read many times (as it currently does), and if the
+   block cannot be read, skip to the next block, and try again.  If
+   that fails, skip to the next file and try again, ...
++- Add level table:
++  create table LevelType (LevelType binary(1), LevelTypeLong tinyblob);
++  insert into LevelType (LevelType,LevelTypeLong) values
++  ("F","Full"),
++  ("D","Diff"),
++  ("I","Inc");
+ - Add ACL to restore only to original location.
+ - Add a recursive mark command (rmark) to restore.
+ - "Minimum Job Interval = nnn" sets minimum interval between Jobs
+@@ -1246,219 +1252,4 @@
+ ====
+-=== Done
+-- Save mount point for directories not traversed with onefs=yes.
+-- Add seconds to start and end times in the Job report output.
+-- if 2 concurrent backups are attempted on the same tape
+-  drive (autoloader) into different tape pools, one of them will exit
+-  fatally instead of halting until the drive is idle
+-- Update StartTime if job held in Job Queue.
+-- Look at www.nu2.nu/pebuilder as a helper for full windows
+-  bare metal restore. (done by Scott)
+-- Fix orphanned buffers:
+-   Orphaned buffer:      24 bytes allocated at line 808 of rufus-dir job.c
+-   Orphaned buffer:      40 bytes allocated at line 45 of rufus-dir alist.c
+-- Implement Preben's suggestion to add
+-  File System Types = ext2, ext3 
+-  to FileSets, thus simplifying backup of *all* local partitions.
+-- Try to open a device on each Job if it was not opened
+-  when the SD started.
+-- Add dump of VolSessionId/Time and FileIndex with bls.
+-- If Bacula does not find the right tape in the Autochanger,
+-  then mark the tape in error and move on rather than asking
+-  for operator intervention.
+-- Cancel command should include JobId in list of Jobs.
+-- Add performance testing hooks
+-- Bootstrap from JobMedia records.
+-- Implement WildFile and WildDir to solve problem of 
+-  saving only *.doc files.
+-- Fix
+-   Please use the "label"  command to create a new Volume for:
+-       Storage:      DDS-4-changer
+-       Media type:   
+-       Pool:         Default
+-   label
+-   The defined Storage resources are:
+-- Copy Changer Device and Changer Command from Autochanger
+-  to Device resource in SD if none given in Device resource.
+-- 1. Automatic use of more than one drive in an autochanger (done)
+-- 2. Automatic selection of the correct drive for each Job (i.e.
+-     selects a drive with an appropriate Volume for the Job) (done)
+-- 6. Allow multiple simultaneous Jobs referencing the same pool write
+-    to several tapes (some new directive(s) are are probably needed for
+-    this) (done)
+-- Locking (done)
+-- Key on Storage rather than Pool (done)
+-- Allow multiple drives to use same Pool (change jobq.c DIR) (done).
+-- Synchronize multiple drives so that not more
+-  than one loads a tape and any time (done)
+-- 4. Use Changer Device and Changer Command specified in the
+-     Autochanger resource, if none is found in the Device resource.
+-    You can continue to specify them in the Device resource if you want
+-    or need them to be different for each device.
+-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") 
+-    that can allow a Device be part of an Autochanger, and hence the changer
+-    script protected, but if set to no, will prevent the Device from being 
+-    automatically selected from the changer. This allows the device to
+-    be directly accessed through its Device name, but not through the
+-    AutoChanger name.
+-#6   Select one from among Multiple Storage Devices for Job
+-#5   Events that call a Python program 
+-     (Implemented in Dir/SD)
+-- Make sure the Device name is in the Query packet returned.
+-- Don't start a second file job if one is already running.
+-- Implement EOF/EOV labels for ANSI labels
+-- Implement IBM labels.
+-- When Python creates a new label, the tape is immediately
+-  recycled and no label created. This happens when using   
+-  autolabeling -- even when Python doesn't generate the name.
+-- Scratch Pool where the volumes can be re-assigned to any Pool.
+-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) 
+-  is busy reading. Job 6 canceled.
+-- Remove separate thread for opening devices in SD.  On the other
+-  hand, don't block waiting for open() for devices.
+-- Fix code to either handle updating NumVol or to calculate it in
+-  Dir next_vol.c
+-- Ensure that you cannot exclude a directory or a file explicitly
+-  Included with File.
+-#4   Embedded Python Scripting 
+-     (Implemented in Dir/SD/FD)
+-- Add Python writable variable for changing the Priority,
+-    Client, Storage, JobStatus (error), ...
+-- SD Python
+-  - Solicit Events
+-- Add disk seeking on restore; turn off seek on tapes.
+-  stored/match_bsr.c
+-- Look at dird_conf.c:1000: warning: `int size' 
+-  might be used uninitialized in this function
+-- Indicate when a Job is purged/pruned during restore.
+-- Implement some way to turn off automatic pruning in Jobs.
+-- Implement a way an Admin Job can prune, possibly multiple
+-  clients -- Python script?
+-- Look at Preben's acl.c error handling code.
+-- SD crashes after a tape restore then doing a backup. 
+-- If drive is opened read/write, close it and re-open
+-  read-only if doing a restore, and vice-versa.
+-- Windows restore:
+-  data-fd: RestoreFiles.2004-12-07_15.56.42 Error:
+-  > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der
+-  > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen
+-  > Prozess verwendet wird.
+-  Restore restores all files, but then fails at the end trying
+-  to set the attributes of e:
+-  from failed jobs.- Resolve the problem between Device name and Archive name,
+-  and fix SD messages.
+-- Tell the "restore" user when browsing is no longer possible.
+-- Add a restore directory-x
+-- Write non-optimized bsrs from the JobMedia and Media records,
+-  even after Files are pruned.
+-- Delete Stripe and Copy from VolParams to save space.
+-- Fix option 2 of restore -- list where file is backed up -- require Client,
+-  then list last 20 backups.
+-- Finish implementation of passing all Storage and Device needs to
+-  the SD.
+-- Move test for max wait time exceeded in job.c up -- Peter's idea.
+-##   Consider moving docs to their own project.
+-##   Move rescue to its own project.
+-- Add client version to the Client name line that prints in
+-  the Job report.
+-- Fix the Rescue CDROM.
+-- By the way: on page http://www.bacula.org/?page=tapedrives , at the 
+-  bottom, the link to "Tape Testing Chapter" is broken. It goes to 
+-  /html-manual/... while the others point to /rel-manual/...
+-- Device resource needs the "name" of the SD.
+-- Specify a single directory to restore.
+-- Implement MediaType keyword in bsr?   
+-- Add a date and time stamp at the beginning of every line in the 
+-  Job report (Volker Sauer).
+-- Add level to estimate command.
+-- Add "limit=n" for "list jobs"
+-- Make bootstrap filename unique.
+-- Make Dmsg look at global before calling subroutine.
+-- From Chris Hull:
+-   it seems to be complaining about 12:00pm which should be a valid 12
+-   hour time.  I changed the time to 11:59am and everything works fine.
+-   Also 12:00am works fine.  0:00pm also works (which I don't think
+-   should).  None of the values 12:00pm - 12:59pm work for that matter.
+-- Require restore via the restore command or make a restore Job
+-  get the bootstrap file.
+-- Implement Maximum Job Spool Size
+-- Fix 3993 error in SD. It forgets to look at autochanger
+-  resource for device command, ...
+-- 3. Prevent two drives requesting the same Volume in any given
+-     autochanger, by checking if a Volume is mounted on another drive
+-     in an Autochanger.
+-- Upgrade to MySQL 4.1.12 See:  
+-  http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html
+-- Add # Job Level date to bsr file
+-- Implement "PreferMountedVolumes = yes|no" in Job resource.
+-##   Integrate web-bacula into a new Bacula project with
+-     bimagemgr.
+-- Cleaning tapes should have Status "Cleaning" rather than append.
+-- Make sure that Python has access to Client address/port so that
+-  it can check if Clients are alive.
+-- Review all items in "restore".
+-- Fix PostgreSQL GROUP BY problems in restore.
+-- Fix PostgreSQL sql problems in bugs.
+-- After rename
+-  04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume 
+-     "DLT-13Feb04".
+-  Current Volume "DLT-04Jul05" not acceptable because:
+-  1997 Volume "DLT-13Feb04" not in catalog.
+-  04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device 
+-     "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02
+-##   Create a new GUI chapter explaining all the GUI programs.
+--    Make "update slots" when pointing to Autochanger, remove
+-     all Volumes from other drives.  "update slots all-drives"?
+-     No, this is done by modifying mtx-changer to list what is
+-     in the drives.
+-- Finish TLS implementation.
+-- Port limiting -m in iptables to prevent DoS attacks
+-  could cause broken pipes on Bacula.
+-6. Build and test the Volume Shadow Copy (VSS) for Win32. 
+--  Allow cancel of unknown Job
+--  State not saved when closing Win32 FD by icon
+--  bsr-opt-test fails. bsr deleted. Fix.
+--  Move Python daemon variables from Job to Bacula object.
+-   WorkingDir, ConfigFile
+-- Document that Bootstrap files can be written with cataloging
+-  turned off.
+-- Document details of ANSI/IBM labels
+-- OS linux 2.4
+-  1) ADIC, DLT, FastStor 4000, 7*20GB
+-- Linux Sony LIB-D81, AIT-3 library works.
+-- Doc the following
+-  to activate, check or disable the hardware compression feature on my 
+-  exb-8900 i use the exabyte "MammothTool" you can get it here:
+-  http://www.exabyte.com/support/online/downloads/index.cfm
+-  There is a solaris version of this tool. With option -C 0 or 1 you can 
+-  disable or activate compression. Start this tool without any options for 
+-  a small reference.
+-- Document Heartbeat Interval in the dealing with firewalls section.
+-- Document new CDROM directory.
+-- On Win32 working directory must have drive letter ????
+-- On Win32 working directory must be writable by SYSTEM to
+-  do restores.
+-- Document that ChangerDevice is used for Alert command.
+-- Add better documentation on how restores can be done
+-8. Take one more try at making DVD writing work (no go)
+-7. Write a bacula-web document
+-- Why isn't the DEVICE structure defined when doing
+-  a reservation?
+-- Multi-drive changer seems to only use drive 0
+-  Multiple drives don't seem to be opened.
+-- My database is growing
+-- Call GetLastError() in the berrno constructor rather
+-  than delaying until strerror.
+-- Tape xxx in drive 0, requested in drive 1
+-- The mount command does not work with drives other than 0.
+-- A mount should cause the SD to re-examine what Slot is   
+-  loaded.
+-- The SD locks on to the first available drive then
+-  wants a Volume that is released but in another drive --
+-  chaos.
+-- Run the regression scripts on Solaris and FreeBSD
+--  Figure out how to package gui, and rescue programs.
+-- Add a .dir command to restore tree code to eliminate the problem
+-- Mount after manually unloading changer causes hang in SD
+-- Fix JobACL with restore by JobId.
++=== Done -- see kernsdone
+Index: kes-1.38
+===================================================================
+RCS file: /cvsroot/bacula/bacula/kes-1.38,v
+retrieving revision 1.1.2.13
+retrieving revision 1.1.2.14
+diff -u -r1.1.2.13 -r1.1.2.14
+--- kes-1.38   14 Nov 2005 20:20:38 -0000      1.1.2.13
++++ kes-1.38   22 Nov 2005 10:50:55 -0000      1.1.2.14
+@@ -3,6 +3,20 @@
+ General:
++Changes to 1.38.2:
++20Oct05
++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
++  says this does not fix *his* bug).
++- Fix cancel failure bug. Bug #481
++- Fix failure when Pool name has spaces. Bug #487   
++- Fix SD crash in autochanger code. Mutex failure. Bug #488
++- Fix a couple of free()s in src/filed/acl.c
++- Fix memory overrun in bfile.c in building OS X resource
++  fork filename. Bug #489 
++- Add Pool name to SD status output.
++- Add Python install dir for Solaris to configure. Bug #492
++
+ Changes to 1.38.1:
+ 14Oct05
+ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
+Index: projects
+===================================================================
+RCS file: /cvsroot/bacula/bacula/projects,v
+retrieving revision 1.12.2.3
+retrieving revision 1.12.2.4
+diff -u -r1.12.2.3 -r1.12.2.4
+--- projects   10 Nov 2005 20:25:27 -0000      1.12.2.3
++++ projects   22 Nov 2005 10:50:55 -0000      1.12.2.4
+@@ -228,7 +228,175 @@
+   Why:    Performance enhancement.
++Item 13:  Let Bacula log tape usage and handle drive cleaning cycles.
++  Date:   November 11, 2005
++  Origin: Arno Lehmann <al at its-lehmann dot de>
++  Status:
++
++  What:   Make Bacula manage tape life cycle information and drive 
++          cleaning cycles.
++
++  Why:    Both parts of this project are important when operating backups.
++          We need to know which tapes need replacement, and we need to
++          make sure the drives are cleaned when necessary.  While many
++          tape libraries and even autoloaders can handle all this
++          automatically, support by Bacula can be helpful for smaller
++          (older) libraries and single drives.  Also, checking drive
++          status during operation can prevent some failures (as I had to
++          learn the hard way...)
++
++  Notes:  First, Bacula could (and even does, to some limited extent)
++          record tape and drive usage.  For tapes, the number of mounts,
++          the amount of data, and the time the tape has actually been
++          running could be recorded.  Data fields for Read and Write time
++          and Nmber of mounts already exist in the catalog (I'm not sure
++          if VolBytes is the sum of all bytes ever written to that volume
++          by Bacula).  This information can be important when determining
++          which media to replace.  For the tape drives known to Bacula,
++          similar information is interesting to determine the device
++          status and expected life time: Time it's been Reading and
++          Writing, number of tape Loads / Unloads / Errors.  This
++          information is not yet recorded as far as I know.
++
++          The next step would be implementing drive cleaning setup.
++          Bacula already has knowledge about cleaning tapes.  Once it has
++          some information about cleaning cycles (measured in drive run
++          time, number of tapes used, or calender days, for example) it
++          can automatically execute tape cleaning (with an autochanger,
++          obviously) or ask for operator assistence loading a cleaning
++          tape.
++
++          The next step would be to implement TAPEALERT checks not only
++          when changing tapes and only sending he information to the
++          administrator, but rather checking after each tape error,
++          checking on a regular basis (for example after each tape file),
++          and also before unloading and after loading a new tape.  Then,
++          depending on the drives TAPEALERT state and the know drive
++          cleaning state Bacula could automatically schedule later
++          cleaning, clean immediately, or inform the operator.
++
++          Implementing this would perhaps require another catalog change
++          and perhaps major changes in SD code and the DIR-SD protocoll,
++          so I'd only consider this worth implementing if it would
++          actually be used or even needed by many people. 
++
++Item 14:  Merging of multiple backups into a single one. (Also called Synthetic
++          Backup or Consolidation).
++
++  Origin: Marc Cousin and Eric Bollengier 
++  Date:   15 November 2005
++  Status: Depends on first implementing project Item 1 (Migration).
++
++  What:   A merged backup is a backup made without connecting to the Client.
++          It would be a Merge of existing backups into a single backup.
++          In effect, it is like a restore but to the backup medium.
++
++          For instance, say that last sunday we made a full backup.  Then
++          all week long, we created incremental backups, in order to do
++          them fast.  Now comes sunday again, and we need another full.
++          The merged backup makes it possible to do instead an incremental
++          backup (during the night for instance), and then create a merged
++          backup during the day, by using the full and incrementals from
++          the week.  The merged backup will be exactly like a full made
++          sunday night on the tape, but the production interruption on the
++          Client will be minimal, as the Client will only have to send
++          incrementals.
++
++          In fact, if it's done correctly, you could merge all the
++          Incrementals into single Incremental, or all the Incrementals
++          and the last Differential into a new Differential, or the Full,
++          last differential and all the Incrementals into a new Full
++          backup.  And there is no need to involve the Client.
++
++  Why:    The benefit is that :
++          - the Client just does an incremental ;
++          - the merged backup on tape is just as a single full backup,
++            and can be restored very fast.
++
++          This is also a way of reducing the backup data since the old
++          data can then be pruned (or not) from the catalog, possibly
++          allowing older volumes to be recycled
++
++Item 15:  Automatic disabling of devices
++   Date:   2005-11-11
++   Origin: Peter Eriksson <peter at ifm.liu dot se>
++   Status:
++
++   What:  After a configurable amount of fatal errors with a tape drive
++          Bacula should automatically disable further use of a certain
++          tape drive. There should also be "disable"/"enable" commands in
++          the "bconsole" tool.
++
++   Why:   On a multi-drive jukebox there is a possibility of tape drives
++          going bad during large backups (needing a cleaning tape run,
++          tapes getting stuck). It would be advantageous if Bacula would
++          automatically disable further use of a problematic tape drive
++          after a configurable amount of errors has occured.
++
++          An example: I have a multi-drive jukebox (6 drives, 380+ slots)
++          where tapes occasionally get stuck inside the drive. Bacula will
++          notice that the "mtx-changer" command will fail and then fail
++          any backup jobs trying to use that drive. However, it will still
++          keep on trying to run new jobs using that drive and fail -
++          forever, and thus failing lots and lots of jobs... Since we have
++          many drives Bacula could have just automatically disabled
++          further use of that drive and used one of the other ones
++          instead.
++
++
++Item 16:  Directive/mode to backup only file changes, not entire file
++  Date:   11 November 2005
++  Origin: Joshua Kugler <joshua dot kugler at uaf dot edu>
++          Marek Bajon <mbajon at bimsplus dot com dot pl>
++  Status: RFC
++
++  What:   Currently when a file changes, the entire file will be backed up in
++          the next incremental or full backup.  To save space on the tapes
++          it would be nice to have a mode whereby only the changes to the
++          file would be backed up when it is changed.
++
++  Why:    This would save lots of space when backing up large files such as 
++          logs, mbox files, Outlook PST files and the like.
++
++  Notes:  This would require the usage of disk-based volumes as comparing 
++          files would not be feasible using a tape drive.
++
++Item 17:  Quick release of FD-SD connection
++  Origin: Frank Volf (frank at deze dot org)
++  Date:   17 november 2005
++  Status:
++
++   What:  In the bacula implementation a backup is finished after all data
++          and attributes are succesfully written to storage.  When using a
++          tape backup it is very annoying that a backup can take a day,
++          simply because the current tape (or whatever) is full and the
++          administrator has not put a new one in.  During that time the
++          system cannot be taken off-line, because there is still an open
++          session between the storage daemon and the file daemon on the
++          client.
++
++          Although this is a very good strategey for making "safe backups"
++          This can be annoying for e.g.  laptops, that must remain
++          connected until the bacukp is completed.
++
++          Using a new feature called "migration" it will be possible to
++          spool first to harddisk (using a special 'spool' migration
++          scheme) and then migrate the backup to tape.
++
++          There is still the problem of getting the attributes committed.
++          If it takes a very long time to do, with the current code, the
++          job has not terminated, and the File daemon is not freed up.  The
++          Storage daemon should release the File daemon as soon as all the
++          file data and all the attributes have been sent to it (the SD).
++          Currently the SD waits until everything is on tape and all the
++          attributes are transmitted to the Director before signalling
++          completion to the FD. I don't think I would have any problem
++          changing this.  The reason is that even if the FD reports back to
++          the Dir that all is OK, the job will not terminate until the SD
++          has done the same thing -- so in a way keeping the SD-FD link
++          open to the very end is not really very productive ...
++   Why:   Makes backup of laptops much easier.
+ ============= Empty RFC form ===========
+@@ -245,33 +413,4 @@
+ ============== End RFC form ==============
+-Items completed for release 1.38.0:
+-#4   Embedded Python Scripting (implemented in all Daemons)
+-#5   Events that call a Python program (Implemented in all
+-       daemons, but more cleanup work to be done).
+-#6   Select one from among Multiple Storage Devices for Job.
+-       This is already implemented in 1.37.
+-#7   Single Job Writing to Multiple Storage Devices. This is
+-       currently implemented with a Clone feature.
+-#-   Full multiple drive Autochanger support (done in 1.37)
+-#-   Built in support for communications encryption (TLS) 
+-       done by Landon Fuller.
+-#    Support for Unicode characters
+-       (via UTF-8) on Win32 machines thanks to Thorsten Engel.
+-Item  8:  Break the one-to-one Relationship between a Job and a
+-          Specific Storage Device (or Devices if #10 is implemented).
+-
+-Completed items from last year's list:
+-Item 1:   Multiple simultaneous Jobs. (done)
+-Item 3:   Write the bscan program -- also write a bcopy program (done).
+-Item 5:   Implement Label templates (done).
+-Item 6:   Write a regression script (done)
+-Item 9:   Add SSL to daemon communications (done by Landon Fuller)
+-Item 10:  Define definitive tape format (done)
+-Item 3:   GUI for interactive restore. Partially Implemented in 1.34
+-          Note, there is now a complete Webmin plugin, a partial
+-          GNOME console, and an excellent wx-console GUI.
+-Item 4:   GUI for interactive backup
+-Item 2:   Job Data Spooling.
+-    Done: Regular expression matching.
+-Item 10:  New daemon communication protocol (this has been dropped).
++Items completed for release 1.38.0 -- see kernsdone
+Index: autoconf/configure.in
+===================================================================
+RCS file: /cvsroot/bacula/bacula/autoconf/configure.in,v
+retrieving revision 1.184.2.4
+retrieving revision 1.184.2.5
+diff -u -r1.184.2.4 -r1.184.2.5
+--- autoconf/configure.in      13 Nov 2005 10:51:17 -0000      1.184.2.4
++++ autoconf/configure.in      22 Nov 2005 10:50:55 -0000      1.184.2.5
+@@ -604,7 +604,7 @@
+   PYTHON_LIBS=
+   if test "$withval" != "no"; then
+      if test "$withval" = "yes"; then
+-      for python_root in /usr /usr/local; do
++      for python_root in /usr /usr/local /usr/sfw; do
+         if test -f $python_root/include/python2.2/Python.h; then
+            PYTHON_INCDIR=-I$python_root/include/python2.2
+            PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
+Index: patches/1.38.1-to-1.38.2.patch
+===================================================================
+RCS file: patches/1.38.1-to-1.38.2.patch
+diff -N patches/1.38.1-to-1.38.2.patch
+--- /dev/null  1 Jan 1970 00:00:00 -0000
++++ patches/1.38.1-to-1.38.2.patch     22 Nov 2005 10:52:49 -0000      1.1.2.3
+@@ -0,0 +1,6901 @@
++
++ This patch fixes the following bugs:
++
++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
++  says that this patch does not fix his problem)
++- Fix cancel failure bug. Bug #481
++- Fix failure when Pool name has spaces. Bug #487
++- Fix SD crash in autochanger code. Mutex failure. Bug #488
++- Fix a couple of free()s in src/filed/acl.c
++- Fix memory overrun in bfile.c in building OS X resource
++  fork filename. Bug #489
++- Add Pool name to SD status output.
++- Add Python install dir for Solaris to configure. Bug #492
++
++This patch is applied to Bacula source version 1.38.1 and will
++produce Bacula source version 1.38.2.  Apply it with:
++
++   cd <bacula-1.38.1-source>
++   ./configure (your options) if not already done
++   patch -p0 <1.38.1-to-1.38.2.patch
++   make
++   make install
++
++Index: ChangeLog
++===================================================================
++RCS file: /cvsroot/bacula/bacula/ChangeLog,v
++retrieving revision 1.154.2.7
++retrieving revision 1.154.2.8
++diff -u -r1.154.2.7 -r1.154.2.8
++--- ChangeLog 15 Nov 2005 09:27:19 -0000      1.154.2.7
+++++ ChangeLog 22 Nov 2005 10:50:54 -0000      1.154.2.8
++@@ -1,4 +1,15 @@
++ 
+++Changes to 1.38.2:
+++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
+++- Fix bnet-server bug found on OpenBSD. Bug #486
+++- Fix cancel failure bug. Bug #481
+++- Fix failure when Pool name has spaces. Bug #487   
+++- Fix SD crash in autochanger code. Mutex failure. Bug #488
+++- Fix a couple of free()s in src/filed/acl.c
+++- Fix memory overrun in bfile.c in building OS X resource
+++  fork filename. Bug #489 
+++- Add Pool name to SD status output.
+++- Add Python install dir for Solaris to configure. Bug #492
++ 
++ Changes to 1.38.1:
++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
++Index: ReleaseNotes
++===================================================================
++RCS file: /cvsroot/bacula/bacula/ReleaseNotes,v
++retrieving revision 1.147.2.9
++retrieving revision 1.147.2.10
++diff -u -r1.147.2.9 -r1.147.2.10
++--- ReleaseNotes      15 Nov 2005 09:27:19 -0000      1.147.2.9
+++++ ReleaseNotes      22 Nov 2005 10:50:54 -0000      1.147.2.10
++@@ -1,10 +1,22 @@
++ 
++-          Release Notes for Bacula 1.38.1
+++          Release Notes for Bacula 1.38.2
++ 
++   Bacula code: Total files = 420 Total lines = 138,440 (*.h *.c *.in)
++       20,440 additional lines of code since version 1.36.3
++ 
++-Changes since 1.38.0:
+++Changes to 1.38.2:
+++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
+++- Fix bnet-server bug found on OpenBSD. Bug #486
+++- Fix cancel failure bug. Bug #481
+++- Fix failure when Pool name has spaces. Bug #487   
+++- Fix SD crash in autochanger code. Mutex failure. Bug #488
+++- Fix a couple of free()s in src/filed/acl.c
+++- Fix memory overrun in bfile.c in building OS X resource
+++  fork filename. Bug #489 
+++- Add Pool name to SD status output.
+++- Add Python install dir for Solaris to configure. Bug #492
+++
+++Changes to 1.38.1:
++ - Corrected ACL for Solaris (David Duchscher and Attila Fulop).
++ - Add bacula_mail_summary.sh to examples directory. It makes
++   a single email summary of any number of jobs. Submitted
++Index: configure
++===================================================================
++RCS file: /cvsroot/bacula/bacula/configure,v
++retrieving revision 1.203.2.5
++retrieving revision 1.203.2.6
++diff -u -r1.203.2.5 -r1.203.2.6
++--- configure 13 Nov 2005 10:51:17 -0000      1.203.2.5
+++++ configure 22 Nov 2005 10:50:54 -0000      1.203.2.6
++@@ -14948,7 +14948,7 @@
++   PYTHON_LIBS=
++   if test "$withval" != "no"; then
++      if test "$withval" = "yes"; then
++-     for python_root in /usr /usr/local; do
+++     for python_root in /usr /usr/local /usr/sfw; do
++        if test -f $python_root/include/python2.2/Python.h; then
++           PYTHON_INCDIR=-I$python_root/include/python2.2
++           PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
++Index: kernstodo
++===================================================================
++RCS file: /cvsroot/bacula/bacula/kernstodo,v
++retrieving revision 1.570.2.6
++retrieving revision 1.570.2.7
++diff -u -r1.570.2.6 -r1.570.2.7
++--- kernstodo 4 Nov 2005 09:16:49 -0000       1.570.2.6
+++++ kernstodo 22 Nov 2005 10:50:55 -0000      1.570.2.7
++@@ -1,5 +1,5 @@
++                     Kern's ToDo List
++-                     03 November 2005
+++                     21 November 2005
++ 
++ Major development:      
++ Project                     Developer
++@@ -7,8 +7,6 @@
++ Version 1.37                Kern (see below)
++ ========================================================
++ 
++-Final items for 1.37 before release:
++-
++ Document:
++ - Does ClientRunAfterJob fail the job on a bad return code?
++ - Document cleaning up the spool files:
++@@ -18,6 +16,8 @@
++ - Does WildFile match against full name?  Doc.
++ 
++ For 1.39:
+++- Make sure that all do_prompt() calls in Dir check for
+++  -1 (error) and -2 (cancel) returns.
++ - Look at -D_FORTIFY_SOURCE=2
++ - Add Win32 FileSet definition somewhere
++ - Look at fixing restore status stats in SD.
++@@ -27,6 +27,12 @@
++   encountered, read many times (as it currently does), and if the
++   block cannot be read, skip to the next block, and try again.  If
++   that fails, skip to the next file and try again, ...
+++- Add level table:
+++  create table LevelType (LevelType binary(1), LevelTypeLong tinyblob);
+++  insert into LevelType (LevelType,LevelTypeLong) values
+++  ("F","Full"),
+++  ("D","Diff"),
+++  ("I","Inc");
++ - Add ACL to restore only to original location.
++ - Add a recursive mark command (rmark) to restore.
++ - "Minimum Job Interval = nnn" sets minimum interval between Jobs
++@@ -1246,219 +1252,4 @@
++ ====
++ 
++ 
++-=== Done
++-- Save mount point for directories not traversed with onefs=yes.
++-- Add seconds to start and end times in the Job report output.
++-- if 2 concurrent backups are attempted on the same tape
++-  drive (autoloader) into different tape pools, one of them will exit
++-  fatally instead of halting until the drive is idle
++-- Update StartTime if job held in Job Queue.
++-- Look at www.nu2.nu/pebuilder as a helper for full windows
++-  bare metal restore. (done by Scott)
++-- Fix orphanned buffers:
++-   Orphaned buffer:      24 bytes allocated at line 808 of rufus-dir job.c
++-   Orphaned buffer:      40 bytes allocated at line 45 of rufus-dir alist.c
++-- Implement Preben's suggestion to add
++-  File System Types = ext2, ext3 
++-  to FileSets, thus simplifying backup of *all* local partitions.
++-- Try to open a device on each Job if it was not opened
++-  when the SD started.
++-- Add dump of VolSessionId/Time and FileIndex with bls.
++-- If Bacula does not find the right tape in the Autochanger,
++-  then mark the tape in error and move on rather than asking
++-  for operator intervention.
++-- Cancel command should include JobId in list of Jobs.
++-- Add performance testing hooks
++-- Bootstrap from JobMedia records.
++-- Implement WildFile and WildDir to solve problem of 
++-  saving only *.doc files.
++-- Fix
++-   Please use the "label"  command to create a new Volume for:
++-       Storage:      DDS-4-changer
++-       Media type:   
++-       Pool:         Default
++-   label
++-   The defined Storage resources are:
++-- Copy Changer Device and Changer Command from Autochanger
++-  to Device resource in SD if none given in Device resource.
++-- 1. Automatic use of more than one drive in an autochanger (done)
++-- 2. Automatic selection of the correct drive for each Job (i.e.
++-     selects a drive with an appropriate Volume for the Job) (done)
++-- 6. Allow multiple simultaneous Jobs referencing the same pool write
++-    to several tapes (some new directive(s) are are probably needed for
++-    this) (done)
++-- Locking (done)
++-- Key on Storage rather than Pool (done)
++-- Allow multiple drives to use same Pool (change jobq.c DIR) (done).
++-- Synchronize multiple drives so that not more
++-  than one loads a tape and any time (done)
++-- 4. Use Changer Device and Changer Command specified in the
++-     Autochanger resource, if none is found in the Device resource.
++-    You can continue to specify them in the Device resource if you want
++-    or need them to be different for each device.
++-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") 
++-    that can allow a Device be part of an Autochanger, and hence the changer
++-    script protected, but if set to no, will prevent the Device from being 
++-    automatically selected from the changer. This allows the device to
++-    be directly accessed through its Device name, but not through the
++-    AutoChanger name.
++-#6   Select one from among Multiple Storage Devices for Job
++-#5   Events that call a Python program 
++-     (Implemented in Dir/SD)
++-- Make sure the Device name is in the Query packet returned.
++-- Don't start a second file job if one is already running.
++-- Implement EOF/EOV labels for ANSI labels
++-- Implement IBM labels.
++-- When Python creates a new label, the tape is immediately
++-  recycled and no label created. This happens when using   
++-  autolabeling -- even when Python doesn't generate the name.
++-- Scratch Pool where the volumes can be re-assigned to any Pool.
++-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) 
++-  is busy reading. Job 6 canceled.
++-- Remove separate thread for opening devices in SD.  On the other
++-  hand, don't block waiting for open() for devices.
++-- Fix code to either handle updating NumVol or to calculate it in
++-  Dir next_vol.c
++-- Ensure that you cannot exclude a directory or a file explicitly
++-  Included with File.
++-#4   Embedded Python Scripting 
++-     (Implemented in Dir/SD/FD)
++-- Add Python writable variable for changing the Priority,
++-    Client, Storage, JobStatus (error), ...
++-- SD Python
++-  - Solicit Events
++-- Add disk seeking on restore; turn off seek on tapes.
++-  stored/match_bsr.c
++-- Look at dird_conf.c:1000: warning: `int size' 
++-  might be used uninitialized in this function
++-- Indicate when a Job is purged/pruned during restore.
++-- Implement some way to turn off automatic pruning in Jobs.
++-- Implement a way an Admin Job can prune, possibly multiple
++-  clients -- Python script?
++-- Look at Preben's acl.c error handling code.
++-- SD crashes after a tape restore then doing a backup. 
++-- If drive is opened read/write, close it and re-open
++-  read-only if doing a restore, and vice-versa.
++-- Windows restore:
++-  data-fd: RestoreFiles.2004-12-07_15.56.42 Error:
++-  > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der
++-  > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen
++-  > Prozess verwendet wird.
++-  Restore restores all files, but then fails at the end trying
++-  to set the attributes of e:
++-  from failed jobs.- Resolve the problem between Device name and Archive name,
++-  and fix SD messages.
++-- Tell the "restore" user when browsing is no longer possible.
++-- Add a restore directory-x
++-- Write non-optimized bsrs from the JobMedia and Media records,
++-  even after Files are pruned.
++-- Delete Stripe and Copy from VolParams to save space.
++-- Fix option 2 of restore -- list where file is backed up -- require Client,
++-  then list last 20 backups.
++-- Finish implementation of passing all Storage and Device needs to
++-  the SD.
++-- Move test for max wait time exceeded in job.c up -- Peter's idea.
++-##   Consider moving docs to their own project.
++-##   Move rescue to its own project.
++-- Add client version to the Client name line that prints in
++-  the Job report.
++-- Fix the Rescue CDROM.
++-- By the way: on page http://www.bacula.org/?page=tapedrives , at the 
++-  bottom, the link to "Tape Testing Chapter" is broken. It goes to 
++-  /html-manual/... while the others point to /rel-manual/...
++-- Device resource needs the "name" of the SD.
++-- Specify a single directory to restore.
++-- Implement MediaType keyword in bsr?   
++-- Add a date and time stamp at the beginning of every line in the 
++-  Job report (Volker Sauer).
++-- Add level to estimate command.
++-- Add "limit=n" for "list jobs"
++-- Make bootstrap filename unique.
++-- Make Dmsg look at global before calling subroutine.
++-- From Chris Hull:
++-   it seems to be complaining about 12:00pm which should be a valid 12
++-   hour time.  I changed the time to 11:59am and everything works fine.
++-   Also 12:00am works fine.  0:00pm also works (which I don't think
++-   should).  None of the values 12:00pm - 12:59pm work for that matter.
++-- Require restore via the restore command or make a restore Job
++-  get the bootstrap file.
++-- Implement Maximum Job Spool Size
++-- Fix 3993 error in SD. It forgets to look at autochanger
++-  resource for device command, ...
++-- 3. Prevent two drives requesting the same Volume in any given
++-     autochanger, by checking if a Volume is mounted on another drive
++-     in an Autochanger.
++-- Upgrade to MySQL 4.1.12 See:  
++-  http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html
++-- Add # Job Level date to bsr file
++-- Implement "PreferMountedVolumes = yes|no" in Job resource.
++-##   Integrate web-bacula into a new Bacula project with
++-     bimagemgr.
++-- Cleaning tapes should have Status "Cleaning" rather than append.
++-- Make sure that Python has access to Client address/port so that
++-  it can check if Clients are alive.
++-- Review all items in "restore".
++-- Fix PostgreSQL GROUP BY problems in restore.
++-- Fix PostgreSQL sql problems in bugs.
++-- After rename
++-  04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume 
++-     "DLT-13Feb04".
++-  Current Volume "DLT-04Jul05" not acceptable because:
++-  1997 Volume "DLT-13Feb04" not in catalog.
++-  04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device 
++-     "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02
++-##   Create a new GUI chapter explaining all the GUI programs.
++--    Make "update slots" when pointing to Autochanger, remove
++-     all Volumes from other drives.  "update slots all-drives"?
++-     No, this is done by modifying mtx-changer to list what is
++-     in the drives.
++-- Finish TLS implementation.
++-- Port limiting -m in iptables to prevent DoS attacks
++-  could cause broken pipes on Bacula.
++-6. Build and test the Volume Shadow Copy (VSS) for Win32. 
++--  Allow cancel of unknown Job
++--  State not saved when closing Win32 FD by icon
++--  bsr-opt-test fails. bsr deleted. Fix.
++--  Move Python daemon variables from Job to Bacula object.
++-   WorkingDir, ConfigFile
++-- Document that Bootstrap files can be written with cataloging
++-  turned off.
++-- Document details of ANSI/IBM labels
++-- OS linux 2.4
++-  1) ADIC, DLT, FastStor 4000, 7*20GB
++-- Linux Sony LIB-D81, AIT-3 library works.
++-- Doc the following
++-  to activate, check or disable the hardware compression feature on my 
++-  exb-8900 i use the exabyte "MammothTool" you can get it here:
++-  http://www.exabyte.com/support/online/downloads/index.cfm
++-  There is a solaris version of this tool. With option -C 0 or 1 you can 
++-  disable or activate compression. Start this tool without any options for 
++-  a small reference.
++-- Document Heartbeat Interval in the dealing with firewalls section.
++-- Document new CDROM directory.
++-- On Win32 working directory must have drive letter ????
++-- On Win32 working directory must be writable by SYSTEM to
++-  do restores.
++-- Document that ChangerDevice is used for Alert command.
++-- Add better documentation on how restores can be done
++-8. Take one more try at making DVD writing work (no go)
++-7. Write a bacula-web document
++-- Why isn't the DEVICE structure defined when doing
++-  a reservation?
++-- Multi-drive changer seems to only use drive 0
++-  Multiple drives don't seem to be opened.
++-- My database is growing
++-- Call GetLastError() in the berrno constructor rather
++-  than delaying until strerror.
++-- Tape xxx in drive 0, requested in drive 1
++-- The mount command does not work with drives other than 0.
++-- A mount should cause the SD to re-examine what Slot is   
++-  loaded.
++-- The SD locks on to the first available drive then
++-  wants a Volume that is released but in another drive --
++-  chaos.
++-- Run the regression scripts on Solaris and FreeBSD
++--  Figure out how to package gui, and rescue programs.
++-- Add a .dir command to restore tree code to eliminate the problem
++-- Mount after manually unloading changer causes hang in SD
++-- Fix JobACL with restore by JobId.
+++=== Done -- see kernsdone
++Index: kes-1.38
++===================================================================
++RCS file: /cvsroot/bacula/bacula/kes-1.38,v
++retrieving revision 1.1.2.13
++retrieving revision 1.1.2.14
++diff -u -r1.1.2.13 -r1.1.2.14
++--- kes-1.38  14 Nov 2005 20:20:38 -0000      1.1.2.13
+++++ kes-1.38  22 Nov 2005 10:50:55 -0000      1.1.2.14
++@@ -3,6 +3,20 @@
++ 
++ General:
++ 
+++Changes to 1.38.2:
+++20Oct05
+++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
+++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
+++  says this does not fix *his* bug).
+++- Fix cancel failure bug. Bug #481
+++- Fix failure when Pool name has spaces. Bug #487   
+++- Fix SD crash in autochanger code. Mutex failure. Bug #488
+++- Fix a couple of free()s in src/filed/acl.c
+++- Fix memory overrun in bfile.c in building OS X resource
+++  fork filename. Bug #489 
+++- Add Pool name to SD status output.
+++- Add Python install dir for Solaris to configure. Bug #492
+++
++ Changes to 1.38.1:
++ 14Oct05
++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
++Index: projects
++===================================================================
++RCS file: /cvsroot/bacula/bacula/projects,v
++retrieving revision 1.12.2.3
++retrieving revision 1.12.2.4
++diff -u -r1.12.2.3 -r1.12.2.4
++--- projects  10 Nov 2005 20:25:27 -0000      1.12.2.3
+++++ projects  22 Nov 2005 10:50:55 -0000      1.12.2.4
++@@ -228,7 +228,175 @@
++ 
++   Why:    Performance enhancement.
++ 
+++Item 13:  Let Bacula log tape usage and handle drive cleaning cycles.
+++  Date:   November 11, 2005
+++  Origin: Arno Lehmann <al at its-lehmann dot de>
+++  Status:
+++
+++  What:   Make Bacula manage tape life cycle information and drive 
+++          cleaning cycles.
+++
+++  Why:    Both parts of this project are important when operating backups.
+++          We need to know which tapes need replacement, and we need to
+++          make sure the drives are cleaned when necessary.  While many
+++          tape libraries and even autoloaders can handle all this
+++          automatically, support by Bacula can be helpful for smaller
+++          (older) libraries and single drives.  Also, checking drive
+++          status during operation can prevent some failures (as I had to
+++          learn the hard way...)
+++
+++  Notes:  First, Bacula could (and even does, to some limited extent)
+++          record tape and drive usage.  For tapes, the number of mounts,
+++          the amount of data, and the time the tape has actually been
+++          running could be recorded.  Data fields for Read and Write time
+++          and Nmber of mounts already exist in the catalog (I'm not sure
+++          if VolBytes is the sum of all bytes ever written to that volume
+++          by Bacula).  This information can be important when determining
+++          which media to replace.  For the tape drives known to Bacula,
+++          similar information is interesting to determine the device
+++          status and expected life time: Time it's been Reading and
+++          Writing, number of tape Loads / Unloads / Errors.  This
+++          information is not yet recorded as far as I know.
+++
+++          The next step would be implementing drive cleaning setup.
+++          Bacula already has knowledge about cleaning tapes.  Once it has
+++          some information about cleaning cycles (measured in drive run
+++          time, number of tapes used, or calender days, for example) it
+++          can automatically execute tape cleaning (with an autochanger,
+++          obviously) or ask for operator assistence loading a cleaning
+++          tape.
+++
+++          The next step would be to implement TAPEALERT checks not only
+++          when changing tapes and only sending he information to the
+++          administrator, but rather checking after each tape error,
+++          checking on a regular basis (for example after each tape file),
+++          and also before unloading and after loading a new tape.  Then,
+++          depending on the drives TAPEALERT state and the know drive
+++          cleaning state Bacula could automatically schedule later
+++          cleaning, clean immediately, or inform the operator.
+++
+++          Implementing this would perhaps require another catalog change
+++          and perhaps major changes in SD code and the DIR-SD protocoll,
+++          so I'd only consider this worth implementing if it would
+++          actually be used or even needed by many people. 
+++
+++Item 14:  Merging of multiple backups into a single one. (Also called Synthetic
+++          Backup or Consolidation).
+++
+++  Origin: Marc Cousin and Eric Bollengier 
+++  Date:   15 November 2005
+++  Status: Depends on first implementing project Item 1 (Migration).
+++
+++  What:   A merged backup is a backup made without connecting to the Client.
+++          It would be a Merge of existing backups into a single backup.
+++          In effect, it is like a restore but to the backup medium.
+++
+++          For instance, say that last sunday we made a full backup.  Then
+++          all week long, we created incremental backups, in order to do
+++          them fast.  Now comes sunday again, and we need another full.
+++          The merged backup makes it possible to do instead an incremental
+++          backup (during the night for instance), and then create a merged
+++          backup during the day, by using the full and incrementals from
+++          the week.  The merged backup will be exactly like a full made
+++          sunday night on the tape, but the production interruption on the
+++          Client will be minimal, as the Client will only have to send
+++          incrementals.
+++
+++          In fact, if it's done correctly, you could merge all the
+++          Incrementals into single Incremental, or all the Incrementals
+++          and the last Differential into a new Differential, or the Full,
+++          last differential and all the Incrementals into a new Full
+++          backup.  And there is no need to involve the Client.
+++
+++  Why:    The benefit is that :
+++          - the Client just does an incremental ;
+++          - the merged backup on tape is just as a single full backup,
+++            and can be restored very fast.
+++
+++          This is also a way of reducing the backup data since the old
+++          data can then be pruned (or not) from the catalog, possibly
+++          allowing older volumes to be recycled
+++
+++Item 15:  Automatic disabling of devices
+++   Date:   2005-11-11
+++   Origin: Peter Eriksson <peter at ifm.liu dot se>
+++   Status:
+++
+++   What:  After a configurable amount of fatal errors with a tape drive
+++          Bacula should automatically disable further use of a certain
+++          tape drive. There should also be "disable"/"enable" commands in
+++          the "bconsole" tool.
+++
+++   Why:   On a multi-drive jukebox there is a possibility of tape drives
+++          going bad during large backups (needing a cleaning tape run,
+++          tapes getting stuck). It would be advantageous if Bacula would
+++          automatically disable further use of a problematic tape drive
+++          after a configurable amount of errors has occured.
+++
+++          An example: I have a multi-drive jukebox (6 drives, 380+ slots)
+++          where tapes occasionally get stuck inside the drive. Bacula will
+++          notice that the "mtx-changer" command will fail and then fail
+++          any backup jobs trying to use that drive. However, it will still
+++          keep on trying to run new jobs using that drive and fail -
+++          forever, and thus failing lots and lots of jobs... Since we have
+++          many drives Bacula could have just automatically disabled
+++          further use of that drive and used one of the other ones
+++          instead.
+++
+++
+++Item 16:  Directive/mode to backup only file changes, not entire file
+++  Date:   11 November 2005
+++  Origin: Joshua Kugler <joshua dot kugler at uaf dot edu>
+++          Marek Bajon <mbajon at bimsplus dot com dot pl>
+++  Status: RFC
+++
+++  What:   Currently when a file changes, the entire file will be backed up in
+++          the next incremental or full backup.  To save space on the tapes
+++          it would be nice to have a mode whereby only the changes to the
+++          file would be backed up when it is changed.
+++
+++  Why:    This would save lots of space when backing up large files such as 
+++          logs, mbox files, Outlook PST files and the like.
+++
+++  Notes:  This would require the usage of disk-based volumes as comparing 
+++          files would not be feasible using a tape drive.
+++
+++Item 17:  Quick release of FD-SD connection
+++  Origin: Frank Volf (frank at deze dot org)
+++  Date:   17 november 2005
+++  Status:
+++
+++   What:  In the bacula implementation a backup is finished after all data
+++          and attributes are succesfully written to storage.  When using a
+++          tape backup it is very annoying that a backup can take a day,
+++          simply because the current tape (or whatever) is full and the
+++          administrator has not put a new one in.  During that time the
+++          system cannot be taken off-line, because there is still an open
+++          session between the storage daemon and the file daemon on the
+++          client.
+++
+++          Although this is a very good strategey for making "safe backups"
+++          This can be annoying for e.g.  laptops, that must remain
+++          connected until the bacukp is completed.
+++
+++          Using a new feature called "migration" it will be possible to
+++          spool first to harddisk (using a special 'spool' migration
+++          scheme) and then migrate the backup to tape.
+++
+++          There is still the problem of getting the attributes committed.
+++          If it takes a very long time to do, with the current code, the
+++          job has not terminated, and the File daemon is not freed up.  The
+++          Storage daemon should release the File daemon as soon as all the
+++          file data and all the attributes have been sent to it (the SD).
+++          Currently the SD waits until everything is on tape and all the
+++          attributes are transmitted to the Director before signalling
+++          completion to the FD. I don't think I would have any problem
+++          changing this.  The reason is that even if the FD reports back to
+++          the Dir that all is OK, the job will not terminate until the SD
+++          has done the same thing -- so in a way keeping the SD-FD link
+++          open to the very end is not really very productive ...
++ 
+++   Why:   Makes backup of laptops much easier.
++ 
++ 
++ ============= Empty RFC form ===========
++@@ -245,33 +413,4 @@
++ ============== End RFC form ==============
++ 
++ 
++-Items completed for release 1.38.0:
++-#4   Embedded Python Scripting (implemented in all Daemons)
++-#5   Events that call a Python program (Implemented in all
++-       daemons, but more cleanup work to be done).
++-#6   Select one from among Multiple Storage Devices for Job.
++-       This is already implemented in 1.37.
++-#7   Single Job Writing to Multiple Storage Devices. This is
++-       currently implemented with a Clone feature.
++-#-   Full multiple drive Autochanger support (done in 1.37)
++-#-   Built in support for communications encryption (TLS) 
++-       done by Landon Fuller.
++-#    Support for Unicode characters
++-       (via UTF-8) on Win32 machines thanks to Thorsten Engel.
++-Item  8:  Break the one-to-one Relationship between a Job and a
++-          Specific Storage Device (or Devices if #10 is implemented).
++-
++-Completed items from last year's list:
++-Item 1:   Multiple simultaneous Jobs. (done)
++-Item 3:   Write the bscan program -- also write a bcopy program (done).
++-Item 5:   Implement Label templates (done).
++-Item 6:   Write a regression script (done)
++-Item 9:   Add SSL to daemon communications (done by Landon Fuller)
++-Item 10:  Define definitive tape format (done)
++-Item 3:   GUI for interactive restore. Partially Implemented in 1.34
++-          Note, there is now a complete Webmin plugin, a partial
++-          GNOME console, and an excellent wx-console GUI.
++-Item 4:   GUI for interactive backup
++-Item 2:   Job Data Spooling.
++-    Done: Regular expression matching.
++-Item 10:  New daemon communication protocol (this has been dropped).
+++Items completed for release 1.38.0 -- see kernsdone
++Index: autoconf/configure.in
++===================================================================
++RCS file: /cvsroot/bacula/bacula/autoconf/configure.in,v
++retrieving revision 1.184.2.4
++retrieving revision 1.184.2.5
++diff -u -r1.184.2.4 -r1.184.2.5
++--- autoconf/configure.in     13 Nov 2005 10:51:17 -0000      1.184.2.4
+++++ autoconf/configure.in     22 Nov 2005 10:50:55 -0000      1.184.2.5
++@@ -604,7 +604,7 @@
++   PYTHON_LIBS=
++   if test "$withval" != "no"; then
++      if test "$withval" = "yes"; then
++-     for python_root in /usr /usr/local; do
+++     for python_root in /usr /usr/local /usr/sfw; do
++        if test -f $python_root/include/python2.2/Python.h; then
++           PYTHON_INCDIR=-I$python_root/include/python2.2
++           PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
++Index: patches/1.38.1-to-1.38.2.patch
++===================================================================
++RCS file: patches/1.38.1-to-1.38.2.patch
++diff -N patches/1.38.1-to-1.38.2.patch
++--- /dev/null 1 Jan 1970 00:00:00 -0000
+++++ patches/1.38.1-to-1.38.2.patch    22 Nov 2005 10:50:55 -0000      1.1.2.2
++@@ -0,0 +1,5704 @@
+++
+++ This patch fixes the following bugs:
+++
+++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
+++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
+++  says that this patch does not fix his problem)
+++- Fix cancel failure bug. Bug #481
+++- Fix failure when Pool name has spaces. Bug #487
+++- Fix SD crash in autochanger code. Mutex failure. Bug #488
+++- Fix a couple of free()s in src/filed/acl.c
+++- Fix memory overrun in bfile.c in building OS X resource
+++  fork filename. Bug #489
+++- Add Pool name to SD status output.
+++- Add Python install dir for Solaris to configure. Bug #492
+++
+++This patch is applied to Bacula source version 1.38.1 and will
+++produce Bacula source version 1.38.2.  Apply it with:
+++
+++   cd <bacula-1.38.1-source>
+++   ./configure (your options) if not already done
+++   patch -p0 <1.38.1-to-1.38.2.patch
+++   make
+++   make install
+++
+++? osx_finder.patch
+++Index: ChangeLog
+++===================================================================
+++RCS file: /cvsroot/bacula/bacula/ChangeLog,v
+++retrieving revision 1.154.2.7
+++diff -u -r1.154.2.7 ChangeLog
+++--- ChangeLog        15 Nov 2005 09:27:19 -0000      1.154.2.7
++++++ ChangeLog        22 Nov 2005 10:42:14 -0000
+++@@ -1,4 +1,14 @@
+++ 
++++Changes to 1.38.2:
++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
++++- Fix bnet-server bug found on OpenBSD. Bug #486
++++- Fix cancel failure bug. Bug #481
++++- Fix failure when Pool name has spaces. Bug #487   
++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
++++- Fix a couple of free()s in src/filed/acl.c
++++- Fix memory overrun in bfile.c in building OS X resource
++++  fork filename. Bug #489 
++++- Add Pool name to SD status output.
+++ 
+++ Changes to 1.38.1:
+++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
+++Index: ReleaseNotes
+++===================================================================
+++RCS file: /cvsroot/bacula/bacula/ReleaseNotes,v
+++retrieving revision 1.147.2.9
+++diff -u -r1.147.2.9 ReleaseNotes
+++--- ReleaseNotes     15 Nov 2005 09:27:19 -0000      1.147.2.9
++++++ ReleaseNotes     22 Nov 2005 10:42:15 -0000
+++@@ -1,10 +1,21 @@
+++ 
+++-          Release Notes for Bacula 1.38.1
++++          Release Notes for Bacula 1.38.2
+++ 
+++   Bacula code: Total files = 420 Total lines = 138,440 (*.h *.c *.in)
+++       20,440 additional lines of code since version 1.36.3
+++ 
+++-Changes since 1.38.0:
++++Changes to 1.38.2:
++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
++++- Fix bnet-server bug found on OpenBSD. Bug #486
++++- Fix cancel failure bug. Bug #481
++++- Fix failure when Pool name has spaces. Bug #487   
++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
++++- Fix a couple of free()s in src/filed/acl.c
++++- Fix memory overrun in bfile.c in building OS X resource
++++  fork filename. Bug #489 
++++- Add Pool name to SD status output.
++++
++++Changes to 1.38.1:
+++ - Corrected ACL for Solaris (David Duchscher and Attila Fulop).
+++ - Add bacula_mail_summary.sh to examples directory. It makes
+++   a single email summary of any number of jobs. Submitted
+++Index: configure
+++===================================================================
+++RCS file: /cvsroot/bacula/bacula/configure,v
+++retrieving revision 1.203.2.5
+++diff -u -r1.203.2.5 configure
+++--- configure        13 Nov 2005 10:51:17 -0000      1.203.2.5
++++++ configure        22 Nov 2005 10:42:19 -0000
+++@@ -14948,7 +14948,7 @@
+++   PYTHON_LIBS=
+++   if test "$withval" != "no"; then
+++      if test "$withval" = "yes"; then
+++-    for python_root in /usr /usr/local; do
++++    for python_root in /usr /usr/local /usr/sfw; do
+++       if test -f $python_root/include/python2.2/Python.h; then
+++          PYTHON_INCDIR=-I$python_root/include/python2.2
+++          PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
+++Index: kernstodo
+++===================================================================
+++RCS file: /cvsroot/bacula/bacula/kernstodo,v
+++retrieving revision 1.570.2.6
+++diff -u -r1.570.2.6 kernstodo
+++--- kernstodo        4 Nov 2005 09:16:49 -0000       1.570.2.6
++++++ kernstodo        22 Nov 2005 10:42:20 -0000
+++@@ -1,5 +1,5 @@
+++                     Kern's ToDo List
+++-                     03 November 2005
++++                     21 November 2005
+++ 
+++ Major development:      
+++ Project                     Developer
+++@@ -7,8 +7,6 @@
+++ Version 1.37                Kern (see below)
+++ ========================================================
+++ 
+++-Final items for 1.37 before release:
+++-
+++ Document:
+++ - Does ClientRunAfterJob fail the job on a bad return code?
+++ - Document cleaning up the spool files:
+++@@ -18,6 +16,8 @@
+++ - Does WildFile match against full name?  Doc.
+++ 
+++ For 1.39:
++++- Make sure that all do_prompt() calls in Dir check for
++++  -1 (error) and -2 (cancel) returns.
+++ - Look at -D_FORTIFY_SOURCE=2
+++ - Add Win32 FileSet definition somewhere
+++ - Look at fixing restore status stats in SD.
+++@@ -27,6 +27,12 @@
+++   encountered, read many times (as it currently does), and if the
+++   block cannot be read, skip to the next block, and try again.  If
+++   that fails, skip to the next file and try again, ...
++++- Add level table:
++++  create table LevelType (LevelType binary(1), LevelTypeLong tinyblob);
++++  insert into LevelType (LevelType,LevelTypeLong) values
++++  ("F","Full"),
++++  ("D","Diff"),
++++  ("I","Inc");
+++ - Add ACL to restore only to original location.
+++ - Add a recursive mark command (rmark) to restore.
+++ - "Minimum Job Interval = nnn" sets minimum interval between Jobs
+++@@ -1246,219 +1252,4 @@
+++ ====
+++ 
+++ 
+++-=== Done
+++-- Save mount point for directories not traversed with onefs=yes.
+++-- Add seconds to start and end times in the Job report output.
+++-- if 2 concurrent backups are attempted on the same tape
+++-  drive (autoloader) into different tape pools, one of them will exit
+++-  fatally instead of halting until the drive is idle
+++-- Update StartTime if job held in Job Queue.
+++-- Look at www.nu2.nu/pebuilder as a helper for full windows
+++-  bare metal restore. (done by Scott)
+++-- Fix orphanned buffers:
+++-   Orphaned buffer:      24 bytes allocated at line 808 of rufus-dir job.c
+++-   Orphaned buffer:      40 bytes allocated at line 45 of rufus-dir alist.c
+++-- Implement Preben's suggestion to add
+++-  File System Types = ext2, ext3 
+++-  to FileSets, thus simplifying backup of *all* local partitions.
+++-- Try to open a device on each Job if it was not opened
+++-  when the SD started.
+++-- Add dump of VolSessionId/Time and FileIndex with bls.
+++-- If Bacula does not find the right tape in the Autochanger,
+++-  then mark the tape in error and move on rather than asking
+++-  for operator intervention.
+++-- Cancel command should include JobId in list of Jobs.
+++-- Add performance testing hooks
+++-- Bootstrap from JobMedia records.
+++-- Implement WildFile and WildDir to solve problem of 
+++-  saving only *.doc files.
+++-- Fix
+++-   Please use the "label"  command to create a new Volume for:
+++-       Storage:      DDS-4-changer
+++-       Media type:   
+++-       Pool:         Default
+++-   label
+++-   The defined Storage resources are:
+++-- Copy Changer Device and Changer Command from Autochanger
+++-  to Device resource in SD if none given in Device resource.
+++-- 1. Automatic use of more than one drive in an autochanger (done)
+++-- 2. Automatic selection of the correct drive for each Job (i.e.
+++-     selects a drive with an appropriate Volume for the Job) (done)
+++-- 6. Allow multiple simultaneous Jobs referencing the same pool write
+++-    to several tapes (some new directive(s) are are probably needed for
+++-    this) (done)
+++-- Locking (done)
+++-- Key on Storage rather than Pool (done)
+++-- Allow multiple drives to use same Pool (change jobq.c DIR) (done).
+++-- Synchronize multiple drives so that not more
+++-  than one loads a tape and any time (done)
+++-- 4. Use Changer Device and Changer Command specified in the
+++-     Autochanger resource, if none is found in the Device resource.
+++-    You can continue to specify them in the Device resource if you want
+++-    or need them to be different for each device.
+++-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") 
+++-    that can allow a Device be part of an Autochanger, and hence the changer
+++-    script protected, but if set to no, will prevent the Device from being 
+++-    automatically selected from the changer. This allows the device to
+++-    be directly accessed through its Device name, but not through the
+++-    AutoChanger name.
+++-#6   Select one from among Multiple Storage Devices for Job
+++-#5   Events that call a Python program 
+++-     (Implemented in Dir/SD)
+++-- Make sure the Device name is in the Query packet returned.
+++-- Don't start a second file job if one is already running.
+++-- Implement EOF/EOV labels for ANSI labels
+++-- Implement IBM labels.
+++-- When Python creates a new label, the tape is immediately
+++-  recycled and no label created. This happens when using   
+++-  autolabeling -- even when Python doesn't generate the name.
+++-- Scratch Pool where the volumes can be re-assigned to any Pool.
+++-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) 
+++-  is busy reading. Job 6 canceled.
+++-- Remove separate thread for opening devices in SD.  On the other
+++-  hand, don't block waiting for open() for devices.
+++-- Fix code to either handle updating NumVol or to calculate it in
+++-  Dir next_vol.c
+++-- Ensure that you cannot exclude a directory or a file explicitly
+++-  Included with File.
+++-#4   Embedded Python Scripting 
+++-     (Implemented in Dir/SD/FD)
+++-- Add Python writable variable for changing the Priority,
+++-    Client, Storage, JobStatus (error), ...
+++-- SD Python
+++-  - Solicit Events
+++-- Add disk seeking on restore; turn off seek on tapes.
+++-  stored/match_bsr.c
+++-- Look at dird_conf.c:1000: warning: `int size' 
+++-  might be used uninitialized in this function
+++-- Indicate when a Job is purged/pruned during restore.
+++-- Implement some way to turn off automatic pruning in Jobs.
+++-- Implement a way an Admin Job can prune, possibly multiple
+++-  clients -- Python script?
+++-- Look at Preben's acl.c error handling code.
+++-- SD crashes after a tape restore then doing a backup. 
+++-- If drive is opened read/write, close it and re-open
+++-  read-only if doing a restore, and vice-versa.
+++-- Windows restore:
+++-  data-fd: RestoreFiles.2004-12-07_15.56.42 Error:
+++-  > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der
+++-  > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen
+++-  > Prozess verwendet wird.
+++-  Restore restores all files, but then fails at the end trying
+++-  to set the attributes of e:
+++-  from failed jobs.- Resolve the problem between Device name and Archive name,
+++-  and fix SD messages.
+++-- Tell the "restore" user when browsing is no longer possible.
+++-- Add a restore directory-x
+++-- Write non-optimized bsrs from the JobMedia and Media records,
+++-  even after Files are pruned.
+++-- Delete Stripe and Copy from VolParams to save space.
+++-- Fix option 2 of restore -- list where file is backed up -- require Client,
+++-  then list last 20 backups.
+++-- Finish implementation of passing all Storage and Device needs to
+++-  the SD.
+++-- Move test for max wait time exceeded in job.c up -- Peter's idea.
+++-##   Consider moving docs to their own project.
+++-##   Move rescue to its own project.
+++-- Add client version to the Client name line that prints in
+++-  the Job report.
+++-- Fix the Rescue CDROM.
+++-- By the way: on page http://www.bacula.org/?page=tapedrives , at the 
+++-  bottom, the link to "Tape Testing Chapter" is broken. It goes to 
+++-  /html-manual/... while the others point to /rel-manual/...
+++-- Device resource needs the "name" of the SD.
+++-- Specify a single directory to restore.
+++-- Implement MediaType keyword in bsr?   
+++-- Add a date and time stamp at the beginning of every line in the 
+++-  Job report (Volker Sauer).
+++-- Add level to estimate command.
+++-- Add "limit=n" for "list jobs"
+++-- Make bootstrap filename unique.
+++-- Make Dmsg look at global before calling subroutine.
+++-- From Chris Hull:
+++-   it seems to be complaining about 12:00pm which should be a valid 12
+++-   hour time.  I changed the time to 11:59am and everything works fine.
+++-   Also 12:00am works fine.  0:00pm also works (which I don't think
+++-   should).  None of the values 12:00pm - 12:59pm work for that matter.
+++-- Require restore via the restore command or make a restore Job
+++-  get the bootstrap file.
+++-- Implement Maximum Job Spool Size
+++-- Fix 3993 error in SD. It forgets to look at autochanger
+++-  resource for device command, ...
+++-- 3. Prevent two drives requesting the same Volume in any given
+++-     autochanger, by checking if a Volume is mounted on another drive
+++-     in an Autochanger.
+++-- Upgrade to MySQL 4.1.12 See:  
+++-  http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html
+++-- Add # Job Level date to bsr file
+++-- Implement "PreferMountedVolumes = yes|no" in Job resource.
+++-##   Integrate web-bacula into a new Bacula project with
+++-     bimagemgr.
+++-- Cleaning tapes should have Status "Cleaning" rather than append.
+++-- Make sure that Python has access to Client address/port so that
+++-  it can check if Clients are alive.
+++-- Review all items in "restore".
+++-- Fix PostgreSQL GROUP BY problems in restore.
+++-- Fix PostgreSQL sql problems in bugs.
+++-- After rename
+++-  04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume 
+++-     "DLT-13Feb04".
+++-  Current Volume "DLT-04Jul05" not acceptable because:
+++-  1997 Volume "DLT-13Feb04" not in catalog.
+++-  04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device 
+++-     "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02
+++-##   Create a new GUI chapter explaining all the GUI programs.
+++--    Make "update slots" when pointing to Autochanger, remove
+++-     all Volumes from other drives.  "update slots all-drives"?
+++-     No, this is done by modifying mtx-changer to list what is
+++-     in the drives.
+++-- Finish TLS implementation.
+++-- Port limiting -m in iptables to prevent DoS attacks
+++-  could cause broken pipes on Bacula.
+++-6. Build and test the Volume Shadow Copy (VSS) for Win32. 
+++--  Allow cancel of unknown Job
+++--  State not saved when closing Win32 FD by icon
+++--  bsr-opt-test fails. bsr deleted. Fix.
+++--  Move Python daemon variables from Job to Bacula object.
+++-   WorkingDir, ConfigFile
+++-- Document that Bootstrap files can be written with cataloging
+++-  turned off.
+++-- Document details of ANSI/IBM labels
+++-- OS linux 2.4
+++-  1) ADIC, DLT, FastStor 4000, 7*20GB
+++-- Linux Sony LIB-D81, AIT-3 library works.
+++-- Doc the following
+++-  to activate, check or disable the hardware compression feature on my 
+++-  exb-8900 i use the exabyte "MammothTool" you can get it here:
+++-  http://www.exabyte.com/support/online/downloads/index.cfm
+++-  There is a solaris version of this tool. With option -C 0 or 1 you can 
+++-  disable or activate compression. Start this tool without any options for 
+++-  a small reference.
+++-- Document Heartbeat Interval in the dealing with firewalls section.
+++-- Document new CDROM directory.
+++-- On Win32 working directory must have drive letter ????
+++-- On Win32 working directory must be writable by SYSTEM to
+++-  do restores.
+++-- Document that ChangerDevice is used for Alert command.
+++-- Add better documentation on how restores can be done
+++-8. Take one more try at making DVD writing work (no go)
+++-7. Write a bacula-web document
+++-- Why isn't the DEVICE structure defined when doing
+++-  a reservation?
+++-- Multi-drive changer seems to only use drive 0
+++-  Multiple drives don't seem to be opened.
+++-- My database is growing
+++-- Call GetLastError() in the berrno constructor rather
+++-  than delaying until strerror.
+++-- Tape xxx in drive 0, requested in drive 1
+++-- The mount command does not work with drives other than 0.
+++-- A mount should cause the SD to re-examine what Slot is   
+++-  loaded.
+++-- The SD locks on to the first available drive then
+++-  wants a Volume that is released but in another drive --
+++-  chaos.
+++-- Run the regression scripts on Solaris and FreeBSD
+++--  Figure out how to package gui, and rescue programs.
+++-- Add a .dir command to restore tree code to eliminate the problem
+++-- Mount after manually unloading changer causes hang in SD
+++-- Fix JobACL with restore by JobId.
++++=== Done -- see kernsdone
+++Index: kes-1.38
+++===================================================================
+++RCS file: /cvsroot/bacula/bacula/kes-1.38,v
+++retrieving revision 1.1.2.13
+++diff -u -r1.1.2.13 kes-1.38
+++--- kes-1.38 14 Nov 2005 20:20:38 -0000      1.1.2.13
++++++ kes-1.38 22 Nov 2005 10:42:20 -0000
+++@@ -3,6 +3,19 @@
+++ 
+++ General:
+++ 
++++Changes to 1.38.2:
++++20Oct05
++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
++++  says this does not fix *his* bug).
++++- Fix cancel failure bug. Bug #481
++++- Fix failure when Pool name has spaces. Bug #487   
++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
++++- Fix a couple of free()s in src/filed/acl.c
++++- Fix memory overrun in bfile.c in building OS X resource
++++  fork filename. Bug #489 
++++- Add Pool name to SD status output.
++++
+++ Changes to 1.38.1:
+++ 14Oct05
+++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
+++Index: projects
+++===================================================================
+++RCS file: /cvsroot/bacula/bacula/projects,v
+++retrieving revision 1.12.2.3
+++diff -u -r1.12.2.3 projects
+++--- projects 10 Nov 2005 20:25:27 -0000      1.12.2.3
++++++ projects 22 Nov 2005 10:42:20 -0000
+++@@ -228,7 +228,175 @@
+++ 
+++   Why:    Performance enhancement.
+++ 
++++Item 13:  Let Bacula log tape usage and handle drive cleaning cycles.
++++  Date:   November 11, 2005
++++  Origin: Arno Lehmann <al at its-lehmann dot de>
++++  Status:
++++
++++  What:   Make Bacula manage tape life cycle information and drive 
++++          cleaning cycles.
++++
++++  Why:    Both parts of this project are important when operating backups.
++++          We need to know which tapes need replacement, and we need to
++++          make sure the drives are cleaned when necessary.  While many
++++          tape libraries and even autoloaders can handle all this
++++          automatically, support by Bacula can be helpful for smaller
++++          (older) libraries and single drives.  Also, checking drive
++++          status during operation can prevent some failures (as I had to
++++          learn the hard way...)
++++
++++  Notes:  First, Bacula could (and even does, to some limited extent)
++++          record tape and drive usage.  For tapes, the number of mounts,
++++          the amount of data, and the time the tape has actually been
++++          running could be recorded.  Data fields for Read and Write time
++++          and Nmber of mounts already exist in the catalog (I'm not sure
++++          if VolBytes is the sum of all bytes ever written to that volume
++++          by Bacula).  This information can be important when determining
++++          which media to replace.  For the tape drives known to Bacula,
++++          similar information is interesting to determine the device
++++          status and expected life time: Time it's been Reading and
++++          Writing, number of tape Loads / Unloads / Errors.  This
++++          information is not yet recorded as far as I know.
++++
++++          The next step would be implementing drive cleaning setup.
++++          Bacula already has knowledge about cleaning tapes.  Once it has
++++          some information about cleaning cycles (measured in drive run
++++          time, number of tapes used, or calender days, for example) it
++++          can automatically execute tape cleaning (with an autochanger,
++++          obviously) or ask for operator assistence loading a cleaning
++++          tape.
++++
++++          The next step would be to implement TAPEALERT checks not only
++++          when changing tapes and only sending he information to the
++++          administrator, but rather checking after each tape error,
++++          checking on a regular basis (for example after each tape file),
++++          and also before unloading and after loading a new tape.  Then,
++++          depending on the drives TAPEALERT state and the know drive
++++          cleaning state Bacula could automatically schedule later
++++          cleaning, clean immediately, or inform the operator.
++++
++++          Implementing this would perhaps require another catalog change
++++          and perhaps major changes in SD code and the DIR-SD protocoll,
++++          so I'd only consider this worth implementing if it would
++++          actually be used or even needed by many people. 
++++
++++Item 14:  Merging of multiple backups into a single one. (Also called Synthetic
++++          Backup or Consolidation).
++++
++++  Origin: Marc Cousin and Eric Bollengier 
++++  Date:   15 November 2005
++++  Status: Depends on first implementing project Item 1 (Migration).
++++
++++  What:   A merged backup is a backup made without connecting to the Client.
++++          It would be a Merge of existing backups into a single backup.
++++          In effect, it is like a restore but to the backup medium.
++++
++++          For instance, say that last sunday we made a full backup.  Then
++++          all week long, we created incremental backups, in order to do
++++          them fast.  Now comes sunday again, and we need another full.
++++          The merged backup makes it possible to do instead an incremental
++++          backup (during the night for instance), and then create a merged
++++          backup during the day, by using the full and incrementals from
++++          the week.  The merged backup will be exactly like a full made
++++          sunday night on the tape, but the production interruption on the
++++          Client will be minimal, as the Client will only have to send
++++          incrementals.
++++
++++          In fact, if it's done correctly, you could merge all the
++++          Incrementals into single Incremental, or all the Incrementals
++++          and the last Differential into a new Differential, or the Full,
++++          last differential and all the Incrementals into a new Full
++++          backup.  And there is no need to involve the Client.
++++
++++  Why:    The benefit is that :
++++          - the Client just does an incremental ;
++++          - the merged backup on tape is just as a single full backup,
++++            and can be restored very fast.
++++
++++          This is also a way of reducing the backup data since the old
++++          data can then be pruned (or not) from the catalog, possibly
++++          allowing older volumes to be recycled
++++
++++Item 15:  Automatic disabling of devices
++++   Date:   2005-11-11
++++   Origin: Peter Eriksson <peter at ifm.liu dot se>
++++   Status:
++++
++++   What:  After a configurable amount of fatal errors with a tape drive
++++          Bacula should automatically disable further use of a certain
++++          tape drive. There should also be "disable"/"enable" commands in
++++          the "bconsole" tool.
++++
++++   Why:   On a multi-drive jukebox there is a possibility of tape drives
++++          going bad during large backups (needing a cleaning tape run,
++++          tapes getting stuck). It would be advantageous if Bacula would
++++          automatically disable further use of a problematic tape drive
++++          after a configurable amount of errors has occured.
++++
++++          An example: I have a multi-drive jukebox (6 drives, 380+ slots)
++++          where tapes occasionally get stuck inside the drive. Bacula will
++++          notice that the "mtx-changer" command will fail and then fail
++++          any backup jobs trying to use that drive. However, it will still
++++          keep on trying to run new jobs using that drive and fail -
++++          forever, and thus failing lots and lots of jobs... Since we have
++++          many drives Bacula could have just automatically disabled
++++          further use of that drive and used one of the other ones
++++          instead.
++++
++++
++++Item 16:  Directive/mode to backup only file changes, not entire file
++++  Date:   11 November 2005
++++  Origin: Joshua Kugler <joshua dot kugler at uaf dot edu>
++++          Marek Bajon <mbajon at bimsplus dot com dot pl>
++++  Status: RFC
++++
++++  What:   Currently when a file changes, the entire file will be backed up in
++++          the next incremental or full backup.  To save space on the tapes
++++          it would be nice to have a mode whereby only the changes to the
++++          file would be backed up when it is changed.
++++
++++  Why:    This would save lots of space when backing up large files such as 
++++          logs, mbox files, Outlook PST files and the like.
++++
++++  Notes:  This would require the usage of disk-based volumes as comparing 
++++          files would not be feasible using a tape drive.
++++
++++Item 17:  Quick release of FD-SD connection
++++  Origin: Frank Volf (frank at deze dot org)
++++  Date:   17 november 2005
++++  Status:
++++
++++   What:  In the bacula implementation a backup is finished after all data
++++          and attributes are succesfully written to storage.  When using a
++++          tape backup it is very annoying that a backup can take a day,
++++          simply because the current tape (or whatever) is full and the
++++          administrator has not put a new one in.  During that time the
++++          system cannot be taken off-line, because there is still an open
++++          session between the storage daemon and the file daemon on the
++++          client.
++++
++++          Although this is a very good strategey for making "safe backups"
++++          This can be annoying for e.g.  laptops, that must remain
++++          connected until the bacukp is completed.
++++
++++          Using a new feature called "migration" it will be possible to
++++          spool first to harddisk (using a special 'spool' migration
++++          scheme) and then migrate the backup to tape.
++++
++++          There is still the problem of getting the attributes committed.
++++          If it takes a very long time to do, with the current code, the
++++          job has not terminated, and the File daemon is not freed up.  The
++++          Storage daemon should release the File daemon as soon as all the
++++          file data and all the attributes have been sent to it (the SD).
++++          Currently the SD waits until everything is on tape and all the
++++          attributes are transmitted to the Director before signalling
++++          completion to the FD. I don't think I would have any problem
++++          changing this.  The reason is that even if the FD reports back to
++++          the Dir that all is OK, the job will not terminate until the SD
++++          has done the same thing -- so in a way keeping the SD-FD link
++++          open to the very end is not really very productive ...
+++ 
++++   Why:   Makes backup of laptops much easier.
+++ 
+++ 
+++ ============= Empty RFC form ===========
+++@@ -245,33 +413,4 @@
+++ ============== End RFC form ==============
+++ 
+++ 
+++-Items completed for release 1.38.0:
+++-#4   Embedded Python Scripting (implemented in all Daemons)
+++-#5   Events that call a Python program (Implemented in all
+++-       daemons, but more cleanup work to be done).
+++-#6   Select one from among Multiple Storage Devices for Job.
+++-       This is already implemented in 1.37.
+++-#7   Single Job Writing to Multiple Storage Devices. This is
+++-       currently implemented with a Clone feature.
+++-#-   Full multiple drive Autochanger support (done in 1.37)
+++-#-   Built in support for communications encryption (TLS) 
+++-       done by Landon Fuller.
+++-#    Support for Unicode characters
+++-       (via UTF-8) on Win32 machines thanks to Thorsten Engel.
+++-Item  8:  Break the one-to-one Relationship between a Job and a
+++-          Specific Storage Device (or Devices if #10 is implemented).
+++-
+++-Completed items from last year's list:
+++-Item 1:   Multiple simultaneous Jobs. (done)
+++-Item 3:   Write the bscan program -- also write a bcopy program (done).
+++-Item 5:   Implement Label templates (done).
+++-Item 6:   Write a regression script (done)
+++-Item 9:   Add SSL to daemon communications (done by Landon Fuller)
+++-Item 10:  Define definitive tape format (done)
+++-Item 3:   GUI for interactive restore. Partially Implemented in 1.34
+++-          Note, there is now a complete Webmin plugin, a partial
+++-          GNOME console, and an excellent wx-console GUI.
+++-Item 4:   GUI for interactive backup
+++-Item 2:   Job Data Spooling.
+++-    Done: Regular expression matching.
+++-Item 10:  New daemon communication protocol (this has been dropped).
++++Items completed for release 1.38.0 -- see kernsdone
+++Index: autoconf/configure.in
+++===================================================================
+++RCS file: /cvsroot/bacula/bacula/autoconf/configure.in,v
+++retrieving revision 1.184.2.4
+++diff -u -r1.184.2.4 configure.in
+++--- autoconf/configure.in    13 Nov 2005 10:51:17 -0000      1.184.2.4
++++++ autoconf/configure.in    22 Nov 2005 10:42:21 -0000
+++@@ -604,7 +604,7 @@
+++   PYTHON_LIBS=
+++   if test "$withval" != "no"; then
+++      if test "$withval" = "yes"; then
+++-    for python_root in /usr /usr/local; do
++++    for python_root in /usr /usr/local /usr/sfw; do
+++       if test -f $python_root/include/python2.2/Python.h; then
+++          PYTHON_INCDIR=-I$python_root/include/python2.2
+++          PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
+++Index: patches/1.38.1-to-1.38.2.patch
+++===================================================================
+++RCS file: patches/1.38.1-to-1.38.2.patch
+++diff -N patches/1.38.1-to-1.38.2.patch
+++--- /dev/null        1 Jan 1970 00:00:00 -0000
++++++ patches/1.38.1-to-1.38.2.patch   22 Nov 2005 10:42:22 -0000
+++@@ -0,0 +1,4586 @@
++++
++++ This patch fixes the following bugs:
++++
++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
++++  says that this patch does not fix his problem)
++++- Fix cancel failure bug. Bug #481
++++- Fix failure when Pool name has spaces. Bug #487
++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
++++- Fix a couple of free()s in src/filed/acl.c
++++- Fix memory overrun in bfile.c in building OS X resource
++++  fork filename. Bug #489
++++
++++This patch is applied to Bacula source version 1.38.1 and will
++++produce Bacula source version 1.38.2.  Apply it with:
++++
++++   cd <bacula-1.38.1-source>
++++   ./configure (your options) if not already done
++++   patch -p0 <1.38.1-to-1.38.2.patch
++++   make
++++   make install
++++
++++? osx_finder.patch
++++Index: ChangeLog
++++===================================================================
++++RCS file: /cvsroot/bacula/bacula/ChangeLog,v
++++retrieving revision 1.154.2.7
++++diff -u -r1.154.2.7 ChangeLog
++++--- ChangeLog       15 Nov 2005 09:27:19 -0000      1.154.2.7
+++++++ ChangeLog       21 Nov 2005 18:19:03 -0000
++++@@ -1,4 +1,14 @@
++++ 
+++++Changes to 1.38.2:
+++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
+++++- Fix bnet-server bug found on OpenBSD. Bug #486
+++++- Fix cancel failure bug. Bug #481
+++++- Fix failure when Pool name has spaces. Bug #487   
+++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
+++++- Fix a couple of free()s in src/filed/acl.c
+++++- Fix memory overrun in bfile.c in building OS X resource
+++++  fork filename. Bug #489 
+++++- Add Pool name to SD status output.
++++ 
++++ Changes to 1.38.1:
++++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
++++Index: ReleaseNotes
++++===================================================================
++++RCS file: /cvsroot/bacula/bacula/ReleaseNotes,v
++++retrieving revision 1.147.2.9
++++diff -u -r1.147.2.9 ReleaseNotes
++++--- ReleaseNotes    15 Nov 2005 09:27:19 -0000      1.147.2.9
+++++++ ReleaseNotes    21 Nov 2005 18:19:04 -0000
++++@@ -1,10 +1,21 @@
++++ 
++++-          Release Notes for Bacula 1.38.1
+++++          Release Notes for Bacula 1.38.2
++++ 
++++   Bacula code: Total files = 420 Total lines = 138,440 (*.h *.c *.in)
++++       20,440 additional lines of code since version 1.36.3
++++ 
++++-Changes since 1.38.0:
+++++Changes to 1.38.2:
+++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
+++++- Fix bnet-server bug found on OpenBSD. Bug #486
+++++- Fix cancel failure bug. Bug #481
+++++- Fix failure when Pool name has spaces. Bug #487   
+++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
+++++- Fix a couple of free()s in src/filed/acl.c
+++++- Fix memory overrun in bfile.c in building OS X resource
+++++  fork filename. Bug #489 
+++++- Add Pool name to SD status output.
+++++
+++++Changes to 1.38.1:
++++ - Corrected ACL for Solaris (David Duchscher and Attila Fulop).
++++ - Add bacula_mail_summary.sh to examples directory. It makes
++++   a single email summary of any number of jobs. Submitted
++++Index: kernstodo
++++===================================================================
++++RCS file: /cvsroot/bacula/bacula/kernstodo,v
++++retrieving revision 1.570.2.6
++++diff -u -r1.570.2.6 kernstodo
++++--- kernstodo       4 Nov 2005 09:16:49 -0000       1.570.2.6
+++++++ kernstodo       21 Nov 2005 18:19:04 -0000
++++@@ -1,5 +1,5 @@
++++                     Kern's ToDo List
++++-                     03 November 2005
+++++                     21 November 2005
++++ 
++++ Major development:      
++++ Project                     Developer
++++@@ -7,8 +7,6 @@
++++ Version 1.37                Kern (see below)
++++ ========================================================
++++ 
++++-Final items for 1.37 before release:
++++-
++++ Document:
++++ - Does ClientRunAfterJob fail the job on a bad return code?
++++ - Document cleaning up the spool files:
++++@@ -18,6 +16,8 @@
++++ - Does WildFile match against full name?  Doc.
++++ 
++++ For 1.39:
+++++- Make sure that all do_prompt() calls in Dir check for
+++++  -1 (error) and -2 (cancel) returns.
++++ - Look at -D_FORTIFY_SOURCE=2
++++ - Add Win32 FileSet definition somewhere
++++ - Look at fixing restore status stats in SD.
++++@@ -27,6 +27,12 @@
++++   encountered, read many times (as it currently does), and if the
++++   block cannot be read, skip to the next block, and try again.  If
++++   that fails, skip to the next file and try again, ...
+++++- Add level table:
+++++  create table LevelType (LevelType binary(1), LevelTypeLong tinyblob);
+++++  insert into LevelType (LevelType,LevelTypeLong) values
+++++  ("F","Full"),
+++++  ("D","Diff"),
+++++  ("I","Inc");
++++ - Add ACL to restore only to original location.
++++ - Add a recursive mark command (rmark) to restore.
++++ - "Minimum Job Interval = nnn" sets minimum interval between Jobs
++++@@ -1246,219 +1252,4 @@
++++ ====
++++ 
++++ 
++++-=== Done
++++-- Save mount point for directories not traversed with onefs=yes.
++++-- Add seconds to start and end times in the Job report output.
++++-- if 2 concurrent backups are attempted on the same tape
++++-  drive (autoloader) into different tape pools, one of them will exit
++++-  fatally instead of halting until the drive is idle
++++-- Update StartTime if job held in Job Queue.
++++-- Look at www.nu2.nu/pebuilder as a helper for full windows
++++-  bare metal restore. (done by Scott)
++++-- Fix orphanned buffers:
++++-   Orphaned buffer:      24 bytes allocated at line 808 of rufus-dir job.c
++++-   Orphaned buffer:      40 bytes allocated at line 45 of rufus-dir alist.c
++++-- Implement Preben's suggestion to add
++++-  File System Types = ext2, ext3 
++++-  to FileSets, thus simplifying backup of *all* local partitions.
++++-- Try to open a device on each Job if it was not opened
++++-  when the SD started.
++++-- Add dump of VolSessionId/Time and FileIndex with bls.
++++-- If Bacula does not find the right tape in the Autochanger,
++++-  then mark the tape in error and move on rather than asking
++++-  for operator intervention.
++++-- Cancel command should include JobId in list of Jobs.
++++-- Add performance testing hooks
++++-- Bootstrap from JobMedia records.
++++-- Implement WildFile and WildDir to solve problem of 
++++-  saving only *.doc files.
++++-- Fix
++++-   Please use the "label"  command to create a new Volume for:
++++-       Storage:      DDS-4-changer
++++-       Media type:   
++++-       Pool:         Default
++++-   label
++++-   The defined Storage resources are:
++++-- Copy Changer Device and Changer Command from Autochanger
++++-  to Device resource in SD if none given in Device resource.
++++-- 1. Automatic use of more than one drive in an autochanger (done)
++++-- 2. Automatic selection of the correct drive for each Job (i.e.
++++-     selects a drive with an appropriate Volume for the Job) (done)
++++-- 6. Allow multiple simultaneous Jobs referencing the same pool write
++++-    to several tapes (some new directive(s) are are probably needed for
++++-    this) (done)
++++-- Locking (done)
++++-- Key on Storage rather than Pool (done)
++++-- Allow multiple drives to use same Pool (change jobq.c DIR) (done).
++++-- Synchronize multiple drives so that not more
++++-  than one loads a tape and any time (done)
++++-- 4. Use Changer Device and Changer Command specified in the
++++-     Autochanger resource, if none is found in the Device resource.
++++-    You can continue to specify them in the Device resource if you want
++++-    or need them to be different for each device.
++++-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") 
++++-    that can allow a Device be part of an Autochanger, and hence the changer
++++-    script protected, but if set to no, will prevent the Device from being 
++++-    automatically selected from the changer. This allows the device to
++++-    be directly accessed through its Device name, but not through the
++++-    AutoChanger name.
++++-#6   Select one from among Multiple Storage Devices for Job
++++-#5   Events that call a Python program 
++++-     (Implemented in Dir/SD)
++++-- Make sure the Device name is in the Query packet returned.
++++-- Don't start a second file job if one is already running.
++++-- Implement EOF/EOV labels for ANSI labels
++++-- Implement IBM labels.
++++-- When Python creates a new label, the tape is immediately
++++-  recycled and no label created. This happens when using   
++++-  autolabeling -- even when Python doesn't generate the name.
++++-- Scratch Pool where the volumes can be re-assigned to any Pool.
++++-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) 
++++-  is busy reading. Job 6 canceled.
++++-- Remove separate thread for opening devices in SD.  On the other
++++-  hand, don't block waiting for open() for devices.
++++-- Fix code to either handle updating NumVol or to calculate it in
++++-  Dir next_vol.c
++++-- Ensure that you cannot exclude a directory or a file explicitly
++++-  Included with File.
++++-#4   Embedded Python Scripting 
++++-     (Implemented in Dir/SD/FD)
++++-- Add Python writable variable for changing the Priority,
++++-    Client, Storage, JobStatus (error), ...
++++-- SD Python
++++-  - Solicit Events
++++-- Add disk seeking on restore; turn off seek on tapes.
++++-  stored/match_bsr.c
++++-- Look at dird_conf.c:1000: warning: `int size' 
++++-  might be used uninitialized in this function
++++-- Indicate when a Job is purged/pruned during restore.
++++-- Implement some way to turn off automatic pruning in Jobs.
++++-- Implement a way an Admin Job can prune, possibly multiple
++++-  clients -- Python script?
++++-- Look at Preben's acl.c error handling code.
++++-- SD crashes after a tape restore then doing a backup. 
++++-- If drive is opened read/write, close it and re-open
++++-  read-only if doing a restore, and vice-versa.
++++-- Windows restore:
++++-  data-fd: RestoreFiles.2004-12-07_15.56.42 Error:
++++-  > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der
++++-  > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen
++++-  > Prozess verwendet wird.
++++-  Restore restores all files, but then fails at the end trying
++++-  to set the attributes of e:
++++-  from failed jobs.- Resolve the problem between Device name and Archive name,
++++-  and fix SD messages.
++++-- Tell the "restore" user when browsing is no longer possible.
++++-- Add a restore directory-x
++++-- Write non-optimized bsrs from the JobMedia and Media records,
++++-  even after Files are pruned.
++++-- Delete Stripe and Copy from VolParams to save space.
++++-- Fix option 2 of restore -- list where file is backed up -- require Client,
++++-  then list last 20 backups.
++++-- Finish implementation of passing all Storage and Device needs to
++++-  the SD.
++++-- Move test for max wait time exceeded in job.c up -- Peter's idea.
++++-##   Consider moving docs to their own project.
++++-##   Move rescue to its own project.
++++-- Add client version to the Client name line that prints in
++++-  the Job report.
++++-- Fix the Rescue CDROM.
++++-- By the way: on page http://www.bacula.org/?page=tapedrives , at the 
++++-  bottom, the link to "Tape Testing Chapter" is broken. It goes to 
++++-  /html-manual/... while the others point to /rel-manual/...
++++-- Device resource needs the "name" of the SD.
++++-- Specify a single directory to restore.
++++-- Implement MediaType keyword in bsr?   
++++-- Add a date and time stamp at the beginning of every line in the 
++++-  Job report (Volker Sauer).
++++-- Add level to estimate command.
++++-- Add "limit=n" for "list jobs"
++++-- Make bootstrap filename unique.
++++-- Make Dmsg look at global before calling subroutine.
++++-- From Chris Hull:
++++-   it seems to be complaining about 12:00pm which should be a valid 12
++++-   hour time.  I changed the time to 11:59am and everything works fine.
++++-   Also 12:00am works fine.  0:00pm also works (which I don't think
++++-   should).  None of the values 12:00pm - 12:59pm work for that matter.
++++-- Require restore via the restore command or make a restore Job
++++-  get the bootstrap file.
++++-- Implement Maximum Job Spool Size
++++-- Fix 3993 error in SD. It forgets to look at autochanger
++++-  resource for device command, ...
++++-- 3. Prevent two drives requesting the same Volume in any given
++++-     autochanger, by checking if a Volume is mounted on another drive
++++-     in an Autochanger.
++++-- Upgrade to MySQL 4.1.12 See:  
++++-  http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html
++++-- Add # Job Level date to bsr file
++++-- Implement "PreferMountedVolumes = yes|no" in Job resource.
++++-##   Integrate web-bacula into a new Bacula project with
++++-     bimagemgr.
++++-- Cleaning tapes should have Status "Cleaning" rather than append.
++++-- Make sure that Python has access to Client address/port so that
++++-  it can check if Clients are alive.
++++-- Review all items in "restore".
++++-- Fix PostgreSQL GROUP BY problems in restore.
++++-- Fix PostgreSQL sql problems in bugs.
++++-- After rename
++++-  04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume 
++++-     "DLT-13Feb04".
++++-  Current Volume "DLT-04Jul05" not acceptable because:
++++-  1997 Volume "DLT-13Feb04" not in catalog.
++++-  04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device 
++++-     "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02
++++-##   Create a new GUI chapter explaining all the GUI programs.
++++--    Make "update slots" when pointing to Autochanger, remove
++++-     all Volumes from other drives.  "update slots all-drives"?
++++-     No, this is done by modifying mtx-changer to list what is
++++-     in the drives.
++++-- Finish TLS implementation.
++++-- Port limiting -m in iptables to prevent DoS attacks
++++-  could cause broken pipes on Bacula.
++++-6. Build and test the Volume Shadow Copy (VSS) for Win32. 
++++--  Allow cancel of unknown Job
++++--  State not saved when closing Win32 FD by icon
++++--  bsr-opt-test fails. bsr deleted. Fix.
++++--  Move Python daemon variables from Job to Bacula object.
++++-   WorkingDir, ConfigFile
++++-- Document that Bootstrap files can be written with cataloging
++++-  turned off.
++++-- Document details of ANSI/IBM labels
++++-- OS linux 2.4
++++-  1) ADIC, DLT, FastStor 4000, 7*20GB
++++-- Linux Sony LIB-D81, AIT-3 library works.
++++-- Doc the following
++++-  to activate, check or disable the hardware compression feature on my 
++++-  exb-8900 i use the exabyte "MammothTool" you can get it here:
++++-  http://www.exabyte.com/support/online/downloads/index.cfm
++++-  There is a solaris version of this tool. With option -C 0 or 1 you can 
++++-  disable or activate compression. Start this tool without any options for 
++++-  a small reference.
++++-- Document Heartbeat Interval in the dealing with firewalls section.
++++-- Document new CDROM directory.
++++-- On Win32 working directory must have drive letter ????
++++-- On Win32 working directory must be writable by SYSTEM to
++++-  do restores.
++++-- Document that ChangerDevice is used for Alert command.
++++-- Add better documentation on how restores can be done
++++-8. Take one more try at making DVD writing work (no go)
++++-7. Write a bacula-web document
++++-- Why isn't the DEVICE structure defined when doing
++++-  a reservation?
++++-- Multi-drive changer seems to only use drive 0
++++-  Multiple drives don't seem to be opened.
++++-- My database is growing
++++-- Call GetLastError() in the berrno constructor rather
++++-  than delaying until strerror.
++++-- Tape xxx in drive 0, requested in drive 1
++++-- The mount command does not work with drives other than 0.
++++-- A mount should cause the SD to re-examine what Slot is   
++++-  loaded.
++++-- The SD locks on to the first available drive then
++++-  wants a Volume that is released but in another drive --
++++-  chaos.
++++-- Run the regression scripts on Solaris and FreeBSD
++++--  Figure out how to package gui, and rescue programs.
++++-- Add a .dir command to restore tree code to eliminate the problem
++++-- Mount after manually unloading changer causes hang in SD
++++-- Fix JobACL with restore by JobId.
+++++=== Done -- see kernsdone
++++Index: kes-1.38
++++===================================================================
++++RCS file: /cvsroot/bacula/bacula/kes-1.38,v
++++retrieving revision 1.1.2.13
++++diff -u -r1.1.2.13 kes-1.38
++++--- kes-1.38        14 Nov 2005 20:20:38 -0000      1.1.2.13
+++++++ kes-1.38        21 Nov 2005 18:19:04 -0000
++++@@ -3,6 +3,19 @@
++++ 
++++ General:
++++ 
+++++Changes to 1.38.2:
+++++20Oct05
+++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
+++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
+++++  says this does not fix *his* bug).
+++++- Fix cancel failure bug. Bug #481
+++++- Fix failure when Pool name has spaces. Bug #487   
+++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
+++++- Fix a couple of free()s in src/filed/acl.c
+++++- Fix memory overrun in bfile.c in building OS X resource
+++++  fork filename. Bug #489 
+++++- Add Pool name to SD status output.
+++++
++++ Changes to 1.38.1:
++++ 14Oct05
++++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
++++Index: projects
++++===================================================================
++++RCS file: /cvsroot/bacula/bacula/projects,v
++++retrieving revision 1.12.2.3
++++diff -u -r1.12.2.3 projects
++++--- projects        10 Nov 2005 20:25:27 -0000      1.12.2.3
+++++++ projects        21 Nov 2005 18:19:05 -0000
++++@@ -228,7 +228,175 @@
++++ 
++++   Why:    Performance enhancement.
++++ 
+++++Item 13:  Let Bacula log tape usage and handle drive cleaning cycles.
+++++  Date:   November 11, 2005
+++++  Origin: Arno Lehmann <al at its-lehmann dot de>
+++++  Status:
+++++
+++++  What:   Make Bacula manage tape life cycle information and drive 
+++++          cleaning cycles.
+++++
+++++  Why:    Both parts of this project are important when operating backups.
+++++          We need to know which tapes need replacement, and we need to
+++++          make sure the drives are cleaned when necessary.  While many
+++++          tape libraries and even autoloaders can handle all this
+++++          automatically, support by Bacula can be helpful for smaller
+++++          (older) libraries and single drives.  Also, checking drive
+++++          status during operation can prevent some failures (as I had to
+++++          learn the hard way...)
+++++
+++++  Notes:  First, Bacula could (and even does, to some limited extent)
+++++          record tape and drive usage.  For tapes, the number of mounts,
+++++          the amount of data, and the time the tape has actually been
+++++          running could be recorded.  Data fields for Read and Write time
+++++          and Nmber of mounts already exist in the catalog (I'm not sure
+++++          if VolBytes is the sum of all bytes ever written to that volume
+++++          by Bacula).  This information can be important when determining
+++++          which media to replace.  For the tape drives known to Bacula,
+++++          similar information is interesting to determine the device
+++++          status and expected life time: Time it's been Reading and
+++++          Writing, number of tape Loads / Unloads / Errors.  This
+++++          information is not yet recorded as far as I know.
+++++
+++++          The next step would be implementing drive cleaning setup.
+++++          Bacula already has knowledge about cleaning tapes.  Once it has
+++++          some information about cleaning cycles (measured in drive run
+++++          time, number of tapes used, or calender days, for example) it
+++++          can automatically execute tape cleaning (with an autochanger,
+++++          obviously) or ask for operator assistence loading a cleaning
+++++          tape.
+++++
+++++          The next step would be to implement TAPEALERT checks not only
+++++          when changing tapes and only sending he information to the
+++++          administrator, but rather checking after each tape error,
+++++          checking on a regular basis (for example after each tape file),
+++++          and also before unloading and after loading a new tape.  Then,
+++++          depending on the drives TAPEALERT state and the know drive
+++++          cleaning state Bacula could automatically schedule later
+++++          cleaning, clean immediately, or inform the operator.
+++++
+++++          Implementing this would perhaps require another catalog change
+++++          and perhaps major changes in SD code and the DIR-SD protocoll,
+++++          so I'd only consider this worth implementing if it would
+++++          actually be used or even needed by many people. 
+++++
+++++Item 14:  Merging of multiple backups into a single one. (Also called Synthetic
+++++          Backup or Consolidation).
+++++
+++++  Origin: Marc Cousin and Eric Bollengier 
+++++  Date:   15 November 2005
+++++  Status: Depends on first implementing project Item 1 (Migration).
+++++
+++++  What:   A merged backup is a backup made without connecting to the Client.
+++++          It would be a Merge of existing backups into a single backup.
+++++          In effect, it is like a restore but to the backup medium.
+++++
+++++          For instance, say that last sunday we made a full backup.  Then
+++++          all week long, we created incremental backups, in order to do
+++++          them fast.  Now comes sunday again, and we need another full.
+++++          The merged backup makes it possible to do instead an incremental
+++++          backup (during the night for instance), and then create a merged
+++++          backup during the day, by using the full and incrementals from
+++++          the week.  The merged backup will be exactly like a full made
+++++          sunday night on the tape, but the production interruption on the
+++++          Client will be minimal, as the Client will only have to send
+++++          incrementals.
+++++
+++++          In fact, if it's done correctly, you could merge all the
+++++          Incrementals into single Incremental, or all the Incrementals
+++++          and the last Differential into a new Differential, or the Full,
+++++          last differential and all the Incrementals into a new Full
+++++          backup.  And there is no need to involve the Client.
+++++
+++++  Why:    The benefit is that :
+++++          - the Client just does an incremental ;
+++++          - the merged backup on tape is just as a single full backup,
+++++            and can be restored very fast.
+++++
+++++          This is also a way of reducing the backup data since the old
+++++          data can then be pruned (or not) from the catalog, possibly
+++++          allowing older volumes to be recycled
+++++
+++++Item 15:  Automatic disabling of devices
+++++   Date:   2005-11-11
+++++   Origin: Peter Eriksson <peter at ifm.liu dot se>
+++++   Status:
+++++
+++++   What:  After a configurable amount of fatal errors with a tape drive
+++++          Bacula should automatically disable further use of a certain
+++++          tape drive. There should also be "disable"/"enable" commands in
+++++          the "bconsole" tool.
+++++
+++++   Why:   On a multi-drive jukebox there is a possibility of tape drives
+++++          going bad during large backups (needing a cleaning tape run,
+++++          tapes getting stuck). It would be advantageous if Bacula would
+++++          automatically disable further use of a problematic tape drive
+++++          after a configurable amount of errors has occured.
+++++
+++++          An example: I have a multi-drive jukebox (6 drives, 380+ slots)
+++++          where tapes occasionally get stuck inside the drive. Bacula will
+++++          notice that the "mtx-changer" command will fail and then fail
+++++          any backup jobs trying to use that drive. However, it will still
+++++          keep on trying to run new jobs using that drive and fail -
+++++          forever, and thus failing lots and lots of jobs... Since we have
+++++          many drives Bacula could have just automatically disabled
+++++          further use of that drive and used one of the other ones
+++++          instead.
+++++
+++++
+++++Item 16:  Directive/mode to backup only file changes, not entire file
+++++  Date:   11 November 2005
+++++  Origin: Joshua Kugler <joshua dot kugler at uaf dot edu>
+++++          Marek Bajon <mbajon at bimsplus dot com dot pl>
+++++  Status: RFC
+++++
+++++  What:   Currently when a file changes, the entire file will be backed up in
+++++          the next incremental or full backup.  To save space on the tapes
+++++          it would be nice to have a mode whereby only the changes to the
+++++          file would be backed up when it is changed.
+++++
+++++  Why:    This would save lots of space when backing up large files such as 
+++++          logs, mbox files, Outlook PST files and the like.
+++++
+++++  Notes:  This would require the usage of disk-based volumes as comparing 
+++++          files would not be feasible using a tape drive.
+++++
+++++Item 17:  Quick release of FD-SD connection
+++++  Origin: Frank Volf (frank at deze dot org)
+++++  Date:   17 november 2005
+++++  Status:
+++++
+++++   What:  In the bacula implementation a backup is finished after all data
+++++          and attributes are succesfully written to storage.  When using a
+++++          tape backup it is very annoying that a backup can take a day,
+++++          simply because the current tape (or whatever) is full and the
+++++          administrator has not put a new one in.  During that time the
+++++          system cannot be taken off-line, because there is still an open
+++++          session between the storage daemon and the file daemon on the
+++++          client.
+++++
+++++          Although this is a very good strategey for making "safe backups"
+++++          This can be annoying for e.g.  laptops, that must remain
+++++          connected until the bacukp is completed.
+++++
+++++          Using a new feature called "migration" it will be possible to
+++++          spool first to harddisk (using a special 'spool' migration
+++++          scheme) and then migrate the backup to tape.
+++++
+++++          There is still the problem of getting the attributes committed.
+++++          If it takes a very long time to do, with the current code, the
+++++          job has not terminated, and the File daemon is not freed up.  The
+++++          Storage daemon should release the File daemon as soon as all the
+++++          file data and all the attributes have been sent to it (the SD).
+++++          Currently the SD waits until everything is on tape and all the
+++++          attributes are transmitted to the Director before signalling
+++++          completion to the FD. I don't think I would have any problem
+++++          changing this.  The reason is that even if the FD reports back to
+++++          the Dir that all is OK, the job will not terminate until the SD
+++++          has done the same thing -- so in a way keeping the SD-FD link
+++++          open to the very end is not really very productive ...
++++ 
+++++   Why:   Makes backup of laptops much easier.
++++ 
++++ 
++++ ============= Empty RFC form ===========
++++@@ -245,33 +413,4 @@
++++ ============== End RFC form ==============
++++ 
++++ 
++++-Items completed for release 1.38.0:
++++-#4   Embedded Python Scripting (implemented in all Daemons)
++++-#5   Events that call a Python program (Implemented in all
++++-       daemons, but more cleanup work to be done).
++++-#6   Select one from among Multiple Storage Devices for Job.
++++-       This is already implemented in 1.37.
++++-#7   Single Job Writing to Multiple Storage Devices. This is
++++-       currently implemented with a Clone feature.
++++-#-   Full multiple drive Autochanger support (done in 1.37)
++++-#-   Built in support for communications encryption (TLS) 
++++-       done by Landon Fuller.
++++-#    Support for Unicode characters
++++-       (via UTF-8) on Win32 machines thanks to Thorsten Engel.
++++-Item  8:  Break the one-to-one Relationship between a Job and a
++++-          Specific Storage Device (or Devices if #10 is implemented).
++++-
++++-Completed items from last year's list:
++++-Item 1:   Multiple simultaneous Jobs. (done)
++++-Item 3:   Write the bscan program -- also write a bcopy program (done).
++++-Item 5:   Implement Label templates (done).
++++-Item 6:   Write a regression script (done)
++++-Item 9:   Add SSL to daemon communications (done by Landon Fuller)
++++-Item 10:  Define definitive tape format (done)
++++-Item 3:   GUI for interactive restore. Partially Implemented in 1.34
++++-          Note, there is now a complete Webmin plugin, a partial
++++-          GNOME console, and an excellent wx-console GUI.
++++-Item 4:   GUI for interactive backup
++++-Item 2:   Job Data Spooling.
++++-    Done: Regular expression matching.
++++-Item 10:  New daemon communication protocol (this has been dropped).
+++++Items completed for release 1.38.0 -- see kernsdone
++++Index: patches/1.38.1-to-1.38.2.patch
++++===================================================================
++++RCS file: patches/1.38.1-to-1.38.2.patch
++++diff -N patches/1.38.1-to-1.38.2.patch
++++--- /dev/null       1 Jan 1970 00:00:00 -0000
+++++++ patches/1.38.1-to-1.38.2.patch  21 Nov 2005 18:19:05 -0000
++++@@ -0,0 +1,3528 @@
+++++
+++++ This patch fixes the following bugs:
+++++
+++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
+++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
+++++  says that this patch does not fix his problem)
+++++- Fix cancel failure bug. Bug #481
+++++- Fix failure when Pool name has spaces. Bug #487
+++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
+++++- Fix a couple of free()s in src/filed/acl.c
+++++- Fix memory overrun in bfile.c in building OS X resource
+++++  fork filename. Bug #489
+++++
+++++This patch is applied to Bacula source version 1.38.1 and will
+++++produce Bacula source version 1.38.2.  Apply it with:
+++++
+++++   cd <bacula-1.38.1-source>
+++++   ./configure (your options) if not already done
+++++   patch -p0 <1.38.1-to-1.38.2.patch
+++++   make
+++++   make install
+++++
+++++? osx_finder.patch
+++++Index: ChangeLog
+++++===================================================================
+++++RCS file: /cvsroot/bacula/bacula/ChangeLog,v
+++++retrieving revision 1.154.2.7
+++++diff -u -r1.154.2.7 ChangeLog
+++++--- ChangeLog      15 Nov 2005 09:27:19 -0000      1.154.2.7
++++++++ ChangeLog      21 Nov 2005 13:17:56 -0000
+++++@@ -1,4 +1,14 @@
+++++ 
++++++Changes to 1.38.2:
++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
++++++- Fix bnet-server bug found on OpenBSD. Bug #486
++++++- Fix cancel failure bug. Bug #481
++++++- Fix failure when Pool name has spaces. Bug #487   
++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
++++++- Fix a couple of free()s in src/filed/acl.c
++++++- Fix memory overrun in bfile.c in building OS X resource
++++++  fork filename. Bug #489 
++++++- Add Pool name to SD status output.
+++++ 
+++++ Changes to 1.38.1:
+++++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
+++++Index: ReleaseNotes
+++++===================================================================
+++++RCS file: /cvsroot/bacula/bacula/ReleaseNotes,v
+++++retrieving revision 1.147.2.9
+++++diff -u -r1.147.2.9 ReleaseNotes
+++++--- ReleaseNotes   15 Nov 2005 09:27:19 -0000      1.147.2.9
++++++++ ReleaseNotes   21 Nov 2005 13:17:57 -0000
+++++@@ -1,10 +1,21 @@
+++++ 
+++++-          Release Notes for Bacula 1.38.1
++++++          Release Notes for Bacula 1.38.2
+++++ 
+++++   Bacula code: Total files = 420 Total lines = 138,440 (*.h *.c *.in)
+++++       20,440 additional lines of code since version 1.36.3
+++++ 
+++++-Changes since 1.38.0:
++++++Changes to 1.38.2:
++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
++++++- Fix bnet-server bug found on OpenBSD. Bug #486
++++++- Fix cancel failure bug. Bug #481
++++++- Fix failure when Pool name has spaces. Bug #487   
++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
++++++- Fix a couple of free()s in src/filed/acl.c
++++++- Fix memory overrun in bfile.c in building OS X resource
++++++  fork filename. Bug #489 
++++++- Add Pool name to SD status output.
++++++
++++++Changes to 1.38.1:
+++++ - Corrected ACL for Solaris (David Duchscher and Attila Fulop).
+++++ - Add bacula_mail_summary.sh to examples directory. It makes
+++++   a single email summary of any number of jobs. Submitted
+++++Index: kernstodo
+++++===================================================================
+++++RCS file: /cvsroot/bacula/bacula/kernstodo,v
+++++retrieving revision 1.570.2.6
+++++diff -u -r1.570.2.6 kernstodo
+++++--- kernstodo      4 Nov 2005 09:16:49 -0000       1.570.2.6
++++++++ kernstodo      21 Nov 2005 13:17:57 -0000
+++++@@ -1,5 +1,5 @@
+++++                     Kern's ToDo List
+++++-                     03 November 2005
++++++                     21 November 2005
+++++ 
+++++ Major development:      
+++++ Project                     Developer
+++++@@ -7,8 +7,6 @@
+++++ Version 1.37                Kern (see below)
+++++ ========================================================
+++++ 
+++++-Final items for 1.37 before release:
+++++-
+++++ Document:
+++++ - Does ClientRunAfterJob fail the job on a bad return code?
+++++ - Document cleaning up the spool files:
+++++@@ -18,6 +16,8 @@
+++++ - Does WildFile match against full name?  Doc.
+++++ 
+++++ For 1.39:
++++++- Make sure that all do_prompt() calls in Dir check for
++++++  -1 (error) and -2 (cancel) returns.
+++++ - Look at -D_FORTIFY_SOURCE=2
+++++ - Add Win32 FileSet definition somewhere
+++++ - Look at fixing restore status stats in SD.
+++++@@ -27,6 +27,12 @@
+++++   encountered, read many times (as it currently does), and if the
+++++   block cannot be read, skip to the next block, and try again.  If
+++++   that fails, skip to the next file and try again, ...
++++++- Add level table:
++++++  create table LevelType (LevelType binary(1), LevelTypeLong tinyblob);
++++++  insert into LevelType (LevelType,LevelTypeLong) values
++++++  ("F","Full"),
++++++  ("D","Diff"),
++++++  ("I","Inc");
+++++ - Add ACL to restore only to original location.
+++++ - Add a recursive mark command (rmark) to restore.
+++++ - "Minimum Job Interval = nnn" sets minimum interval between Jobs
+++++@@ -1246,219 +1252,4 @@
+++++ ====
+++++ 
+++++ 
+++++-=== Done
+++++-- Save mount point for directories not traversed with onefs=yes.
+++++-- Add seconds to start and end times in the Job report output.
+++++-- if 2 concurrent backups are attempted on the same tape
+++++-  drive (autoloader) into different tape pools, one of them will exit
+++++-  fatally instead of halting until the drive is idle
+++++-- Update StartTime if job held in Job Queue.
+++++-- Look at www.nu2.nu/pebuilder as a helper for full windows
+++++-  bare metal restore. (done by Scott)
+++++-- Fix orphanned buffers:
+++++-   Orphaned buffer:      24 bytes allocated at line 808 of rufus-dir job.c
+++++-   Orphaned buffer:      40 bytes allocated at line 45 of rufus-dir alist.c
+++++-- Implement Preben's suggestion to add
+++++-  File System Types = ext2, ext3 
+++++-  to FileSets, thus simplifying backup of *all* local partitions.
+++++-- Try to open a device on each Job if it was not opened
+++++-  when the SD started.
+++++-- Add dump of VolSessionId/Time and FileIndex with bls.
+++++-- If Bacula does not find the right tape in the Autochanger,
+++++-  then mark the tape in error and move on rather than asking
+++++-  for operator intervention.
+++++-- Cancel command should include JobId in list of Jobs.
+++++-- Add performance testing hooks
+++++-- Bootstrap from JobMedia records.
+++++-- Implement WildFile and WildDir to solve problem of 
+++++-  saving only *.doc files.
+++++-- Fix
+++++-   Please use the "label"  command to create a new Volume for:
+++++-       Storage:      DDS-4-changer
+++++-       Media type:   
+++++-       Pool:         Default
+++++-   label
+++++-   The defined Storage resources are:
+++++-- Copy Changer Device and Changer Command from Autochanger
+++++-  to Device resource in SD if none given in Device resource.
+++++-- 1. Automatic use of more than one drive in an autochanger (done)
+++++-- 2. Automatic selection of the correct drive for each Job (i.e.
+++++-     selects a drive with an appropriate Volume for the Job) (done)
+++++-- 6. Allow multiple simultaneous Jobs referencing the same pool write
+++++-    to several tapes (some new directive(s) are are probably needed for
+++++-    this) (done)
+++++-- Locking (done)
+++++-- Key on Storage rather than Pool (done)
+++++-- Allow multiple drives to use same Pool (change jobq.c DIR) (done).
+++++-- Synchronize multiple drives so that not more
+++++-  than one loads a tape and any time (done)
+++++-- 4. Use Changer Device and Changer Command specified in the
+++++-     Autochanger resource, if none is found in the Device resource.
+++++-    You can continue to specify them in the Device resource if you want
+++++-    or need them to be different for each device.
+++++-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") 
+++++-    that can allow a Device be part of an Autochanger, and hence the changer
+++++-    script protected, but if set to no, will prevent the Device from being 
+++++-    automatically selected from the changer. This allows the device to
+++++-    be directly accessed through its Device name, but not through the
+++++-    AutoChanger name.
+++++-#6   Select one from among Multiple Storage Devices for Job
+++++-#5   Events that call a Python program 
+++++-     (Implemented in Dir/SD)
+++++-- Make sure the Device name is in the Query packet returned.
+++++-- Don't start a second file job if one is already running.
+++++-- Implement EOF/EOV labels for ANSI labels
+++++-- Implement IBM labels.
+++++-- When Python creates a new label, the tape is immediately
+++++-  recycled and no label created. This happens when using   
+++++-  autolabeling -- even when Python doesn't generate the name.
+++++-- Scratch Pool where the volumes can be re-assigned to any Pool.
+++++-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) 
+++++-  is busy reading. Job 6 canceled.
+++++-- Remove separate thread for opening devices in SD.  On the other
+++++-  hand, don't block waiting for open() for devices.
+++++-- Fix code to either handle updating NumVol or to calculate it in
+++++-  Dir next_vol.c
+++++-- Ensure that you cannot exclude a directory or a file explicitly
+++++-  Included with File.
+++++-#4   Embedded Python Scripting 
+++++-     (Implemented in Dir/SD/FD)
+++++-- Add Python writable variable for changing the Priority,
+++++-    Client, Storage, JobStatus (error), ...
+++++-- SD Python
+++++-  - Solicit Events
+++++-- Add disk seeking on restore; turn off seek on tapes.
+++++-  stored/match_bsr.c
+++++-- Look at dird_conf.c:1000: warning: `int size' 
+++++-  might be used uninitialized in this function
+++++-- Indicate when a Job is purged/pruned during restore.
+++++-- Implement some way to turn off automatic pruning in Jobs.
+++++-- Implement a way an Admin Job can prune, possibly multiple
+++++-  clients -- Python script?
+++++-- Look at Preben's acl.c error handling code.
+++++-- SD crashes after a tape restore then doing a backup. 
+++++-- If drive is opened read/write, close it and re-open
+++++-  read-only if doing a restore, and vice-versa.
+++++-- Windows restore:
+++++-  data-fd: RestoreFiles.2004-12-07_15.56.42 Error:
+++++-  > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der
+++++-  > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen
+++++-  > Prozess verwendet wird.
+++++-  Restore restores all files, but then fails at the end trying
+++++-  to set the attributes of e:
+++++-  from failed jobs.- Resolve the problem between Device name and Archive name,
+++++-  and fix SD messages.
+++++-- Tell the "restore" user when browsing is no longer possible.
+++++-- Add a restore directory-x
+++++-- Write non-optimized bsrs from the JobMedia and Media records,
+++++-  even after Files are pruned.
+++++-- Delete Stripe and Copy from VolParams to save space.
+++++-- Fix option 2 of restore -- list where file is backed up -- require Client,
+++++-  then list last 20 backups.
+++++-- Finish implementation of passing all Storage and Device needs to
+++++-  the SD.
+++++-- Move test for max wait time exceeded in job.c up -- Peter's idea.
+++++-##   Consider moving docs to their own project.
+++++-##   Move rescue to its own project.
+++++-- Add client version to the Client name line that prints in
+++++-  the Job report.
+++++-- Fix the Rescue CDROM.
+++++-- By the way: on page http://www.bacula.org/?page=tapedrives , at the 
+++++-  bottom, the link to "Tape Testing Chapter" is broken. It goes to 
+++++-  /html-manual/... while the others point to /rel-manual/...
+++++-- Device resource needs the "name" of the SD.
+++++-- Specify a single directory to restore.
+++++-- Implement MediaType keyword in bsr?   
+++++-- Add a date and time stamp at the beginning of every line in the 
+++++-  Job report (Volker Sauer).
+++++-- Add level to estimate command.
+++++-- Add "limit=n" for "list jobs"
+++++-- Make bootstrap filename unique.
+++++-- Make Dmsg look at global before calling subroutine.
+++++-- From Chris Hull:
+++++-   it seems to be complaining about 12:00pm which should be a valid 12
+++++-   hour time.  I changed the time to 11:59am and everything works fine.
+++++-   Also 12:00am works fine.  0:00pm also works (which I don't think
+++++-   should).  None of the values 12:00pm - 12:59pm work for that matter.
+++++-- Require restore via the restore command or make a restore Job
+++++-  get the bootstrap file.
+++++-- Implement Maximum Job Spool Size
+++++-- Fix 3993 error in SD. It forgets to look at autochanger
+++++-  resource for device command, ...
+++++-- 3. Prevent two drives requesting the same Volume in any given
+++++-     autochanger, by checking if a Volume is mounted on another drive
+++++-     in an Autochanger.
+++++-- Upgrade to MySQL 4.1.12 See:  
+++++-  http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html
+++++-- Add # Job Level date to bsr file
+++++-- Implement "PreferMountedVolumes = yes|no" in Job resource.
+++++-##   Integrate web-bacula into a new Bacula project with
+++++-     bimagemgr.
+++++-- Cleaning tapes should have Status "Cleaning" rather than append.
+++++-- Make sure that Python has access to Client address/port so that
+++++-  it can check if Clients are alive.
+++++-- Review all items in "restore".
+++++-- Fix PostgreSQL GROUP BY problems in restore.
+++++-- Fix PostgreSQL sql problems in bugs.
+++++-- After rename
+++++-  04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume 
+++++-     "DLT-13Feb04".
+++++-  Current Volume "DLT-04Jul05" not acceptable because:
+++++-  1997 Volume "DLT-13Feb04" not in catalog.
+++++-  04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device 
+++++-     "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02
+++++-##   Create a new GUI chapter explaining all the GUI programs.
+++++--    Make "update slots" when pointing to Autochanger, remove
+++++-     all Volumes from other drives.  "update slots all-drives"?
+++++-     No, this is done by modifying mtx-changer to list what is
+++++-     in the drives.
+++++-- Finish TLS implementation.
+++++-- Port limiting -m in iptables to prevent DoS attacks
+++++-  could cause broken pipes on Bacula.
+++++-6. Build and test the Volume Shadow Copy (VSS) for Win32. 
+++++--  Allow cancel of unknown Job
+++++--  State not saved when closing Win32 FD by icon
+++++--  bsr-opt-test fails. bsr deleted. Fix.
+++++--  Move Python daemon variables from Job to Bacula object.
+++++-   WorkingDir, ConfigFile
+++++-- Document that Bootstrap files can be written with cataloging
+++++-  turned off.
+++++-- Document details of ANSI/IBM labels
+++++-- OS linux 2.4
+++++-  1) ADIC, DLT, FastStor 4000, 7*20GB
+++++-- Linux Sony LIB-D81, AIT-3 library works.
+++++-- Doc the following
+++++-  to activate, check or disable the hardware compression feature on my 
+++++-  exb-8900 i use the exabyte "MammothTool" you can get it here:
+++++-  http://www.exabyte.com/support/online/downloads/index.cfm
+++++-  There is a solaris version of this tool. With option -C 0 or 1 you can 
+++++-  disable or activate compression. Start this tool without any options for 
+++++-  a small reference.
+++++-- Document Heartbeat Interval in the dealing with firewalls section.
+++++-- Document new CDROM directory.
+++++-- On Win32 working directory must have drive letter ????
+++++-- On Win32 working directory must be writable by SYSTEM to
+++++-  do restores.
+++++-- Document that ChangerDevice is used for Alert command.
+++++-- Add better documentation on how restores can be done
+++++-8. Take one more try at making DVD writing work (no go)
+++++-7. Write a bacula-web document
+++++-- Why isn't the DEVICE structure defined when doing
+++++-  a reservation?
+++++-- Multi-drive changer seems to only use drive 0
+++++-  Multiple drives don't seem to be opened.
+++++-- My database is growing
+++++-- Call GetLastError() in the berrno constructor rather
+++++-  than delaying until strerror.
+++++-- Tape xxx in drive 0, requested in drive 1
+++++-- The mount command does not work with drives other than 0.
+++++-- A mount should cause the SD to re-examine what Slot is   
+++++-  loaded.
+++++-- The SD locks on to the first available drive then
+++++-  wants a Volume that is released but in another drive --
+++++-  chaos.
+++++-- Run the regression scripts on Solaris and FreeBSD
+++++--  Figure out how to package gui, and rescue programs.
+++++-- Add a .dir command to restore tree code to eliminate the problem
+++++-- Mount after manually unloading changer causes hang in SD
+++++-- Fix JobACL with restore by JobId.
++++++=== Done -- see kernsdone
+++++Index: kes-1.38
+++++===================================================================
+++++RCS file: /cvsroot/bacula/bacula/kes-1.38,v
+++++retrieving revision 1.1.2.13
+++++diff -u -r1.1.2.13 kes-1.38
+++++--- kes-1.38       14 Nov 2005 20:20:38 -0000      1.1.2.13
++++++++ kes-1.38       21 Nov 2005 13:17:57 -0000
+++++@@ -3,6 +3,18 @@
+++++ 
+++++ General:
+++++ 
++++++Changes to 1.38.2:
++++++20Oct05
++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
++++++- Fix bnet-server bug found on OpenBSD. Bug #486
++++++- Fix cancel failure bug. Bug #481
++++++- Fix failure when Pool name has spaces. Bug #487   
++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
++++++- Fix a couple of free()s in src/filed/acl.c
++++++- Fix memory overrun in bfile.c in building OS X resource
++++++  fork filename. Bug #489 
++++++- Add Pool name to SD status output.
++++++
+++++ Changes to 1.38.1:
+++++ 14Oct05
+++++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
+++++Index: projects
+++++===================================================================
+++++RCS file: /cvsroot/bacula/bacula/projects,v
+++++retrieving revision 1.12.2.3
+++++diff -u -r1.12.2.3 projects
+++++--- projects       10 Nov 2005 20:25:27 -0000      1.12.2.3
++++++++ projects       21 Nov 2005 13:17:58 -0000
+++++@@ -228,7 +228,175 @@
+++++ 
+++++   Why:    Performance enhancement.
+++++ 
++++++Item 13:  Let Bacula log tape usage and handle drive cleaning cycles.
++++++  Date:   November 11, 2005
++++++  Origin: Arno Lehmann <al at its-lehmann dot de>
++++++  Status:
++++++
++++++  What:   Make Bacula manage tape life cycle information and drive 
++++++          cleaning cycles.
++++++
++++++  Why:    Both parts of this project are important when operating backups.
++++++          We need to know which tapes need replacement, and we need to
++++++          make sure the drives are cleaned when necessary.  While many
++++++          tape libraries and even autoloaders can handle all this
++++++          automatically, support by Bacula can be helpful for smaller
++++++          (older) libraries and single drives.  Also, checking drive
++++++          status during operation can prevent some failures (as I had to
++++++          learn the hard way...)
++++++
++++++  Notes:  First, Bacula could (and even does, to some limited extent)
++++++          record tape and drive usage.  For tapes, the number of mounts,
++++++          the amount of data, and the time the tape has actually been
++++++          running could be recorded.  Data fields for Read and Write time
++++++          and Nmber of mounts already exist in the catalog (I'm not sure
++++++          if VolBytes is the sum of all bytes ever written to that volume
++++++          by Bacula).  This information can be important when determining
++++++          which media to replace.  For the tape drives known to Bacula,
++++++          similar information is interesting to determine the device
++++++          status and expected life time: Time it's been Reading and
++++++          Writing, number of tape Loads / Unloads / Errors.  This
++++++          information is not yet recorded as far as I know.
++++++
++++++          The next step would be implementing drive cleaning setup.
++++++          Bacula already has knowledge about cleaning tapes.  Once it has
++++++          some information about cleaning cycles (measured in drive run
++++++          time, number of tapes used, or calender days, for example) it
++++++          can automatically execute tape cleaning (with an autochanger,
++++++          obviously) or ask for operator assistence loading a cleaning
++++++          tape.
++++++
++++++          The next step would be to implement TAPEALERT checks not only
++++++          when changing tapes and only sending he information to the
++++++          administrator, but rather checking after each tape error,
++++++          checking on a regular basis (for example after each tape file),
++++++          and also before unloading and after loading a new tape.  Then,
++++++          depending on the drives TAPEALERT state and the know drive
++++++          cleaning state Bacula could automatically schedule later
++++++          cleaning, clean immediately, or inform the operator.
++++++
++++++          Implementing this would perhaps require another catalog change
++++++          and perhaps major changes in SD code and the DIR-SD protocoll,
++++++          so I'd only consider this worth implementing if it would
++++++          actually be used or even needed by many people. 
++++++
++++++Item 14:  Merging of multiple backups into a single one. (Also called Synthetic
++++++          Backup or Consolidation).
++++++
++++++  Origin: Marc Cousin and Eric Bollengier 
++++++  Date:   15 November 2005
++++++  Status: Depends on first implementing project Item 1 (Migration).
++++++
++++++  What:   A merged backup is a backup made without connecting to the Client.
++++++          It would be a Merge of existing backups into a single backup.
++++++          In effect, it is like a restore but to the backup medium.
++++++
++++++          For instance, say that last sunday we made a full backup.  Then
++++++          all week long, we created incremental backups, in order to do
++++++          them fast.  Now comes sunday again, and we need another full.
++++++          The merged backup makes it possible to do instead an incremental
++++++          backup (during the night for instance), and then create a merged
++++++          backup during the day, by using the full and incrementals from
++++++          the week.  The merged backup will be exactly like a full made
++++++          sunday night on the tape, but the production interruption on the
++++++          Client will be minimal, as the Client will only have to send
++++++          incrementals.
++++++
++++++          In fact, if it's done correctly, you could merge all the
++++++          Incrementals into single Incremental, or all the Incrementals
++++++          and the last Differential into a new Differential, or the Full,
++++++          last differential and all the Incrementals into a new Full
++++++          backup.  And there is no need to involve the Client.
++++++
++++++  Why:    The benefit is that :
++++++          - the Client just does an incremental ;
++++++          - the merged backup on tape is just as a single full backup,
++++++            and can be restored very fast.
++++++
++++++          This is also a way of reducing the backup data since the old
++++++          data can then be pruned (or not) from the catalog, possibly
++++++          allowing older volumes to be recycled
++++++
++++++Item 15:  Automatic disabling of devices
++++++   Date:   2005-11-11
++++++   Origin: Peter Eriksson <peter at ifm.liu dot se>
++++++   Status:
++++++
++++++   What:  After a configurable amount of fatal errors with a tape drive
++++++          Bacula should automatically disable further use of a certain
++++++          tape drive. There should also be "disable"/"enable" commands in
++++++          the "bconsole" tool.
++++++
++++++   Why:   On a multi-drive jukebox there is a possibility of tape drives
++++++          going bad during large backups (needing a cleaning tape run,
++++++          tapes getting stuck). It would be advantageous if Bacula would
++++++          automatically disable further use of a problematic tape drive
++++++          after a configurable amount of errors has occured.
++++++
++++++          An example: I have a multi-drive jukebox (6 drives, 380+ slots)
++++++          where tapes occasionally get stuck inside the drive. Bacula will
++++++          notice that the "mtx-changer" command will fail and then fail
++++++          any backup jobs trying to use that drive. However, it will still
++++++          keep on trying to run new jobs using that drive and fail -
++++++          forever, and thus failing lots and lots of jobs... Since we have
++++++          many drives Bacula could have just automatically disabled
++++++          further use of that drive and used one of the other ones
++++++          instead.
++++++
++++++
++++++Item 16:  Directive/mode to backup only file changes, not entire file
++++++  Date:   11 November 2005
++++++  Origin: Joshua Kugler <joshua dot kugler at uaf dot edu>
++++++          Marek Bajon <mbajon at bimsplus dot com dot pl>
++++++  Status: RFC
++++++
++++++  What:   Currently when a file changes, the entire file will be backed up in
++++++          the next incremental or full backup.  To save space on the tapes
++++++          it would be nice to have a mode whereby only the changes to the
++++++          file would be backed up when it is changed.
++++++
++++++  Why:    This would save lots of space when backing up large files such as 
++++++          logs, mbox files, Outlook PST files and the like.
++++++
++++++  Notes:  This would require the usage of disk-based volumes as comparing 
++++++          files would not be feasible using a tape drive.
++++++
++++++Item 17:  Quick release of FD-SD connection
++++++  Origin: Frank Volf (frank at deze dot org)
++++++  Date:   17 november 2005
++++++  Status:
++++++
++++++   What:  In the bacula implementation a backup is finished after all data
++++++          and attributes are succesfully written to storage.  When using a
++++++          tape backup it is very annoying that a backup can take a day,
++++++          simply because the current tape (or whatever) is full and the
++++++          administrator has not put a new one in.  During that time the
++++++          system cannot be taken off-line, because there is still an open
++++++          session between the storage daemon and the file daemon on the
++++++          client.
++++++
++++++          Although this is a very good strategey for making "safe backups"
++++++          This can be annoying for e.g.  laptops, that must remain
++++++          connected until the bacukp is completed.
++++++
++++++          Using a new feature called "migration" it will be possible to
++++++          spool first to harddisk (using a special 'spool' migration
++++++          scheme) and then migrate the backup to tape.
++++++
++++++          There is still the problem of getting the attributes committed.
++++++          If it takes a very long time to do, with the current code, the
++++++          job has not terminated, and the File daemon is not freed up.  The
++++++          Storage daemon should release the File daemon as soon as all the
++++++          file data and all the attributes have been sent to it (the SD).
++++++          Currently the SD waits until everything is on tape and all the
++++++          attributes are transmitted to the Director before signalling
++++++          completion to the FD. I don't think I would have any problem
++++++          changing this.  The reason is that even if the FD reports back to
++++++          the Dir that all is OK, the job will not terminate until the SD
++++++          has done the same thing -- so in a way keeping the SD-FD link
++++++          open to the very end is not really very productive ...
+++++ 
++++++   Why:   Makes backup of laptops much easier.
+++++ 
+++++ 
+++++ ============= Empty RFC form ===========
+++++@@ -245,33 +413,4 @@
+++++ ============== End RFC form ==============
+++++ 
+++++ 
+++++-Items completed for release 1.38.0:
+++++-#4   Embedded Python Scripting (implemented in all Daemons)
+++++-#5   Events that call a Python program (Implemented in all
+++++-       daemons, but more cleanup work to be done).
+++++-#6   Select one from among Multiple Storage Devices for Job.
+++++-       This is already implemented in 1.37.
+++++-#7   Single Job Writing to Multiple Storage Devices. This is
+++++-       currently implemented with a Clone feature.
+++++-#-   Full multiple drive Autochanger support (done in 1.37)
+++++-#-   Built in support for communications encryption (TLS) 
+++++-       done by Landon Fuller.
+++++-#    Support for Unicode characters
+++++-       (via UTF-8) on Win32 machines thanks to Thorsten Engel.
+++++-Item  8:  Break the one-to-one Relationship between a Job and a
+++++-          Specific Storage Device (or Devices if #10 is implemented).
+++++-
+++++-Completed items from last year's list:
+++++-Item 1:   Multiple simultaneous Jobs. (done)
+++++-Item 3:   Write the bscan program -- also write a bcopy program (done).
+++++-Item 5:   Implement Label templates (done).
+++++-Item 6:   Write a regression script (done)
+++++-Item 9:   Add SSL to daemon communications (done by Landon Fuller)
+++++-Item 10:  Define definitive tape format (done)
+++++-Item 3:   GUI for interactive restore. Partially Implemented in 1.34
+++++-          Note, there is now a complete Webmin plugin, a partial
+++++-          GNOME console, and an excellent wx-console GUI.
+++++-Item 4:   GUI for interactive backup
+++++-Item 2:   Job Data Spooling.
+++++-    Done: Regular expression matching.
+++++-Item 10:  New daemon communication protocol (this has been dropped).
++++++Items completed for release 1.38.0 -- see kernsdone
+++++Index: patches/1.38.1-to-1.38.2.patch
+++++===================================================================
+++++RCS file: patches/1.38.1-to-1.38.2.patch
+++++diff -N patches/1.38.1-to-1.38.2.patch
+++++--- /dev/null      1 Jan 1970 00:00:00 -0000
++++++++ patches/1.38.1-to-1.38.2.patch 21 Nov 2005 13:17:58 -0000
+++++@@ -0,0 +1,2471 @@
++++++
++++++ This patch fixes the following bugs:
++++++
++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
++++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
++++++  says that this patch does not fix his problem)
++++++- Fix cancel failure bug. Bug #481
++++++- Fix failure when Pool name has spaces. Bug #487
++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
++++++- Fix a couple of free()s in src/filed/acl.c
++++++- Fix memory overrun in bfile.c in building OS X resource
++++++  fork filename. Bug #489
++++++
++++++This patch is applied to Bacula source version 1.38.1 and will
++++++produce Bacula source version 1.38.2.  Apply it with:
++++++
++++++   cd <bacula-1.38.1-source>
++++++   ./configure (your options) if not already done
++++++   patch -p0 <1.38.1-to-1.38.2.patch
++++++   make
++++++   make install
++++++
++++++? osx_finder.patch
++++++Index: ChangeLog
++++++===================================================================
++++++RCS file: /cvsroot/bacula/bacula/ChangeLog,v
++++++retrieving revision 1.154.2.7
++++++diff -u -r1.154.2.7 ChangeLog
++++++--- ChangeLog     15 Nov 2005 09:27:19 -0000      1.154.2.7
+++++++++ ChangeLog     21 Nov 2005 13:12:58 -0000
++++++@@ -1,4 +1,14 @@
++++++ 
+++++++Changes to 1.38.2:
+++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
+++++++- Fix bnet-server bug found on OpenBSD. Bug #486
+++++++- Fix cancel failure bug. Bug #481
+++++++- Fix failure when Pool name has spaces. Bug #487   
+++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
+++++++- Fix a couple of free()s in src/filed/acl.c
+++++++- Fix memory overrun in bfile.c in building OS X resource
+++++++  fork filename. Bug #489 
+++++++- Add Pool name to SD status output.
++++++ 
++++++ Changes to 1.38.1:
++++++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
++++++Index: ReleaseNotes
++++++===================================================================
++++++RCS file: /cvsroot/bacula/bacula/ReleaseNotes,v
++++++retrieving revision 1.147.2.9
++++++diff -u -r1.147.2.9 ReleaseNotes
++++++--- ReleaseNotes  15 Nov 2005 09:27:19 -0000      1.147.2.9
+++++++++ ReleaseNotes  21 Nov 2005 13:12:59 -0000
++++++@@ -1,10 +1,21 @@
++++++ 
++++++-          Release Notes for Bacula 1.38.1
+++++++          Release Notes for Bacula 1.38.2
++++++ 
++++++   Bacula code: Total files = 420 Total lines = 138,440 (*.h *.c *.in)
++++++       20,440 additional lines of code since version 1.36.3
++++++ 
++++++-Changes since 1.38.0:
+++++++Changes to 1.38.2:
+++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
+++++++- Fix bnet-server bug found on OpenBSD. Bug #486
+++++++- Fix cancel failure bug. Bug #481
+++++++- Fix failure when Pool name has spaces. Bug #487   
+++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
+++++++- Fix a couple of free()s in src/filed/acl.c
+++++++- Fix memory overrun in bfile.c in building OS X resource
+++++++  fork filename. Bug #489 
+++++++- Add Pool name to SD status output.
+++++++
+++++++Changes to 1.38.1:
++++++ - Corrected ACL for Solaris (David Duchscher and Attila Fulop).
++++++ - Add bacula_mail_summary.sh to examples directory. It makes
++++++   a single email summary of any number of jobs. Submitted
++++++Index: kernstodo
++++++===================================================================
++++++RCS file: /cvsroot/bacula/bacula/kernstodo,v
++++++retrieving revision 1.570.2.6
++++++diff -u -r1.570.2.6 kernstodo
++++++--- kernstodo     4 Nov 2005 09:16:49 -0000       1.570.2.6
+++++++++ kernstodo     21 Nov 2005 13:13:00 -0000
++++++@@ -1,5 +1,5 @@
++++++                     Kern's ToDo List
++++++-                     03 November 2005
+++++++                     21 November 2005
++++++ 
++++++ Major development:      
++++++ Project                     Developer
++++++@@ -7,8 +7,6 @@
++++++ Version 1.37                Kern (see below)
++++++ ========================================================
++++++ 
++++++-Final items for 1.37 before release:
++++++-
++++++ Document:
++++++ - Does ClientRunAfterJob fail the job on a bad return code?
++++++ - Document cleaning up the spool files:
++++++@@ -18,6 +16,8 @@
++++++ - Does WildFile match against full name?  Doc.
++++++ 
++++++ For 1.39:
+++++++- Make sure that all do_prompt() calls in Dir check for
+++++++  -1 (error) and -2 (cancel) returns.
++++++ - Look at -D_FORTIFY_SOURCE=2
++++++ - Add Win32 FileSet definition somewhere
++++++ - Look at fixing restore status stats in SD.
++++++@@ -27,6 +27,12 @@
++++++   encountered, read many times (as it currently does), and if the
++++++   block cannot be read, skip to the next block, and try again.  If
++++++   that fails, skip to the next file and try again, ...
+++++++- Add level table:
+++++++  create table LevelType (LevelType binary(1), LevelTypeLong tinyblob);
+++++++  insert into LevelType (LevelType,LevelTypeLong) values
+++++++  ("F","Full"),
+++++++  ("D","Diff"),
+++++++  ("I","Inc");
++++++ - Add ACL to restore only to original location.
++++++ - Add a recursive mark command (rmark) to restore.
++++++ - "Minimum Job Interval = nnn" sets minimum interval between Jobs
++++++@@ -1246,219 +1252,4 @@
++++++ ====
++++++ 
++++++ 
++++++-=== Done
++++++-- Save mount point for directories not traversed with onefs=yes.
++++++-- Add seconds to start and end times in the Job report output.
++++++-- if 2 concurrent backups are attempted on the same tape
++++++-  drive (autoloader) into different tape pools, one of them will exit
++++++-  fatally instead of halting until the drive is idle
++++++-- Update StartTime if job held in Job Queue.
++++++-- Look at www.nu2.nu/pebuilder as a helper for full windows
++++++-  bare metal restore. (done by Scott)
++++++-- Fix orphanned buffers:
++++++-   Orphaned buffer:      24 bytes allocated at line 808 of rufus-dir job.c
++++++-   Orphaned buffer:      40 bytes allocated at line 45 of rufus-dir alist.c
++++++-- Implement Preben's suggestion to add
++++++-  File System Types = ext2, ext3 
++++++-  to FileSets, thus simplifying backup of *all* local partitions.
++++++-- Try to open a device on each Job if it was not opened
++++++-  when the SD started.
++++++-- Add dump of VolSessionId/Time and FileIndex with bls.
++++++-- If Bacula does not find the right tape in the Autochanger,
++++++-  then mark the tape in error and move on rather than asking
++++++-  for operator intervention.
++++++-- Cancel command should include JobId in list of Jobs.
++++++-- Add performance testing hooks
++++++-- Bootstrap from JobMedia records.
++++++-- Implement WildFile and WildDir to solve problem of 
++++++-  saving only *.doc files.
++++++-- Fix
++++++-   Please use the "label"  command to create a new Volume for:
++++++-       Storage:      DDS-4-changer
++++++-       Media type:   
++++++-       Pool:         Default
++++++-   label
++++++-   The defined Storage resources are:
++++++-- Copy Changer Device and Changer Command from Autochanger
++++++-  to Device resource in SD if none given in Device resource.
++++++-- 1. Automatic use of more than one drive in an autochanger (done)
++++++-- 2. Automatic selection of the correct drive for each Job (i.e.
++++++-     selects a drive with an appropriate Volume for the Job) (done)
++++++-- 6. Allow multiple simultaneous Jobs referencing the same pool write
++++++-    to several tapes (some new directive(s) are are probably needed for
++++++-    this) (done)
++++++-- Locking (done)
++++++-- Key on Storage rather than Pool (done)
++++++-- Allow multiple drives to use same Pool (change jobq.c DIR) (done).
++++++-- Synchronize multiple drives so that not more
++++++-  than one loads a tape and any time (done)
++++++-- 4. Use Changer Device and Changer Command specified in the
++++++-     Autochanger resource, if none is found in the Device resource.
++++++-    You can continue to specify them in the Device resource if you want
++++++-    or need them to be different for each device.
++++++-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") 
++++++-    that can allow a Device be part of an Autochanger, and hence the changer
++++++-    script protected, but if set to no, will prevent the Device from being 
++++++-    automatically selected from the changer. This allows the device to
++++++-    be directly accessed through its Device name, but not through the
++++++-    AutoChanger name.
++++++-#6   Select one from among Multiple Storage Devices for Job
++++++-#5   Events that call a Python program 
++++++-     (Implemented in Dir/SD)
++++++-- Make sure the Device name is in the Query packet returned.
++++++-- Don't start a second file job if one is already running.
++++++-- Implement EOF/EOV labels for ANSI labels
++++++-- Implement IBM labels.
++++++-- When Python creates a new label, the tape is immediately
++++++-  recycled and no label created. This happens when using   
++++++-  autolabeling -- even when Python doesn't generate the name.
++++++-- Scratch Pool where the volumes can be re-assigned to any Pool.
++++++-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) 
++++++-  is busy reading. Job 6 canceled.
++++++-- Remove separate thread for opening devices in SD.  On the other
++++++-  hand, don't block waiting for open() for devices.
++++++-- Fix code to either handle updating NumVol or to calculate it in
++++++-  Dir next_vol.c
++++++-- Ensure that you cannot exclude a directory or a file explicitly
++++++-  Included with File.
++++++-#4   Embedded Python Scripting 
++++++-     (Implemented in Dir/SD/FD)
++++++-- Add Python writable variable for changing the Priority,
++++++-    Client, Storage, JobStatus (error), ...
++++++-- SD Python
++++++-  - Solicit Events
++++++-- Add disk seeking on restore; turn off seek on tapes.
++++++-  stored/match_bsr.c
++++++-- Look at dird_conf.c:1000: warning: `int size' 
++++++-  might be used uninitialized in this function
++++++-- Indicate when a Job is purged/pruned during restore.
++++++-- Implement some way to turn off automatic pruning in Jobs.
++++++-- Implement a way an Admin Job can prune, possibly multiple
++++++-  clients -- Python script?
++++++-- Look at Preben's acl.c error handling code.
++++++-- SD crashes after a tape restore then doing a backup. 
++++++-- If drive is opened read/write, close it and re-open
++++++-  read-only if doing a restore, and vice-versa.
++++++-- Windows restore:
++++++-  data-fd: RestoreFiles.2004-12-07_15.56.42 Error:
++++++-  > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der
++++++-  > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen
++++++-  > Prozess verwendet wird.
++++++-  Restore restores all files, but then fails at the end trying
++++++-  to set the attributes of e:
++++++-  from failed jobs.- Resolve the problem between Device name and Archive name,
++++++-  and fix SD messages.
++++++-- Tell the "restore" user when browsing is no longer possible.
++++++-- Add a restore directory-x
++++++-- Write non-optimized bsrs from the JobMedia and Media records,
++++++-  even after Files are pruned.
++++++-- Delete Stripe and Copy from VolParams to save space.
++++++-- Fix option 2 of restore -- list where file is backed up -- require Client,
++++++-  then list last 20 backups.
++++++-- Finish implementation of passing all Storage and Device needs to
++++++-  the SD.
++++++-- Move test for max wait time exceeded in job.c up -- Peter's idea.
++++++-##   Consider moving docs to their own project.
++++++-##   Move rescue to its own project.
++++++-- Add client version to the Client name line that prints in
++++++-  the Job report.
++++++-- Fix the Rescue CDROM.
++++++-- By the way: on page http://www.bacula.org/?page=tapedrives , at the 
++++++-  bottom, the link to "Tape Testing Chapter" is broken. It goes to 
++++++-  /html-manual/... while the others point to /rel-manual/...
++++++-- Device resource needs the "name" of the SD.
++++++-- Specify a single directory to restore.
++++++-- Implement MediaType keyword in bsr?   
++++++-- Add a date and time stamp at the beginning of every line in the 
++++++-  Job report (Volker Sauer).
++++++-- Add level to estimate command.
++++++-- Add "limit=n" for "list jobs"
++++++-- Make bootstrap filename unique.
++++++-- Make Dmsg look at global before calling subroutine.
++++++-- From Chris Hull:
++++++-   it seems to be complaining about 12:00pm which should be a valid 12
++++++-   hour time.  I changed the time to 11:59am and everything works fine.
++++++-   Also 12:00am works fine.  0:00pm also works (which I don't think
++++++-   should).  None of the values 12:00pm - 12:59pm work for that matter.
++++++-- Require restore via the restore command or make a restore Job
++++++-  get the bootstrap file.
++++++-- Implement Maximum Job Spool Size
++++++-- Fix 3993 error in SD. It forgets to look at autochanger
++++++-  resource for device command, ...
++++++-- 3. Prevent two drives requesting the same Volume in any given
++++++-     autochanger, by checking if a Volume is mounted on another drive
++++++-     in an Autochanger.
++++++-- Upgrade to MySQL 4.1.12 See:  
++++++-  http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html
++++++-- Add # Job Level date to bsr file
++++++-- Implement "PreferMountedVolumes = yes|no" in Job resource.
++++++-##   Integrate web-bacula into a new Bacula project with
++++++-     bimagemgr.
++++++-- Cleaning tapes should have Status "Cleaning" rather than append.
++++++-- Make sure that Python has access to Client address/port so that
++++++-  it can check if Clients are alive.
++++++-- Review all items in "restore".
++++++-- Fix PostgreSQL GROUP BY problems in restore.
++++++-- Fix PostgreSQL sql problems in bugs.
++++++-- After rename
++++++-  04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume 
++++++-     "DLT-13Feb04".
++++++-  Current Volume "DLT-04Jul05" not acceptable because:
++++++-  1997 Volume "DLT-13Feb04" not in catalog.
++++++-  04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device 
++++++-     "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02
++++++-##   Create a new GUI chapter explaining all the GUI programs.
++++++--    Make "update slots" when pointing to Autochanger, remove
++++++-     all Volumes from other drives.  "update slots all-drives"?
++++++-     No, this is done by modifying mtx-changer to list what is
++++++-     in the drives.
++++++-- Finish TLS implementation.
++++++-- Port limiting -m in iptables to prevent DoS attacks
++++++-  could cause broken pipes on Bacula.
++++++-6. Build and test the Volume Shadow Copy (VSS) for Win32. 
++++++--  Allow cancel of unknown Job
++++++--  State not saved when closing Win32 FD by icon
++++++--  bsr-opt-test fails. bsr deleted. Fix.
++++++--  Move Python daemon variables from Job to Bacula object.
++++++-   WorkingDir, ConfigFile
++++++-- Document that Bootstrap files can be written with cataloging
++++++-  turned off.
++++++-- Document details of ANSI/IBM labels
++++++-- OS linux 2.4
++++++-  1) ADIC, DLT, FastStor 4000, 7*20GB
++++++-- Linux Sony LIB-D81, AIT-3 library works.
++++++-- Doc the following
++++++-  to activate, check or disable the hardware compression feature on my 
++++++-  exb-8900 i use the exabyte "MammothTool" you can get it here:
++++++-  http://www.exabyte.com/support/online/downloads/index.cfm
++++++-  There is a solaris version of this tool. With option -C 0 or 1 you can 
++++++-  disable or activate compression. Start this tool without any options for 
++++++-  a small reference.
++++++-- Document Heartbeat Interval in the dealing with firewalls section.
++++++-- Document new CDROM directory.
++++++-- On Win32 working directory must have drive letter ????
++++++-- On Win32 working directory must be writable by SYSTEM to
++++++-  do restores.
++++++-- Document that ChangerDevice is used for Alert command.
++++++-- Add better documentation on how restores can be done
++++++-8. Take one more try at making DVD writing work (no go)
++++++-7. Write a bacula-web document
++++++-- Why isn't the DEVICE structure defined when doing
++++++-  a reservation?
++++++-- Multi-drive changer seems to only use drive 0
++++++-  Multiple drives don't seem to be opened.
++++++-- My database is growing
++++++-- Call GetLastError() in the berrno constructor rather
++++++-  than delaying until strerror.
++++++-- Tape xxx in drive 0, requested in drive 1
++++++-- The mount command does not work with drives other than 0.
++++++-- A mount should cause the SD to re-examine what Slot is   
++++++-  loaded.
++++++-- The SD locks on to the first available drive then
++++++-  wants a Volume that is released but in another drive --
++++++-  chaos.
++++++-- Run the regression scripts on Solaris and FreeBSD
++++++--  Figure out how to package gui, and rescue programs.
++++++-- Add a .dir command to restore tree code to eliminate the problem
++++++-- Mount after manually unloading changer causes hang in SD
++++++-- Fix JobACL with restore by JobId.
+++++++=== Done -- see kernsdone
++++++Index: kes-1.38
++++++===================================================================
++++++RCS file: /cvsroot/bacula/bacula/kes-1.38,v
++++++retrieving revision 1.1.2.13
++++++diff -u -r1.1.2.13 kes-1.38
++++++--- kes-1.38      14 Nov 2005 20:20:38 -0000      1.1.2.13
+++++++++ kes-1.38      21 Nov 2005 13:13:00 -0000
++++++@@ -3,6 +3,18 @@
++++++ 
++++++ General:
++++++ 
+++++++Changes to 1.38.2:
+++++++20Oct05
+++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
+++++++- Fix bnet-server bug found on OpenBSD. Bug #486
+++++++- Fix cancel failure bug. Bug #481
+++++++- Fix failure when Pool name has spaces. Bug #487   
+++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
+++++++- Fix a couple of free()s in src/filed/acl.c
+++++++- Fix memory overrun in bfile.c in building OS X resource
+++++++  fork filename. Bug #489 
+++++++- Add Pool name to SD status output.
+++++++
++++++ Changes to 1.38.1:
++++++ 14Oct05
++++++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
++++++Index: projects
++++++===================================================================
++++++RCS file: /cvsroot/bacula/bacula/projects,v
++++++retrieving revision 1.12.2.3
++++++diff -u -r1.12.2.3 projects
++++++--- projects      10 Nov 2005 20:25:27 -0000      1.12.2.3
+++++++++ projects      21 Nov 2005 13:13:00 -0000
++++++@@ -228,7 +228,175 @@
++++++ 
++++++   Why:    Performance enhancement.
++++++ 
+++++++Item 13:  Let Bacula log tape usage and handle drive cleaning cycles.
+++++++  Date:   November 11, 2005
+++++++  Origin: Arno Lehmann <al at its-lehmann dot de>
+++++++  Status:
+++++++
+++++++  What:   Make Bacula manage tape life cycle information and drive 
+++++++          cleaning cycles.
+++++++
+++++++  Why:    Both parts of this project are important when operating backups.
+++++++          We need to know which tapes need replacement, and we need to
+++++++          make sure the drives are cleaned when necessary.  While many
+++++++          tape libraries and even autoloaders can handle all this
+++++++          automatically, support by Bacula can be helpful for smaller
+++++++          (older) libraries and single drives.  Also, checking drive
+++++++          status during operation can prevent some failures (as I had to
+++++++          learn the hard way...)
+++++++
+++++++  Notes:  First, Bacula could (and even does, to some limited extent)
+++++++          record tape and drive usage.  For tapes, the number of mounts,
+++++++          the amount of data, and the time the tape has actually been
+++++++          running could be recorded.  Data fields for Read and Write time
+++++++          and Nmber of mounts already exist in the catalog (I'm not sure
+++++++          if VolBytes is the sum of all bytes ever written to that volume
+++++++          by Bacula).  This information can be important when determining
+++++++          which media to replace.  For the tape drives known to Bacula,
+++++++          similar information is interesting to determine the device
+++++++          status and expected life time: Time it's been Reading and
+++++++          Writing, number of tape Loads / Unloads / Errors.  This
+++++++          information is not yet recorded as far as I know.
+++++++
+++++++          The next step would be implementing drive cleaning setup.
+++++++          Bacula already has knowledge about cleaning tapes.  Once it has
+++++++          some information about cleaning cycles (measured in drive run
+++++++          time, number of tapes used, or calender days, for example) it
+++++++          can automatically execute tape cleaning (with an autochanger,
+++++++          obviously) or ask for operator assistence loading a cleaning
+++++++          tape.
+++++++
+++++++          The next step would be to implement TAPEALERT checks not only
+++++++          when changing tapes and only sending he information to the
+++++++          administrator, but rather checking after each tape error,
+++++++          checking on a regular basis (for example after each tape file),
+++++++          and also before unloading and after loading a new tape.  Then,
+++++++          depending on the drives TAPEALERT state and the know drive
+++++++          cleaning state Bacula could automatically schedule later
+++++++          cleaning, clean immediately, or inform the operator.
+++++++
+++++++          Implementing this would perhaps require another catalog change
+++++++          and perhaps major changes in SD code and the DIR-SD protocoll,
+++++++          so I'd only consider this worth implementing if it would
+++++++          actually be used or even needed by many people. 
+++++++
+++++++Item 14:  Merging of multiple backups into a single one. (Also called Synthetic
+++++++          Backup or Consolidation).
+++++++
+++++++  Origin: Marc Cousin and Eric Bollengier 
+++++++  Date:   15 November 2005
+++++++  Status: Depends on first implementing project Item 1 (Migration).
+++++++
+++++++  What:   A merged backup is a backup made without connecting to the Client.
+++++++          It would be a Merge of existing backups into a single backup.
+++++++          In effect, it is like a restore but to the backup medium.
+++++++
+++++++          For instance, say that last sunday we made a full backup.  Then
+++++++          all week long, we created incremental backups, in order to do
+++++++          them fast.  Now comes sunday again, and we need another full.
+++++++          The merged backup makes it possible to do instead an incremental
+++++++          backup (during the night for instance), and then create a merged
+++++++          backup during the day, by using the full and incrementals from
+++++++          the week.  The merged backup will be exactly like a full made
+++++++          sunday night on the tape, but the production interruption on the
+++++++          Client will be minimal, as the Client will only have to send
+++++++          incrementals.
+++++++
+++++++          In fact, if it's done correctly, you could merge all the
+++++++          Incrementals into single Incremental, or all the Incrementals
+++++++          and the last Differential into a new Differential, or the Full,
+++++++          last differential and all the Incrementals into a new Full
+++++++          backup.  And there is no need to involve the Client.
+++++++
+++++++  Why:    The benefit is that :
+++++++          - the Client just does an incremental ;
+++++++          - the merged backup on tape is just as a single full backup,
+++++++            and can be restored very fast.
+++++++
+++++++          This is also a way of reducing the backup data since the old
+++++++          data can then be pruned (or not) from the catalog, possibly
+++++++          allowing older volumes to be recycled
+++++++
+++++++Item 15:  Automatic disabling of devices
+++++++   Date:   2005-11-11
+++++++   Origin: Peter Eriksson <peter at ifm.liu dot se>
+++++++   Status:
+++++++
+++++++   What:  After a configurable amount of fatal errors with a tape drive
+++++++          Bacula should automatically disable further use of a certain
+++++++          tape drive. There should also be "disable"/"enable" commands in
+++++++          the "bconsole" tool.
+++++++
+++++++   Why:   On a multi-drive jukebox there is a possibility of tape drives
+++++++          going bad during large backups (needing a cleaning tape run,
+++++++          tapes getting stuck). It would be advantageous if Bacula would
+++++++          automatically disable further use of a problematic tape drive
+++++++          after a configurable amount of errors has occured.
+++++++
+++++++          An example: I have a multi-drive jukebox (6 drives, 380+ slots)
+++++++          where tapes occasionally get stuck inside the drive. Bacula will
+++++++          notice that the "mtx-changer" command will fail and then fail
+++++++          any backup jobs trying to use that drive. However, it will still
+++++++          keep on trying to run new jobs using that drive and fail -
+++++++          forever, and thus failing lots and lots of jobs... Since we have
+++++++          many drives Bacula could have just automatically disabled
+++++++          further use of that drive and used one of the other ones
+++++++          instead.
+++++++
+++++++
+++++++Item 16:  Directive/mode to backup only file changes, not entire file
+++++++  Date:   11 November 2005
+++++++  Origin: Joshua Kugler <joshua dot kugler at uaf dot edu>
+++++++          Marek Bajon <mbajon at bimsplus dot com dot pl>
+++++++  Status: RFC
+++++++
+++++++  What:   Currently when a file changes, the entire file will be backed up in
+++++++          the next incremental or full backup.  To save space on the tapes
+++++++          it would be nice to have a mode whereby only the changes to the
+++++++          file would be backed up when it is changed.
+++++++
+++++++  Why:    This would save lots of space when backing up large files such as 
+++++++          logs, mbox files, Outlook PST files and the like.
+++++++
+++++++  Notes:  This would require the usage of disk-based volumes as comparing 
+++++++          files would not be feasible using a tape drive.
+++++++
+++++++Item 17:  Quick release of FD-SD connection
+++++++  Origin: Frank Volf (frank at deze dot org)
+++++++  Date:   17 november 2005
+++++++  Status:
+++++++
+++++++   What:  In the bacula implementation a backup is finished after all data
+++++++          and attributes are succesfully written to storage.  When using a
+++++++          tape backup it is very annoying that a backup can take a day,
+++++++          simply because the current tape (or whatever) is full and the
+++++++          administrator has not put a new one in.  During that time the
+++++++          system cannot be taken off-line, because there is still an open
+++++++          session between the storage daemon and the file daemon on the
+++++++          client.
+++++++
+++++++          Although this is a very good strategey for making "safe backups"
+++++++          This can be annoying for e.g.  laptops, that must remain
+++++++          connected until the bacukp is completed.
+++++++
+++++++          Using a new feature called "migration" it will be possible to
+++++++          spool first to harddisk (using a special 'spool' migration
+++++++          scheme) and then migrate the backup to tape.
+++++++
+++++++          There is still the problem of getting the attributes committed.
+++++++          If it takes a very long time to do, with the current code, the
+++++++          job has not terminated, and the File daemon is not freed up.  The
+++++++          Storage daemon should release the File daemon as soon as all the
+++++++          file data and all the attributes have been sent to it (the SD).
+++++++          Currently the SD waits until everything is on tape and all the
+++++++          attributes are transmitted to the Director before signalling
+++++++          completion to the FD. I don't think I would have any problem
+++++++          changing this.  The reason is that even if the FD reports back to
+++++++          the Dir that all is OK, the job will not terminate until the SD
+++++++          has done the same thing -- so in a way keeping the SD-FD link
+++++++          open to the very end is not really very productive ...
++++++ 
+++++++   Why:   Makes backup of laptops much easier.
++++++ 
++++++ 
++++++ ============= Empty RFC form ===========
++++++@@ -245,33 +413,4 @@
++++++ ============== End RFC form ==============
++++++ 
++++++ 
++++++-Items completed for release 1.38.0:
++++++-#4   Embedded Python Scripting (implemented in all Daemons)
++++++-#5   Events that call a Python program (Implemented in all
++++++-       daemons, but more cleanup work to be done).
++++++-#6   Select one from among Multiple Storage Devices for Job.
++++++-       This is already implemented in 1.37.
++++++-#7   Single Job Writing to Multiple Storage Devices. This is
++++++-       currently implemented with a Clone feature.
++++++-#-   Full multiple drive Autochanger support (done in 1.37)
++++++-#-   Built in support for communications encryption (TLS) 
++++++-       done by Landon Fuller.
++++++-#    Support for Unicode characters
++++++-       (via UTF-8) on Win32 machines thanks to Thorsten Engel.
++++++-Item  8:  Break the one-to-one Relationship between a Job and a
++++++-          Specific Storage Device (or Devices if #10 is implemented).
++++++-
++++++-Completed items from last year's list:
++++++-Item 1:   Multiple simultaneous Jobs. (done)
++++++-Item 3:   Write the bscan program -- also write a bcopy program (done).
++++++-Item 5:   Implement Label templates (done).
++++++-Item 6:   Write a regression script (done)
++++++-Item 9:   Add SSL to daemon communications (done by Landon Fuller)
++++++-Item 10:  Define definitive tape format (done)
++++++-Item 3:   GUI for interactive restore. Partially Implemented in 1.34
++++++-          Note, there is now a complete Webmin plugin, a partial
++++++-          GNOME console, and an excellent wx-console GUI.
++++++-Item 4:   GUI for interactive backup
++++++-Item 2:   Job Data Spooling.
++++++-    Done: Regular expression matching.
++++++-Item 10:  New daemon communication protocol (this has been dropped).
+++++++Items completed for release 1.38.0 -- see kernsdone
++++++Index: patches/1.38.1-to-1.38.2.patch
++++++===================================================================
++++++RCS file: patches/1.38.1-to-1.38.2.patch
++++++diff -N patches/1.38.1-to-1.38.2.patch
++++++--- /dev/null     1 Jan 1970 00:00:00 -0000
+++++++++ patches/1.38.1-to-1.38.2.patch        21 Nov 2005 13:13:01 -0000
++++++@@ -0,0 +1,1414 @@
+++++++
+++++++ This patch fixes the following bugs:
+++++++
+++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
+++++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
+++++++  says that this patch does not fix his problem)
+++++++- Fix cancel failure bug. Bug #481
+++++++- Fix failure when Pool name has spaces. Bug #487
+++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
+++++++- Fix a couple of free()s in src/filed/acl.c
+++++++- Fix memory overrun in bfile.c in building OS X resource
+++++++  fork filename. Bug #489
+++++++
+++++++This patch is applied to Bacula source version 1.38.1 and will
+++++++produce Bacula source version 1.38.2.  Apply it with:
+++++++
+++++++   cd <bacula-1.38.1-source>
+++++++   ./configure (your options) if not already done
+++++++   patch -p0 <1.38.1-to-1.38.2.patch
+++++++   make
+++++++   make install
+++++++
+++++++? osx_finder.patch
+++++++Index: kernstodo
+++++++===================================================================
+++++++RCS file: /cvsroot/bacula/bacula/kernstodo,v
+++++++retrieving revision 1.570.2.6
+++++++diff -u -r1.570.2.6 kernstodo
+++++++--- kernstodo    4 Nov 2005 09:16:49 -0000       1.570.2.6
++++++++++ kernstodo    21 Nov 2005 13:06:36 -0000
+++++++@@ -1,5 +1,5 @@
+++++++                     Kern's ToDo List
+++++++-                     03 November 2005
++++++++                     21 November 2005
+++++++ 
+++++++ Major development:      
+++++++ Project                     Developer
+++++++@@ -7,8 +7,6 @@
+++++++ Version 1.37                Kern (see below)
+++++++ ========================================================
+++++++ 
+++++++-Final items for 1.37 before release:
+++++++-
+++++++ Document:
+++++++ - Does ClientRunAfterJob fail the job on a bad return code?
+++++++ - Document cleaning up the spool files:
+++++++@@ -18,6 +16,8 @@
+++++++ - Does WildFile match against full name?  Doc.
+++++++ 
+++++++ For 1.39:
++++++++- Make sure that all do_prompt() calls in Dir check for
++++++++  -1 (error) and -2 (cancel) returns.
+++++++ - Look at -D_FORTIFY_SOURCE=2
+++++++ - Add Win32 FileSet definition somewhere
+++++++ - Look at fixing restore status stats in SD.
+++++++@@ -27,6 +27,12 @@
+++++++   encountered, read many times (as it currently does), and if the
+++++++   block cannot be read, skip to the next block, and try again.  If
+++++++   that fails, skip to the next file and try again, ...
++++++++- Add level table:
++++++++  create table LevelType (LevelType binary(1), LevelTypeLong tinyblob);
++++++++  insert into LevelType (LevelType,LevelTypeLong) values
++++++++  ("F","Full"),
++++++++  ("D","Diff"),
++++++++  ("I","Inc");
+++++++ - Add ACL to restore only to original location.
+++++++ - Add a recursive mark command (rmark) to restore.
+++++++ - "Minimum Job Interval = nnn" sets minimum interval between Jobs
+++++++@@ -1246,219 +1252,4 @@
+++++++ ====
+++++++ 
+++++++ 
+++++++-=== Done
+++++++-- Save mount point for directories not traversed with onefs=yes.
+++++++-- Add seconds to start and end times in the Job report output.
+++++++-- if 2 concurrent backups are attempted on the same tape
+++++++-  drive (autoloader) into different tape pools, one of them will exit
+++++++-  fatally instead of halting until the drive is idle
+++++++-- Update StartTime if job held in Job Queue.
+++++++-- Look at www.nu2.nu/pebuilder as a helper for full windows
+++++++-  bare metal restore. (done by Scott)
+++++++-- Fix orphanned buffers:
+++++++-   Orphaned buffer:      24 bytes allocated at line 808 of rufus-dir job.c
+++++++-   Orphaned buffer:      40 bytes allocated at line 45 of rufus-dir alist.c
+++++++-- Implement Preben's suggestion to add
+++++++-  File System Types = ext2, ext3 
+++++++-  to FileSets, thus simplifying backup of *all* local partitions.
+++++++-- Try to open a device on each Job if it was not opened
+++++++-  when the SD started.
+++++++-- Add dump of VolSessionId/Time and FileIndex with bls.
+++++++-- If Bacula does not find the right tape in the Autochanger,
+++++++-  then mark the tape in error and move on rather than asking
+++++++-  for operator intervention.
+++++++-- Cancel command should include JobId in list of Jobs.
+++++++-- Add performance testing hooks
+++++++-- Bootstrap from JobMedia records.
+++++++-- Implement WildFile and WildDir to solve problem of 
+++++++-  saving only *.doc files.
+++++++-- Fix
+++++++-   Please use the "label"  command to create a new Volume for:
+++++++-       Storage:      DDS-4-changer
+++++++-       Media type:   
+++++++-       Pool:         Default
+++++++-   label
+++++++-   The defined Storage resources are:
+++++++-- Copy Changer Device and Changer Command from Autochanger
+++++++-  to Device resource in SD if none given in Device resource.
+++++++-- 1. Automatic use of more than one drive in an autochanger (done)
+++++++-- 2. Automatic selection of the correct drive for each Job (i.e.
+++++++-     selects a drive with an appropriate Volume for the Job) (done)
+++++++-- 6. Allow multiple simultaneous Jobs referencing the same pool write
+++++++-    to several tapes (some new directive(s) are are probably needed for
+++++++-    this) (done)
+++++++-- Locking (done)
+++++++-- Key on Storage rather than Pool (done)
+++++++-- Allow multiple drives to use same Pool (change jobq.c DIR) (done).
+++++++-- Synchronize multiple drives so that not more
+++++++-  than one loads a tape and any time (done)
+++++++-- 4. Use Changer Device and Changer Command specified in the
+++++++-     Autochanger resource, if none is found in the Device resource.
+++++++-    You can continue to specify them in the Device resource if you want
+++++++-    or need them to be different for each device.
+++++++-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") 
+++++++-    that can allow a Device be part of an Autochanger, and hence the changer
+++++++-    script protected, but if set to no, will prevent the Device from being 
+++++++-    automatically selected from the changer. This allows the device to
+++++++-    be directly accessed through its Device name, but not through the
+++++++-    AutoChanger name.
+++++++-#6   Select one from among Multiple Storage Devices for Job
+++++++-#5   Events that call a Python program 
+++++++-     (Implemented in Dir/SD)
+++++++-- Make sure the Device name is in the Query packet returned.
+++++++-- Don't start a second file job if one is already running.
+++++++-- Implement EOF/EOV labels for ANSI labels
+++++++-- Implement IBM labels.
+++++++-- When Python creates a new label, the tape is immediately
+++++++-  recycled and no label created. This happens when using   
+++++++-  autolabeling -- even when Python doesn't generate the name.
+++++++-- Scratch Pool where the volumes can be re-assigned to any Pool.
+++++++-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) 
+++++++-  is busy reading. Job 6 canceled.
+++++++-- Remove separate thread for opening devices in SD.  On the other
+++++++-  hand, don't block waiting for open() for devices.
+++++++-- Fix code to either handle updating NumVol or to calculate it in
+++++++-  Dir next_vol.c
+++++++-- Ensure that you cannot exclude a directory or a file explicitly
+++++++-  Included with File.
+++++++-#4   Embedded Python Scripting 
+++++++-     (Implemented in Dir/SD/FD)
+++++++-- Add Python writable variable for changing the Priority,
+++++++-    Client, Storage, JobStatus (error), ...
+++++++-- SD Python
+++++++-  - Solicit Events
+++++++-- Add disk seeking on restore; turn off seek on tapes.
+++++++-  stored/match_bsr.c
+++++++-- Look at dird_conf.c:1000: warning: `int size' 
+++++++-  might be used uninitialized in this function
+++++++-- Indicate when a Job is purged/pruned during restore.
+++++++-- Implement some way to turn off automatic pruning in Jobs.
+++++++-- Implement a way an Admin Job can prune, possibly multiple
+++++++-  clients -- Python script?
+++++++-- Look at Preben's acl.c error handling code.
+++++++-- SD crashes after a tape restore then doing a backup. 
+++++++-- If drive is opened read/write, close it and re-open
+++++++-  read-only if doing a restore, and vice-versa.
+++++++-- Windows restore:
+++++++-  data-fd: RestoreFiles.2004-12-07_15.56.42 Error:
+++++++-  > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der
+++++++-  > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen
+++++++-  > Prozess verwendet wird.
+++++++-  Restore restores all files, but then fails at the end trying
+++++++-  to set the attributes of e:
+++++++-  from failed jobs.- Resolve the problem between Device name and Archive name,
+++++++-  and fix SD messages.
+++++++-- Tell the "restore" user when browsing is no longer possible.
+++++++-- Add a restore directory-x
+++++++-- Write non-optimized bsrs from the JobMedia and Media records,
+++++++-  even after Files are pruned.
+++++++-- Delete Stripe and Copy from VolParams to save space.
+++++++-- Fix option 2 of restore -- list where file is backed up -- require Client,
+++++++-  then list last 20 backups.
+++++++-- Finish implementation of passing all Storage and Device needs to
+++++++-  the SD.
+++++++-- Move test for max wait time exceeded in job.c up -- Peter's idea.
+++++++-##   Consider moving docs to their own project.
+++++++-##   Move rescue to its own project.
+++++++-- Add client version to the Client name line that prints in
+++++++-  the Job report.
+++++++-- Fix the Rescue CDROM.
+++++++-- By the way: on page http://www.bacula.org/?page=tapedrives , at the 
+++++++-  bottom, the link to "Tape Testing Chapter" is broken. It goes to 
+++++++-  /html-manual/... while the others point to /rel-manual/...
+++++++-- Device resource needs the "name" of the SD.
+++++++-- Specify a single directory to restore.
+++++++-- Implement MediaType keyword in bsr?   
+++++++-- Add a date and time stamp at the beginning of every line in the 
+++++++-  Job report (Volker Sauer).
+++++++-- Add level to estimate command.
+++++++-- Add "limit=n" for "list jobs"
+++++++-- Make bootstrap filename unique.
+++++++-- Make Dmsg look at global before calling subroutine.
+++++++-- From Chris Hull:
+++++++-   it seems to be complaining about 12:00pm which should be a valid 12
+++++++-   hour time.  I changed the time to 11:59am and everything works fine.
+++++++-   Also 12:00am works fine.  0:00pm also works (which I don't think
+++++++-   should).  None of the values 12:00pm - 12:59pm work for that matter.
+++++++-- Require restore via the restore command or make a restore Job
+++++++-  get the bootstrap file.
+++++++-- Implement Maximum Job Spool Size
+++++++-- Fix 3993 error in SD. It forgets to look at autochanger
+++++++-  resource for device command, ...
+++++++-- 3. Prevent two drives requesting the same Volume in any given
+++++++-     autochanger, by checking if a Volume is mounted on another drive
+++++++-     in an Autochanger.
+++++++-- Upgrade to MySQL 4.1.12 See:  
+++++++-  http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html
+++++++-- Add # Job Level date to bsr file
+++++++-- Implement "PreferMountedVolumes = yes|no" in Job resource.
+++++++-##   Integrate web-bacula into a new Bacula project with
+++++++-     bimagemgr.
+++++++-- Cleaning tapes should have Status "Cleaning" rather than append.
+++++++-- Make sure that Python has access to Client address/port so that
+++++++-  it can check if Clients are alive.
+++++++-- Review all items in "restore".
+++++++-- Fix PostgreSQL GROUP BY problems in restore.
+++++++-- Fix PostgreSQL sql problems in bugs.
+++++++-- After rename
+++++++-  04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume 
+++++++-     "DLT-13Feb04".
+++++++-  Current Volume "DLT-04Jul05" not acceptable because:
+++++++-  1997 Volume "DLT-13Feb04" not in catalog.
+++++++-  04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device 
+++++++-     "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02
+++++++-##   Create a new GUI chapter explaining all the GUI programs.
+++++++--    Make "update slots" when pointing to Autochanger, remove
+++++++-     all Volumes from other drives.  "update slots all-drives"?
+++++++-     No, this is done by modifying mtx-changer to list what is
+++++++-     in the drives.
+++++++-- Finish TLS implementation.
+++++++-- Port limiting -m in iptables to prevent DoS attacks
+++++++-  could cause broken pipes on Bacula.
+++++++-6. Build and test the Volume Shadow Copy (VSS) for Win32. 
+++++++--  Allow cancel of unknown Job
+++++++--  State not saved when closing Win32 FD by icon
+++++++--  bsr-opt-test fails. bsr deleted. Fix.
+++++++--  Move Python daemon variables from Job to Bacula object.
+++++++-   WorkingDir, ConfigFile
+++++++-- Document that Bootstrap files can be written with cataloging
+++++++-  turned off.
+++++++-- Document details of ANSI/IBM labels
+++++++-- OS linux 2.4
+++++++-  1) ADIC, DLT, FastStor 4000, 7*20GB
+++++++-- Linux Sony LIB-D81, AIT-3 library works.
+++++++-- Doc the following
+++++++-  to activate, check or disable the hardware compression feature on my 
+++++++-  exb-8900 i use the exabyte "MammothTool" you can get it here:
+++++++-  http://www.exabyte.com/support/online/downloads/index.cfm
+++++++-  There is a solaris version of this tool. With option -C 0 or 1 you can 
+++++++-  disable or activate compression. Start this tool without any options for 
+++++++-  a small reference.
+++++++-- Document Heartbeat Interval in the dealing with firewalls section.
+++++++-- Document new CDROM directory.
+++++++-- On Win32 working directory must have drive letter ????
+++++++-- On Win32 working directory must be writable by SYSTEM to
+++++++-  do restores.
+++++++-- Document that ChangerDevice is used for Alert command.
+++++++-- Add better documentation on how restores can be done
+++++++-8. Take one more try at making DVD writing work (no go)
+++++++-7. Write a bacula-web document
+++++++-- Why isn't the DEVICE structure defined when doing
+++++++-  a reservation?
+++++++-- Multi-drive changer seems to only use drive 0
+++++++-  Multiple drives don't seem to be opened.
+++++++-- My database is growing
+++++++-- Call GetLastError() in the berrno constructor rather
+++++++-  than delaying until strerror.
+++++++-- Tape xxx in drive 0, requested in drive 1
+++++++-- The mount command does not work with drives other than 0.
+++++++-- A mount should cause the SD to re-examine what Slot is   
+++++++-  loaded.
+++++++-- The SD locks on to the first available drive then
+++++++-  wants a Volume that is released but in another drive --
+++++++-  chaos.
+++++++-- Run the regression scripts on Solaris and FreeBSD
+++++++--  Figure out how to package gui, and rescue programs.
+++++++-- Add a .dir command to restore tree code to eliminate the problem
+++++++-- Mount after manually unloading changer causes hang in SD
+++++++-- Fix JobACL with restore by JobId.
++++++++=== Done -- see kernsdone
+++++++Index: kes-1.38
+++++++===================================================================
+++++++RCS file: /cvsroot/bacula/bacula/kes-1.38,v
+++++++retrieving revision 1.1.2.13
+++++++diff -u -r1.1.2.13 kes-1.38
+++++++--- kes-1.38     14 Nov 2005 20:20:38 -0000      1.1.2.13
++++++++++ kes-1.38     21 Nov 2005 13:06:36 -0000
+++++++@@ -3,6 +3,17 @@
+++++++ 
+++++++ General:
+++++++ 
++++++++Changes after release of 1.38.1:
++++++++20Oct05
++++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
++++++++- Fix bnet-server bug found on OpenBSD. Bug #486
++++++++- Fix cancel failure bug. Bug #481
++++++++- Fix failure when Pool name has spaces. Bug #487   
++++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
++++++++- Fix a couple of free()s in src/filed/acl.c
++++++++- Fix memory overrun in bfile.c in building OS X resource
++++++++  fork filename. Bug #489 
++++++++
+++++++ Changes to 1.38.1:
+++++++ 14Oct05
+++++++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
+++++++Index: projects
+++++++===================================================================
+++++++RCS file: /cvsroot/bacula/bacula/projects,v
+++++++retrieving revision 1.12.2.3
+++++++diff -u -r1.12.2.3 projects
+++++++--- projects     10 Nov 2005 20:25:27 -0000      1.12.2.3
++++++++++ projects     21 Nov 2005 13:06:37 -0000
+++++++@@ -228,7 +228,175 @@
+++++++ 
+++++++   Why:    Performance enhancement.
+++++++ 
++++++++Item 13:  Let Bacula log tape usage and handle drive cleaning cycles.
++++++++  Date:   November 11, 2005
++++++++  Origin: Arno Lehmann <al at its-lehmann dot de>
++++++++  Status:
++++++++
++++++++  What:   Make Bacula manage tape life cycle information and drive 
++++++++          cleaning cycles.
++++++++
++++++++  Why:    Both parts of this project are important when operating backups.
++++++++          We need to know which tapes need replacement, and we need to
++++++++          make sure the drives are cleaned when necessary.  While many
++++++++          tape libraries and even autoloaders can handle all this
++++++++          automatically, support by Bacula can be helpful for smaller
++++++++          (older) libraries and single drives.  Also, checking drive
++++++++          status during operation can prevent some failures (as I had to
++++++++          learn the hard way...)
++++++++
++++++++  Notes:  First, Bacula could (and even does, to some limited extent)
++++++++          record tape and drive usage.  For tapes, the number of mounts,
++++++++          the amount of data, and the time the tape has actually been
++++++++          running could be recorded.  Data fields for Read and Write time
++++++++          and Nmber of mounts already exist in the catalog (I'm not sure
++++++++          if VolBytes is the sum of all bytes ever written to that volume
++++++++          by Bacula).  This information can be important when determining
++++++++          which media to replace.  For the tape drives known to Bacula,
++++++++          similar information is interesting to determine the device
++++++++          status and expected life time: Time it's been Reading and
++++++++          Writing, number of tape Loads / Unloads / Errors.  This
++++++++          information is not yet recorded as far as I know.
++++++++
++++++++          The next step would be implementing drive cleaning setup.
++++++++          Bacula already has knowledge about cleaning tapes.  Once it has
++++++++          some information about cleaning cycles (measured in drive run
++++++++          time, number of tapes used, or calender days, for example) it
++++++++          can automatically execute tape cleaning (with an autochanger,
++++++++          obviously) or ask for operator assistence loading a cleaning
++++++++          tape.
++++++++
++++++++          The next step would be to implement TAPEALERT checks not only
++++++++          when changing tapes and only sending he information to the
++++++++          administrator, but rather checking after each tape error,
++++++++          checking on a regular basis (for example after each tape file),
++++++++          and also before unloading and after loading a new tape.  Then,
++++++++          depending on the drives TAPEALERT state and the know drive
++++++++          cleaning state Bacula could automatically schedule later
++++++++          cleaning, clean immediately, or inform the operator.
++++++++
++++++++          Implementing this would perhaps require another catalog change
++++++++          and perhaps major changes in SD code and the DIR-SD protocoll,
++++++++          so I'd only consider this worth implementing if it would
++++++++          actually be used or even needed by many people. 
++++++++
++++++++Item 14:  Merging of multiple backups into a single one. (Also called Synthetic
++++++++          Backup or Consolidation).
++++++++
++++++++  Origin: Marc Cousin and Eric Bollengier 
++++++++  Date:   15 November 2005
++++++++  Status: Depends on first implementing project Item 1 (Migration).
++++++++
++++++++  What:   A merged backup is a backup made without connecting to the Client.
++++++++          It would be a Merge of existing backups into a single backup.
++++++++          In effect, it is like a restore but to the backup medium.
++++++++
++++++++          For instance, say that last sunday we made a full backup.  Then
++++++++          all week long, we created incremental backups, in order to do
++++++++          them fast.  Now comes sunday again, and we need another full.
++++++++          The merged backup makes it possible to do instead an incremental
++++++++          backup (during the night for instance), and then create a merged
++++++++          backup during the day, by using the full and incrementals from
++++++++          the week.  The merged backup will be exactly like a full made
++++++++          sunday night on the tape, but the production interruption on the
++++++++          Client will be minimal, as the Client will only have to send
++++++++          incrementals.
++++++++
++++++++          In fact, if it's done correctly, you could merge all the
++++++++          Incrementals into single Incremental, or all the Incrementals
++++++++          and the last Differential into a new Differential, or the Full,
++++++++          last differential and all the Incrementals into a new Full
++++++++          backup.  And there is no need to involve the Client.
++++++++
++++++++  Why:    The benefit is that :
++++++++          - the Client just does an incremental ;
++++++++          - the merged backup on tape is just as a single full backup,
++++++++            and can be restored very fast.
++++++++
++++++++          This is also a way of reducing the backup data since the old
++++++++          data can then be pruned (or not) from the catalog, possibly
++++++++          allowing older volumes to be recycled
++++++++
++++++++Item 15:  Automatic disabling of devices
++++++++   Date:   2005-11-11
++++++++   Origin: Peter Eriksson <peter at ifm.liu dot se>
++++++++   Status:
++++++++
++++++++   What:  After a configurable amount of fatal errors with a tape drive
++++++++          Bacula should automatically disable further use of a certain
++++++++          tape drive. There should also be "disable"/"enable" commands in
++++++++          the "bconsole" tool.
++++++++
++++++++   Why:   On a multi-drive jukebox there is a possibility of tape drives
++++++++          going bad during large backups (needing a cleaning tape run,
++++++++          tapes getting stuck). It would be advantageous if Bacula would
++++++++          automatically disable further use of a problematic tape drive
++++++++          after a configurable amount of errors has occured.
++++++++
++++++++          An example: I have a multi-drive jukebox (6 drives, 380+ slots)
++++++++          where tapes occasionally get stuck inside the drive. Bacula will
++++++++          notice that the "mtx-changer" command will fail and then fail
++++++++          any backup jobs trying to use that drive. However, it will still
++++++++          keep on trying to run new jobs using that drive and fail -
++++++++          forever, and thus failing lots and lots of jobs... Since we have
++++++++          many drives Bacula could have just automatically disabled
++++++++          further use of that drive and used one of the other ones
++++++++          instead.
++++++++
++++++++
++++++++Item 16:  Directive/mode to backup only file changes, not entire file
++++++++  Date:   11 November 2005
++++++++  Origin: Joshua Kugler <joshua dot kugler at uaf dot edu>
++++++++          Marek Bajon <mbajon at bimsplus dot com dot pl>
++++++++  Status: RFC
++++++++
++++++++  What:   Currently when a file changes, the entire file will be backed up in
++++++++          the next incremental or full backup.  To save space on the tapes
++++++++          it would be nice to have a mode whereby only the changes to the
++++++++          file would be backed up when it is changed.
++++++++
++++++++  Why:    This would save lots of space when backing up large files such as 
++++++++          logs, mbox files, Outlook PST files and the like.
++++++++
++++++++  Notes:  This would require the usage of disk-based volumes as comparing 
++++++++          files would not be feasible using a tape drive.
++++++++
++++++++Item 17:  Quick release of FD-SD connection
++++++++  Origin: Frank Volf (frank at deze dot org)
++++++++  Date:   17 november 2005
++++++++  Status:
++++++++
++++++++   What:  In the bacula implementation a backup is finished after all data
++++++++          and attributes are succesfully written to storage.  When using a
++++++++          tape backup it is very annoying that a backup can take a day,
++++++++          simply because the current tape (or whatever) is full and the
++++++++          administrator has not put a new one in.  During that time the
++++++++          system cannot be taken off-line, because there is still an open
++++++++          session between the storage daemon and the file daemon on the
++++++++          client.
++++++++
++++++++          Although this is a very good strategey for making "safe backups"
++++++++          This can be annoying for e.g.  laptops, that must remain
++++++++          connected until the bacukp is completed.
++++++++
++++++++          Using a new feature called "migration" it will be possible to
++++++++          spool first to harddisk (using a special 'spool' migration
++++++++          scheme) and then migrate the backup to tape.
++++++++
++++++++          There is still the problem of getting the attributes committed.
++++++++          If it takes a very long time to do, with the current code, the
++++++++          job has not terminated, and the File daemon is not freed up.  The
++++++++          Storage daemon should release the File daemon as soon as all the
++++++++          file data and all the attributes have been sent to it (the SD).
++++++++          Currently the SD waits until everything is on tape and all the
++++++++          attributes are transmitted to the Director before signalling
++++++++          completion to the FD. I don't think I would have any problem
++++++++          changing this.  The reason is that even if the FD reports back to
++++++++          the Dir that all is OK, the job will not terminate until the SD
++++++++          has done the same thing -- so in a way keeping the SD-FD link
++++++++          open to the very end is not really very productive ...
+++++++ 
++++++++   Why:   Makes backup of laptops much easier.
+++++++ 
+++++++ 
+++++++ ============= Empty RFC form ===========
+++++++@@ -245,33 +413,4 @@
+++++++ ============== End RFC form ==============
+++++++ 
+++++++ 
+++++++-Items completed for release 1.38.0:
+++++++-#4   Embedded Python Scripting (implemented in all Daemons)
+++++++-#5   Events that call a Python program (Implemented in all
+++++++-       daemons, but more cleanup work to be done).
+++++++-#6   Select one from among Multiple Storage Devices for Job.
+++++++-       This is already implemented in 1.37.
+++++++-#7   Single Job Writing to Multiple Storage Devices. This is
+++++++-       currently implemented with a Clone feature.
+++++++-#-   Full multiple drive Autochanger support (done in 1.37)
+++++++-#-   Built in support for communications encryption (TLS) 
+++++++-       done by Landon Fuller.
+++++++-#    Support for Unicode characters
+++++++-       (via UTF-8) on Win32 machines thanks to Thorsten Engel.
+++++++-Item  8:  Break the one-to-one Relationship between a Job and a
+++++++-          Specific Storage Device (or Devices if #10 is implemented).
+++++++-
+++++++-Completed items from last year's list:
+++++++-Item 1:   Multiple simultaneous Jobs. (done)
+++++++-Item 3:   Write the bscan program -- also write a bcopy program (done).
+++++++-Item 5:   Implement Label templates (done).
+++++++-Item 6:   Write a regression script (done)
+++++++-Item 9:   Add SSL to daemon communications (done by Landon Fuller)
+++++++-Item 10:  Define definitive tape format (done)
+++++++-Item 3:   GUI for interactive restore. Partially Implemented in 1.34
+++++++-          Note, there is now a complete Webmin plugin, a partial
+++++++-          GNOME console, and an excellent wx-console GUI.
+++++++-Item 4:   GUI for interactive backup
+++++++-Item 2:   Job Data Spooling.
+++++++-    Done: Regular expression matching.
+++++++-Item 10:  New daemon communication protocol (this has been dropped).
++++++++Items completed for release 1.38.0 -- see kernsdone
+++++++Index: patches/1.38.1-to-1.38.2.patch
+++++++===================================================================
+++++++RCS file: patches/1.38.1-to-1.38.2.patch
+++++++diff -N patches/1.38.1-to-1.38.2.patch
+++++++--- /dev/null    1 Jan 1970 00:00:00 -0000
++++++++++ patches/1.38.1-to-1.38.2.patch       21 Nov 2005 13:06:37 -0000
+++++++@@ -0,0 +1,412 @@
++++++++
++++++++ This patch fixes the following bugs:
++++++++
++++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
++++++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
++++++++  says that this patch does not fix his problem)
++++++++- Fix cancel failure bug. Bug #481
++++++++- Fix failure when Pool name has spaces. Bug #487
++++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
++++++++- Fix a couple of free()s in src/filed/acl.c
++++++++- Fix memory overrun in bfile.c in building OS X resource
++++++++  fork filename. Bug #489
++++++++
++++++++This patch is applied to Bacula source version 1.38.1 and will
++++++++produce Bacula source version 1.38.2.  Apply it with:
++++++++
++++++++   cd <bacula-1.38.1-source>
++++++++   ./configure (your options) if not already done
++++++++   patch -p0 <1.38.1-to-1.38.2.patch
++++++++   make
++++++++   make install
++++++++
++++++++Index: kes-1.38
++++++++===================================================================
++++++++RCS file: /cvsroot/bacula/bacula/kes-1.38,v
++++++++retrieving revision 1.1.2.13
++++++++diff -u -r1.1.2.13 kes-1.38
++++++++--- kes-1.38    14 Nov 2005 20:20:38 -0000      1.1.2.13
+++++++++++ kes-1.38    21 Nov 2005 12:53:36 -0000
++++++++@@ -3,6 +3,17 @@
++++++++ 
++++++++ General:
++++++++ 
+++++++++Changes after release of 1.38.1:
+++++++++20Oct05
+++++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
+++++++++- Fix bnet-server bug found on OpenBSD. Bug #486
+++++++++- Fix cancel failure bug. Bug #481
+++++++++- Fix failure when Pool name has spaces. Bug #487   
+++++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
+++++++++- Fix a couple of free()s in src/filed/acl.c
+++++++++- Fix memory overrun in bfile.c in building OS X resource
+++++++++  fork filename. Bug #489 
+++++++++
++++++++ Changes to 1.38.1:
++++++++ 14Oct05
++++++++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
++++++++Index: src/version.h
++++++++===================================================================
++++++++RCS file: /cvsroot/bacula/bacula/src/version.h,v
++++++++retrieving revision 1.554.2.14
++++++++diff -u -r1.554.2.14 version.h
++++++++--- src/version.h       14 Nov 2005 14:21:58 -0000      1.554.2.14
+++++++++++ src/version.h       21 Nov 2005 12:53:37 -0000
++++++++@@ -3,9 +3,9 @@
++++++++  */
++++++++ 
++++++++ #undef  VERSION
++++++++-#define VERSION "1.38.1"
++++++++-#define BDATE   "14 November 2005"
++++++++-#define LSMDATE "14Nov05"
+++++++++#define VERSION "1.38.2"
+++++++++#define BDATE   "20 November 2005"
+++++++++#define LSMDATE "20Nov05"
++++++++ 
++++++++ /* Debug flags */
++++++++ #undef  DEBUG
++++++++Index: src/dird/catreq.c
++++++++===================================================================
++++++++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v
++++++++retrieving revision 1.77.2.1
++++++++diff -u -r1.77.2.1 catreq.c
++++++++--- src/dird/catreq.c   26 Oct 2005 14:02:04 -0000      1.77.2.1
+++++++++++ src/dird/catreq.c   21 Nov 2005 12:53:37 -0000
++++++++@@ -10,7 +10,7 @@
++++++++  *  Basic tasks done here:
++++++++  *      Handle Catalog services.
++++++++  *
++++++++- *   Version $Id$
+++++++++ *   Version $Id$
++++++++  */
++++++++ /*
++++++++    Copyright (C) 2001-2005 Kern Sibbald
++++++++@@ -117,6 +117,7 @@
++++++++    if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) {
++++++++       memset(&pr, 0, sizeof(pr));
++++++++       bstrncpy(pr.Name, pool_name, sizeof(pr.Name));
+++++++++      unbash_spaces(pr.Name);
++++++++       ok = db_get_pool_record(jcr, jcr->db, &pr);
++++++++       if (ok) {
++++++++          mr.PoolId = pr.PoolId;
++++++++Index: src/dird/ua_restore.c
++++++++===================================================================
++++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v
++++++++retrieving revision 1.101.2.1
++++++++diff -u -r1.101.2.1 ua_restore.c
++++++++--- src/dird/ua_restore.c       26 Oct 2005 14:02:04 -0000      1.101.2.1
+++++++++++ src/dird/ua_restore.c       21 Nov 2005 12:53:37 -0000
++++++++@@ -10,7 +10,7 @@
++++++++  *
++++++++  *     Kern Sibbald, July MMII
++++++++  *
++++++++- *   Version $Id$
+++++++++ *   Version $Id$
++++++++  */
++++++++ /*
++++++++    Copyright (C) 2002-2005 Kern Sibbald
++++++++@@ -573,6 +573,7 @@
++++++++          }
++++++++          return 2;
++++++++ 
+++++++++      case -2:                        /* Period entered to cancel */
++++++++       case 11:                        /* Cancel or quit */
++++++++          return 0;
++++++++       }
++++++++Index: src/dird/ua_run.c
++++++++===================================================================
++++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v
++++++++retrieving revision 1.71
++++++++diff -u -r1.71 ua_run.c
++++++++--- src/dird/ua_run.c   10 Aug 2005 16:35:19 -0000      1.71
+++++++++++ src/dird/ua_run.c   21 Nov 2005 12:53:38 -0000
++++++++@@ -851,6 +851,8 @@
++++++++             bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
++++++++          }
++++++++          goto try_again;
+++++++++      case -1:                        /* error or cancel */
+++++++++         goto bail_out;
++++++++       default:
++++++++          goto try_again;
++++++++       }
++++++++Index: src/dird/ua_select.c
++++++++===================================================================
++++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v
++++++++retrieving revision 1.65.2.1
++++++++diff -u -r1.65.2.1 ua_select.c
++++++++--- src/dird/ua_select.c        12 Nov 2005 17:30:52 -0000      1.65.2.1
+++++++++++ src/dird/ua_select.c        21 Nov 2005 12:53:39 -0000
++++++++@@ -4,7 +4,7 @@
++++++++  *
++++++++  *     Kern Sibbald, October MMI
++++++++  *
++++++++- *   Version  $Id$
+++++++++ *   Version  $Id$
++++++++  */
++++++++ /*
++++++++    Copyright (C) 2001-2005 Kern Sibbald
++++++++@@ -149,7 +149,9 @@
++++++++       }
++++++++    }
++++++++    UnlockRes();
++++++++-   do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name));
+++++++++   if (do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name)) < 0) {
+++++++++      return NULL;
+++++++++   }
++++++++    store = (STORE *)GetResWithName(R_STORAGE, name);
++++++++    return store;
++++++++ }
++++++++@@ -170,7 +172,9 @@
++++++++       }
++++++++    }
++++++++    UnlockRes();
++++++++-   do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name));
+++++++++   if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) {
+++++++++      return NULL;
+++++++++   }
++++++++    fs = (FILESET *)GetResWithName(R_FILESET, name);
++++++++    return fs;
++++++++ }
++++++++@@ -202,7 +206,9 @@
++++++++          }
++++++++       }
++++++++       UnlockRes();
++++++++-      do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name));
+++++++++      if (do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name)) < 0) {
+++++++++         return NULL;
+++++++++      }
++++++++       catalog = (CAT *)GetResWithName(R_CATALOG, name);
++++++++    }
++++++++    return catalog;
++++++++@@ -225,7 +231,9 @@
++++++++       }
++++++++    }
++++++++    UnlockRes();
++++++++-   do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name));
+++++++++   if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) {
+++++++++      return NULL;
+++++++++   }
++++++++    job = (JOB *)GetResWithName(R_JOB, name);
++++++++    return job;
++++++++ }
++++++++@@ -246,7 +254,9 @@
++++++++       }
++++++++    }
++++++++    UnlockRes();
++++++++-   do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name));
+++++++++   if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) {
+++++++++      return NULL;
+++++++++   }
++++++++    job = (JOB *)GetResWithName(R_JOB, name);
++++++++    return job;
++++++++ }
++++++++@@ -269,7 +279,9 @@
++++++++       }
++++++++    }
++++++++    UnlockRes();
++++++++-   do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name));
+++++++++   if (do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) {
+++++++++      return NULL;
+++++++++   }
++++++++    client = (CLIENT *)GetResWithName(R_CLIENT, name);
++++++++    return client;
++++++++ }
++++++++@@ -551,7 +563,9 @@
++++++++       }
++++++++    }
++++++++    UnlockRes();
++++++++-   do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name));
+++++++++   if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) {
+++++++++      return NULL;
+++++++++   }
++++++++    pool = (POOL *)GetResWithName(R_POOL, name);
++++++++    return pool;
++++++++ }
++++++++@@ -673,12 +687,16 @@
++++++++  *  Returns: -1 on error
++++++++  *            index base 0 on success, and choice
++++++++  *               is copied to prompt if not NULL
+++++++++ *             prompt is set to the chosen prompt item string
++++++++  */
++++++++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
++++++++ {
++++++++    int i, item;
++++++++    char pmsg[MAXSTRING];
++++++++ 
+++++++++   if (prompt) {
+++++++++      *prompt = 0;
+++++++++   }
++++++++    if (ua->num_prompts == 2) {
++++++++       item = 1;
++++++++       if (prompt) {
++++++++@@ -698,15 +716,11 @@
++++++++       bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
++++++++    }
++++++++ 
++++++++-   if (prompt) {
++++++++-      *prompt = 0;
++++++++-   }
++++++++-
++++++++    for ( ;; ) {
++++++++       /* First item is the prompt string, not the items */
++++++++       if (ua->num_prompts == 1) {
++++++++          bsendmsg(ua, _("Selection is empty!\n"));
++++++++-         item = 0;                    /* list is empty ! */
+++++++++         item = -1;                    /* list is empty ! */
++++++++          break;
++++++++       }
++++++++       if (ua->num_prompts == 2) {
++++++++@@ -741,7 +755,7 @@
++++++++       free(ua->prompt[i]);
++++++++    }
++++++++    ua->num_prompts = 0;
++++++++-   return item - 1;
+++++++++   return item>0 ? item-1 : item;
++++++++ }
++++++++ 
++++++++ 
++++++++Index: src/dird/ua_update.c
++++++++===================================================================
++++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v
++++++++retrieving revision 1.7
++++++++diff -u -r1.7 ua_update.c
++++++++--- src/dird/ua_update.c        28 Aug 2005 12:22:02 -0000      1.7
+++++++++++ src/dird/ua_update.c        21 Nov 2005 12:53:39 -0000
++++++++@@ -590,7 +590,7 @@
++++++++          update_all_vols_from_pool(ua);
++++++++          return 1;
++++++++       default:                        /* Done or error */
++++++++-         bsendmsg(ua, _("Selection done.\n"));
+++++++++         bsendmsg(ua, _("Selection terminated.\n"));
++++++++          return 1;
++++++++       }
++++++++    }
++++++++Index: src/filed/acl.c
++++++++===================================================================
++++++++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v
++++++++retrieving revision 1.10.2.1
++++++++diff -u -r1.10.2.1 acl.c
++++++++--- src/filed/acl.c     14 Nov 2005 20:20:38 -0000      1.10.2.1
+++++++++++ src/filed/acl.c     21 Nov 2005 12:53:39 -0000
++++++++@@ -26,7 +26,7 @@
++++++++  *
++++++++  *   Written by Preben 'Peppe' Guldberg, December MMIV
++++++++  *
++++++++- *   Version $Id$
+++++++++ *   Version $Id$
++++++++  */
++++++++ /*
++++++++    Copyright (C) 2004-2005 Kern Sibbald
++++++++@@ -140,7 +140,7 @@
++++++++ 
++++++++    if ((acl_text = acl_get(jcr->last_fname)) != NULL) {
++++++++       len = pm_strcpy(jcr->acl_text, acl_text);
++++++++-      free(acl_text);
+++++++++      actuallyfree(acl_text);
++++++++       return len;
++++++++    }
++++++++    return -1;
++++++++@@ -270,7 +270,7 @@
++++++++    if ((n = getacl(jcr->last_fname, n, acls)) > 0) {
++++++++       if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) {
++++++++          len = pm_strcpy(jcr->acl_text, acl_text);
++++++++-         free(acl_text);
+++++++++         actuallyfree(acl_text);
++++++++          return len;
++++++++       }
++++++++    }
++++++++Index: src/findlib/bfile.c
++++++++===================================================================
++++++++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v
++++++++retrieving revision 1.40
++++++++diff -u -r1.40 bfile.c
++++++++--- src/findlib/bfile.c 10 Aug 2005 16:35:19 -0000      1.40
+++++++++++ src/findlib/bfile.c 21 Nov 2005 12:53:39 -0000
++++++++@@ -623,13 +623,10 @@
++++++++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
++++++++ {
++++++++    POOLMEM *rsrc_fname;
++++++++-   size_t fname_len;
++++++++ 
++++++++-   fname_len = strlen(fname);
++++++++    rsrc_fname = get_pool_memory(PM_FNAME);
++++++++-   bstrncpy(rsrc_fname, fname, fname_len + 1);
++++++++-   bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC,
++++++++-      strlen(_PATH_RSRCFORKSPEC) + 1);
+++++++++   pm_strcpy(rsrc_fname, fname);
+++++++++   pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC);
++++++++    bopen(bfd, rsrc_fname, flags, mode);
++++++++    free_pool_memory(rsrc_fname);
++++++++    return bfd->fid;
++++++++Index: src/lib/bnet_server.c
++++++++===================================================================
++++++++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v
++++++++retrieving revision 1.39
++++++++diff -u -r1.39 bnet_server.c
++++++++--- src/lib/bnet_server.c       18 Aug 2005 15:37:40 -0000      1.39
+++++++++++ src/lib/bnet_server.c       21 Nov 2005 12:53:39 -0000
++++++++@@ -153,7 +153,6 @@
++++++++          /* Error, get out */
++++++++          foreach_dlist(fd_ptr, &sockfds) {
++++++++             close(fd_ptr->fd);
++++++++-            free((void *)fd_ptr);
++++++++          }
++++++++          Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror());
++++++++          break;
++++++++Index: src/stored/autochanger.c
++++++++===================================================================
++++++++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
++++++++retrieving revision 1.47.2.3
++++++++diff -u -r1.47.2.3 autochanger.c
++++++++--- src/stored/autochanger.c    12 Nov 2005 17:30:53 -0000      1.47.2.3
+++++++++++ src/stored/autochanger.c    21 Nov 2005 12:53:39 -0000
++++++++@@ -4,7 +4,7 @@
++++++++  *
++++++++  *   Kern Sibbald, August MMII
++++++++  *                            
++++++++- *   Version $Id$
+++++++++ *   Version $Id$
++++++++  */
++++++++ /*
++++++++    Copyright (C) 2002-2005 Kern Sibbald
++++++++@@ -163,6 +163,7 @@
++++++++             rtn_stat = -1;            /* hard error */
++++++++          }
++++++++          Dmsg2(400, "load slot %d status=%d\n", slot, status);
+++++++++         unlock_changer(dcr);
++++++++       } else {
++++++++          status = 0;                  /* we got what we want */
++++++++          dev->Slot = slot;            /* set currently loaded slot */
++++++++@@ -174,7 +175,6 @@
++++++++    } else {
++++++++       rtn_stat = 0;                   /* no changer found */
++++++++    }
++++++++-   unlock_changer(dcr);
++++++++    free_pool_memory(changer);
++++++++    return rtn_stat;
++++++++ 
++++++++Index: src/tray-monitor/tray-monitor.c
++++++++===================================================================
++++++++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v
++++++++retrieving revision 1.25.2.1
++++++++diff -u -r1.25.2.1 tray-monitor.c
++++++++--- src/tray-monitor/tray-monitor.c     1 Oct 2005 10:20:18 -0000       1.25.2.1
+++++++++++ src/tray-monitor/tray-monitor.c     21 Nov 2005 12:53:39 -0000
++++++++@@ -4,7 +4,7 @@
++++++++  *
++++++++  *     Nicolas Boichat, August MMIV
++++++++  *
++++++++- *     Version $Id$
+++++++++ *     Version $Id$
++++++++  */
++++++++ 
++++++++ /*
++++++++@@ -881,7 +881,7 @@
++++++++       }
++++++++ 
++++++++       if (item->D_sock == NULL) {
++++++++-         g_slist_append(*list, (void *)_("Cannot connect to daemon.\n"));
+++++++++         g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n")));
++++++++          changeStatusMessage(item, _("Cannot connect to daemon."));
++++++++          item->state = error;
++++++++          item->oldstate = error;
+++++++Index: patches/patches-1.38.0
+++++++===================================================================
+++++++RCS file: patches/patches-1.38.0
+++++++diff -N patches/patches-1.38.0
+++++++Index: patches/patches-1.38.1
+++++++===================================================================
+++++++RCS file: patches/patches-1.38.1
+++++++diff -N patches/patches-1.38.1
+++++++--- /dev/null    1 Jan 1970 00:00:00 -0000
++++++++++ patches/patches-1.38.1       21 Nov 2005 13:06:37 -0000
+++++++@@ -0,0 +1,14 @@
++++++++20Nov05 1.38.1-to-1.38.2.patch
++++++++ This patch fixes the following bugs:
++++++++
++++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
++++++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
++++++++  says this patch does not fix his problem)
++++++++- Fix cancel failure bug. Bug #481
++++++++- Fix failure when Pool name has spaces. Bug #487
++++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
++++++++- Fix a couple of free()s in src/filed/acl.c
++++++++- Fix memory overrun in bfile.c in building OS X resource
++++++++  fork filename. Bug #489
++++++++                         
++++++++  
+++++++Index: src/version.h
+++++++===================================================================
+++++++RCS file: /cvsroot/bacula/bacula/src/version.h,v
+++++++retrieving revision 1.554.2.14
+++++++diff -u -r1.554.2.14 version.h
+++++++--- src/version.h        14 Nov 2005 14:21:58 -0000      1.554.2.14
++++++++++ src/version.h        21 Nov 2005 13:06:37 -0000
+++++++@@ -3,9 +3,9 @@
+++++++  */
+++++++ 
+++++++ #undef  VERSION
+++++++-#define VERSION "1.38.1"
+++++++-#define BDATE   "14 November 2005"
+++++++-#define LSMDATE "14Nov05"
++++++++#define VERSION "1.38.2"
++++++++#define BDATE   "20 November 2005"
++++++++#define LSMDATE "20Nov05"
+++++++ 
+++++++ /* Debug flags */
+++++++ #undef  DEBUG
+++++++Index: src/dird/catreq.c
+++++++===================================================================
+++++++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v
+++++++retrieving revision 1.77.2.1
+++++++diff -u -r1.77.2.1 catreq.c
+++++++--- src/dird/catreq.c    26 Oct 2005 14:02:04 -0000      1.77.2.1
++++++++++ src/dird/catreq.c    21 Nov 2005 13:06:37 -0000
+++++++@@ -10,7 +10,7 @@
+++++++  *  Basic tasks done here:
+++++++  *      Handle Catalog services.
+++++++  *
+++++++- *   Version $Id$
++++++++ *   Version $Id$
+++++++  */
+++++++ /*
+++++++    Copyright (C) 2001-2005 Kern Sibbald
+++++++@@ -117,6 +117,7 @@
+++++++    if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) {
+++++++       memset(&pr, 0, sizeof(pr));
+++++++       bstrncpy(pr.Name, pool_name, sizeof(pr.Name));
++++++++      unbash_spaces(pr.Name);
+++++++       ok = db_get_pool_record(jcr, jcr->db, &pr);
+++++++       if (ok) {
+++++++          mr.PoolId = pr.PoolId;
+++++++Index: src/dird/ua_restore.c
+++++++===================================================================
+++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v
+++++++retrieving revision 1.101.2.1
+++++++diff -u -r1.101.2.1 ua_restore.c
+++++++--- src/dird/ua_restore.c        26 Oct 2005 14:02:04 -0000      1.101.2.1
++++++++++ src/dird/ua_restore.c        21 Nov 2005 13:06:37 -0000
+++++++@@ -10,7 +10,7 @@
+++++++  *
+++++++  *     Kern Sibbald, July MMII
+++++++  *
+++++++- *   Version $Id$
++++++++ *   Version $Id$
+++++++  */
+++++++ /*
+++++++    Copyright (C) 2002-2005 Kern Sibbald
+++++++@@ -573,6 +573,7 @@
+++++++          }
+++++++          return 2;
+++++++ 
++++++++      case -2:                        /* Period entered to cancel */
+++++++       case 11:                        /* Cancel or quit */
+++++++          return 0;
+++++++       }
+++++++Index: src/dird/ua_run.c
+++++++===================================================================
+++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v
+++++++retrieving revision 1.71
+++++++diff -u -r1.71 ua_run.c
+++++++--- src/dird/ua_run.c    10 Aug 2005 16:35:19 -0000      1.71
++++++++++ src/dird/ua_run.c    21 Nov 2005 13:06:38 -0000
+++++++@@ -851,6 +851,8 @@
+++++++             bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
+++++++          }
+++++++          goto try_again;
++++++++      case -1:                        /* error or cancel */
++++++++         goto bail_out;
+++++++       default:
+++++++          goto try_again;
+++++++       }
+++++++Index: src/dird/ua_select.c
+++++++===================================================================
+++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v
+++++++retrieving revision 1.65.2.1
+++++++diff -u -r1.65.2.1 ua_select.c
+++++++--- src/dird/ua_select.c 12 Nov 2005 17:30:52 -0000      1.65.2.1
++++++++++ src/dird/ua_select.c 21 Nov 2005 13:06:38 -0000
+++++++@@ -4,7 +4,7 @@
+++++++  *
+++++++  *     Kern Sibbald, October MMI
+++++++  *
+++++++- *   Version  $Id$
++++++++ *   Version  $Id$
+++++++  */
+++++++ /*
+++++++    Copyright (C) 2001-2005 Kern Sibbald
+++++++@@ -149,7 +149,9 @@
+++++++       }
+++++++    }
+++++++    UnlockRes();
+++++++-   do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name));
++++++++   if (do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name)) < 0) {
++++++++      return NULL;
++++++++   }
+++++++    store = (STORE *)GetResWithName(R_STORAGE, name);
+++++++    return store;
+++++++ }
+++++++@@ -170,7 +172,9 @@
+++++++       }
+++++++    }
+++++++    UnlockRes();
+++++++-   do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name));
++++++++   if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) {
++++++++      return NULL;
++++++++   }
+++++++    fs = (FILESET *)GetResWithName(R_FILESET, name);
+++++++    return fs;
+++++++ }
+++++++@@ -202,7 +206,9 @@
+++++++          }
+++++++       }
+++++++       UnlockRes();
+++++++-      do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name));
++++++++      if (do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name)) < 0) {
++++++++         return NULL;
++++++++      }
+++++++       catalog = (CAT *)GetResWithName(R_CATALOG, name);
+++++++    }
+++++++    return catalog;
+++++++@@ -225,7 +231,9 @@
+++++++       }
+++++++    }
+++++++    UnlockRes();
+++++++-   do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name));
++++++++   if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) {
++++++++      return NULL;
++++++++   }
+++++++    job = (JOB *)GetResWithName(R_JOB, name);
+++++++    return job;
+++++++ }
+++++++@@ -246,7 +254,9 @@
+++++++       }
+++++++    }
+++++++    UnlockRes();
+++++++-   do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name));
++++++++   if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) {
++++++++      return NULL;
++++++++   }
+++++++    job = (JOB *)GetResWithName(R_JOB, name);
+++++++    return job;
+++++++ }
+++++++@@ -269,7 +279,9 @@
+++++++       }
+++++++    }
+++++++    UnlockRes();
+++++++-   do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name));
++++++++   if (do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) {
++++++++      return NULL;
++++++++   }
+++++++    client = (CLIENT *)GetResWithName(R_CLIENT, name);
+++++++    return client;
+++++++ }
+++++++@@ -551,7 +563,9 @@
+++++++       }
+++++++    }
+++++++    UnlockRes();
+++++++-   do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name));
++++++++   if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) {
++++++++      return NULL;
++++++++   }
+++++++    pool = (POOL *)GetResWithName(R_POOL, name);
+++++++    return pool;
+++++++ }
+++++++@@ -673,12 +687,16 @@
+++++++  *  Returns: -1 on error
+++++++  *            index base 0 on success, and choice
+++++++  *               is copied to prompt if not NULL
++++++++ *             prompt is set to the chosen prompt item string
+++++++  */
+++++++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
+++++++ {
+++++++    int i, item;
+++++++    char pmsg[MAXSTRING];
+++++++ 
++++++++   if (prompt) {
++++++++      *prompt = 0;
++++++++   }
+++++++    if (ua->num_prompts == 2) {
+++++++       item = 1;
+++++++       if (prompt) {
+++++++@@ -698,15 +716,11 @@
+++++++       bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
+++++++    }
+++++++ 
+++++++-   if (prompt) {
+++++++-      *prompt = 0;
+++++++-   }
+++++++-
+++++++    for ( ;; ) {
+++++++       /* First item is the prompt string, not the items */
+++++++       if (ua->num_prompts == 1) {
+++++++          bsendmsg(ua, _("Selection is empty!\n"));
+++++++-         item = 0;                    /* list is empty ! */
++++++++         item = -1;                    /* list is empty ! */
+++++++          break;
+++++++       }
+++++++       if (ua->num_prompts == 2) {
+++++++@@ -741,7 +755,7 @@
+++++++       free(ua->prompt[i]);
+++++++    }
+++++++    ua->num_prompts = 0;
+++++++-   return item - 1;
++++++++   return item>0 ? item-1 : item;
+++++++ }
+++++++ 
+++++++ 
+++++++Index: src/dird/ua_update.c
+++++++===================================================================
+++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v
+++++++retrieving revision 1.7
+++++++diff -u -r1.7 ua_update.c
+++++++--- src/dird/ua_update.c 28 Aug 2005 12:22:02 -0000      1.7
++++++++++ src/dird/ua_update.c 21 Nov 2005 13:06:38 -0000
+++++++@@ -590,7 +590,7 @@
+++++++          update_all_vols_from_pool(ua);
+++++++          return 1;
+++++++       default:                        /* Done or error */
+++++++-         bsendmsg(ua, _("Selection done.\n"));
++++++++         bsendmsg(ua, _("Selection terminated.\n"));
+++++++          return 1;
+++++++       }
+++++++    }
+++++++Index: src/filed/acl.c
+++++++===================================================================
+++++++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v
+++++++retrieving revision 1.10.2.1
+++++++diff -u -r1.10.2.1 acl.c
+++++++--- src/filed/acl.c      14 Nov 2005 20:20:38 -0000      1.10.2.1
++++++++++ src/filed/acl.c      21 Nov 2005 13:06:38 -0000
+++++++@@ -26,7 +26,7 @@
+++++++  *
+++++++  *   Written by Preben 'Peppe' Guldberg, December MMIV
+++++++  *
+++++++- *   Version $Id$
++++++++ *   Version $Id$
+++++++  */
+++++++ /*
+++++++    Copyright (C) 2004-2005 Kern Sibbald
+++++++@@ -140,7 +140,7 @@
+++++++ 
+++++++    if ((acl_text = acl_get(jcr->last_fname)) != NULL) {
+++++++       len = pm_strcpy(jcr->acl_text, acl_text);
+++++++-      free(acl_text);
++++++++      actuallyfree(acl_text);
+++++++       return len;
+++++++    }
+++++++    return -1;
+++++++@@ -270,7 +270,7 @@
+++++++    if ((n = getacl(jcr->last_fname, n, acls)) > 0) {
+++++++       if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) {
+++++++          len = pm_strcpy(jcr->acl_text, acl_text);
+++++++-         free(acl_text);
++++++++         actuallyfree(acl_text);
+++++++          return len;
+++++++       }
+++++++    }
+++++++Index: src/findlib/bfile.c
+++++++===================================================================
+++++++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v
+++++++retrieving revision 1.40
+++++++diff -u -r1.40 bfile.c
+++++++--- src/findlib/bfile.c  10 Aug 2005 16:35:19 -0000      1.40
++++++++++ src/findlib/bfile.c  21 Nov 2005 13:06:38 -0000
+++++++@@ -623,13 +623,10 @@
+++++++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
+++++++ {
+++++++    POOLMEM *rsrc_fname;
+++++++-   size_t fname_len;
+++++++ 
+++++++-   fname_len = strlen(fname);
+++++++    rsrc_fname = get_pool_memory(PM_FNAME);
+++++++-   bstrncpy(rsrc_fname, fname, fname_len + 1);
+++++++-   bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC,
+++++++-      strlen(_PATH_RSRCFORKSPEC) + 1);
++++++++   pm_strcpy(rsrc_fname, fname);
++++++++   pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC);
+++++++    bopen(bfd, rsrc_fname, flags, mode);
+++++++    free_pool_memory(rsrc_fname);
+++++++    return bfd->fid;
+++++++Index: src/lib/bnet_server.c
+++++++===================================================================
+++++++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v
+++++++retrieving revision 1.39
+++++++diff -u -r1.39 bnet_server.c
+++++++--- src/lib/bnet_server.c        18 Aug 2005 15:37:40 -0000      1.39
++++++++++ src/lib/bnet_server.c        21 Nov 2005 13:06:38 -0000
+++++++@@ -153,7 +153,6 @@
+++++++          /* Error, get out */
+++++++          foreach_dlist(fd_ptr, &sockfds) {
+++++++             close(fd_ptr->fd);
+++++++-            free((void *)fd_ptr);
+++++++          }
+++++++          Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror());
+++++++          break;
+++++++Index: src/stored/autochanger.c
+++++++===================================================================
+++++++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
+++++++retrieving revision 1.47.2.3
+++++++diff -u -r1.47.2.3 autochanger.c
+++++++--- src/stored/autochanger.c     12 Nov 2005 17:30:53 -0000      1.47.2.3
++++++++++ src/stored/autochanger.c     21 Nov 2005 13:06:38 -0000
+++++++@@ -4,7 +4,7 @@
+++++++  *
+++++++  *   Kern Sibbald, August MMII
+++++++  *                            
+++++++- *   Version $Id$
++++++++ *   Version $Id$
+++++++  */
+++++++ /*
+++++++    Copyright (C) 2002-2005 Kern Sibbald
+++++++@@ -163,6 +163,7 @@
+++++++             rtn_stat = -1;            /* hard error */
+++++++          }
+++++++          Dmsg2(400, "load slot %d status=%d\n", slot, status);
++++++++         unlock_changer(dcr);
+++++++       } else {
+++++++          status = 0;                  /* we got what we want */
+++++++          dev->Slot = slot;            /* set currently loaded slot */
+++++++@@ -174,7 +175,6 @@
+++++++    } else {
+++++++       rtn_stat = 0;                   /* no changer found */
+++++++    }
+++++++-   unlock_changer(dcr);
+++++++    free_pool_memory(changer);
+++++++    return rtn_stat;
+++++++ 
+++++++Index: src/stored/status.c
+++++++===================================================================
+++++++RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v
+++++++retrieving revision 1.44.2.1
+++++++diff -u -r1.44.2.1 status.c
+++++++--- src/stored/status.c  6 Oct 2005 07:04:13 -0000       1.44.2.1
++++++++++ src/stored/status.c  21 Nov 2005 13:06:39 -0000
+++++++@@ -264,6 +264,7 @@
+++++++    bool found = false;
+++++++    int bps, sec;
+++++++    JCR *jcr;
++++++++   DCR *dcr;
+++++++    char JobName[MAX_NAME_LENGTH];
+++++++    char b1[30], b2[30], b3[30];
+++++++ 
+++++++@@ -273,7 +274,8 @@
+++++++          bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"),
+++++++             job_type_to_str(jcr->JobType), jcr->Job);
+++++++       }
+++++++-      if (jcr->dcr && jcr->dcr->device) {
++++++++      dcr = jcr->dcr;
++++++++      if (dcr && dcr->device) {
+++++++          bstrncpy(JobName, jcr->Job, sizeof(JobName));
+++++++          /* There are three periods after the Job name */
+++++++          char *p;
+++++++@@ -282,13 +284,16 @@
+++++++                *p = 0;
+++++++             }
+++++++          }
+++++++-         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"),
++++++++         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n"
++++++++                            "    pool=\"%s\" device=\"%s\"\n"),
+++++++                    job_level_to_str(jcr->JobLevel),
+++++++                    job_type_to_str(jcr->JobType),
+++++++                    JobName,
+++++++                    jcr->JobId,
+++++++-                   jcr->dcr->VolumeName,
+++++++-                   jcr->dcr->device->device_name);
++++++++                   dcr->VolumeName,
++++++++                   dcr->pool_name,
++++++++                   dcr->dev?dcr->dev->print_name(): 
++++++++                            dcr->device->device_name);
+++++++          sec = time(NULL) - jcr->run_time;
+++++++          if (sec <= 0) {
+++++++             sec = 1;
+++++++Index: src/stored/stored_conf.c
+++++++===================================================================
+++++++RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v
+++++++retrieving revision 1.76
+++++++diff -u -r1.76 stored_conf.c
+++++++--- src/stored/stored_conf.c     9 Sep 2005 09:40:04 -0000       1.76
++++++++++ src/stored/stored_conf.c     21 Nov 2005 13:06:39 -0000
+++++++@@ -222,16 +222,16 @@
+++++++          res->res_dev.hdr.name,
+++++++          res->res_dev.media_type, res->res_dev.device_name,
+++++++          res->res_dev.label_type);
+++++++-      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d\n",
++++++++      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n",
+++++++          res->res_dev.max_rewind_wait, res->res_dev.min_block_size,
+++++++-         res->res_dev.max_block_size);
++++++++         res->res_dev.max_block_size, res->res_dev.max_changer_wait);
+++++++       sendit(sock, "        max_jobs=%d max_files=%" lld " max_size=%" lld "\n",
+++++++          res->res_dev.max_volume_jobs, res->res_dev.max_volume_files,
+++++++          res->res_dev.max_volume_size);
+++++++       sendit(sock, "        max_file_size=%" lld " capacity=%" lld "\n",
+++++++          res->res_dev.max_file_size, res->res_dev.volume_capacity);
+++++++-      sendit(sock, "         spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
+++++++-      sendit(sock, "         max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
++++++++      sendit(sock, "        spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
++++++++      sendit(sock, "        max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
+++++++          res->res_dev.max_spool_size, res->res_dev.max_job_spool_size);
+++++++       if (res->res_dev.changer_res) {
+++++++          sendit(sock, "         changer=%p\n", res->res_dev.changer_res);
+++++++Index: src/tray-monitor/tray-monitor.c
+++++++===================================================================
+++++++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v
+++++++retrieving revision 1.25.2.1
+++++++diff -u -r1.25.2.1 tray-monitor.c
+++++++--- src/tray-monitor/tray-monitor.c      1 Oct 2005 10:20:18 -0000       1.25.2.1
++++++++++ src/tray-monitor/tray-monitor.c      21 Nov 2005 13:06:39 -0000
+++++++@@ -4,7 +4,7 @@
+++++++  *
+++++++  *     Nicolas Boichat, August MMIV
+++++++  *
+++++++- *     Version $Id$
++++++++ *     Version $Id$
+++++++  */
+++++++ 
+++++++ /*
+++++++@@ -881,7 +881,7 @@
+++++++       }
+++++++ 
+++++++       if (item->D_sock == NULL) {
+++++++-         g_slist_append(*list, (void *)_("Cannot connect to daemon.\n"));
++++++++         g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n")));
+++++++          changeStatusMessage(item, _("Cannot connect to daemon."));
+++++++          item->state = error;
+++++++          item->oldstate = error;
++++++Index: patches/patches-1.38.0
++++++===================================================================
++++++RCS file: patches/patches-1.38.0
++++++diff -N patches/patches-1.38.0
++++++Index: patches/patches-1.38.1
++++++===================================================================
++++++RCS file: patches/patches-1.38.1
++++++diff -N patches/patches-1.38.1
++++++--- /dev/null     1 Jan 1970 00:00:00 -0000
+++++++++ patches/patches-1.38.1        21 Nov 2005 13:13:01 -0000
++++++@@ -0,0 +1,14 @@
+++++++20Nov05 1.38.1-to-1.38.2.patch
+++++++ This patch fixes the following bugs:
+++++++
+++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
+++++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
+++++++  says this patch does not fix his problem)
+++++++- Fix cancel failure bug. Bug #481
+++++++- Fix failure when Pool name has spaces. Bug #487
+++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
+++++++- Fix a couple of free()s in src/filed/acl.c
+++++++- Fix memory overrun in bfile.c in building OS X resource
+++++++  fork filename. Bug #489
+++++++                         
+++++++  
++++++Index: src/version.h
++++++===================================================================
++++++RCS file: /cvsroot/bacula/bacula/src/version.h,v
++++++retrieving revision 1.554.2.14
++++++diff -u -r1.554.2.14 version.h
++++++--- src/version.h 14 Nov 2005 14:21:58 -0000      1.554.2.14
+++++++++ src/version.h 21 Nov 2005 13:13:01 -0000
++++++@@ -3,9 +3,9 @@
++++++  */
++++++ 
++++++ #undef  VERSION
++++++-#define VERSION "1.38.1"
++++++-#define BDATE   "14 November 2005"
++++++-#define LSMDATE "14Nov05"
+++++++#define VERSION "1.38.2"
+++++++#define BDATE   "20 November 2005"
+++++++#define LSMDATE "20Nov05"
++++++ 
++++++ /* Debug flags */
++++++ #undef  DEBUG
++++++Index: src/dird/catreq.c
++++++===================================================================
++++++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v
++++++retrieving revision 1.77.2.1
++++++diff -u -r1.77.2.1 catreq.c
++++++--- src/dird/catreq.c     26 Oct 2005 14:02:04 -0000      1.77.2.1
+++++++++ src/dird/catreq.c     21 Nov 2005 13:13:01 -0000
++++++@@ -10,7 +10,7 @@
++++++  *  Basic tasks done here:
++++++  *      Handle Catalog services.
++++++  *
++++++- *   Version $Id$
+++++++ *   Version $Id$
++++++  */
++++++ /*
++++++    Copyright (C) 2001-2005 Kern Sibbald
++++++@@ -117,6 +117,7 @@
++++++    if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) {
++++++       memset(&pr, 0, sizeof(pr));
++++++       bstrncpy(pr.Name, pool_name, sizeof(pr.Name));
+++++++      unbash_spaces(pr.Name);
++++++       ok = db_get_pool_record(jcr, jcr->db, &pr);
++++++       if (ok) {
++++++          mr.PoolId = pr.PoolId;
++++++Index: src/dird/ua_restore.c
++++++===================================================================
++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v
++++++retrieving revision 1.101.2.1
++++++diff -u -r1.101.2.1 ua_restore.c
++++++--- src/dird/ua_restore.c 26 Oct 2005 14:02:04 -0000      1.101.2.1
+++++++++ src/dird/ua_restore.c 21 Nov 2005 13:13:01 -0000
++++++@@ -10,7 +10,7 @@
++++++  *
++++++  *     Kern Sibbald, July MMII
++++++  *
++++++- *   Version $Id$
+++++++ *   Version $Id$
++++++  */
++++++ /*
++++++    Copyright (C) 2002-2005 Kern Sibbald
++++++@@ -409,7 +409,7 @@
++++++       }
++++++       done = true;
++++++       switch (do_prompt(ua, "", _("Select item: "), NULL, 0)) {
++++++-      case -1:                        /* error */
+++++++      case -1:                        /* error or cancel */
++++++          return 0;
++++++       case 0:                         /* list last 20 Jobs run */
++++++          gui_save = ua->jcr->gui;
++++++Index: src/dird/ua_run.c
++++++===================================================================
++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v
++++++retrieving revision 1.71
++++++diff -u -r1.71 ua_run.c
++++++--- src/dird/ua_run.c     10 Aug 2005 16:35:19 -0000      1.71
+++++++++ src/dird/ua_run.c     21 Nov 2005 13:13:02 -0000
++++++@@ -851,6 +851,8 @@
++++++             bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
++++++          }
++++++          goto try_again;
+++++++      case -1:                        /* error or cancel */
+++++++         goto bail_out;
++++++       default:
++++++          goto try_again;
++++++       }
++++++Index: src/dird/ua_select.c
++++++===================================================================
++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v
++++++retrieving revision 1.65.2.1
++++++diff -u -r1.65.2.1 ua_select.c
++++++--- src/dird/ua_select.c  12 Nov 2005 17:30:52 -0000      1.65.2.1
+++++++++ src/dird/ua_select.c  21 Nov 2005 13:13:02 -0000
++++++@@ -4,7 +4,7 @@
++++++  *
++++++  *     Kern Sibbald, October MMI
++++++  *
++++++- *   Version  $Id$
+++++++ *   Version  $Id$
++++++  */
++++++ /*
++++++    Copyright (C) 2001-2005 Kern Sibbald
++++++@@ -149,7 +149,9 @@
++++++       }
++++++    }
++++++    UnlockRes();
++++++-   do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name));
+++++++   if (do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name)) < 0) {
+++++++      return NULL;
+++++++   }
++++++    store = (STORE *)GetResWithName(R_STORAGE, name);
++++++    return store;
++++++ }
++++++@@ -170,7 +172,9 @@
++++++       }
++++++    }
++++++    UnlockRes();
++++++-   do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name));
+++++++   if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) {
+++++++      return NULL;
+++++++   }
++++++    fs = (FILESET *)GetResWithName(R_FILESET, name);
++++++    return fs;
++++++ }
++++++@@ -202,7 +206,9 @@
++++++          }
++++++       }
++++++       UnlockRes();
++++++-      do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name));
+++++++      if (do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name)) < 0) {
+++++++         return NULL;
+++++++      }
++++++       catalog = (CAT *)GetResWithName(R_CATALOG, name);
++++++    }
++++++    return catalog;
++++++@@ -225,7 +231,9 @@
++++++       }
++++++    }
++++++    UnlockRes();
++++++-   do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name));
+++++++   if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) {
+++++++      return NULL;
+++++++   }
++++++    job = (JOB *)GetResWithName(R_JOB, name);
++++++    return job;
++++++ }
++++++@@ -246,7 +254,9 @@
++++++       }
++++++    }
++++++    UnlockRes();
++++++-   do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name));
+++++++   if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) {
+++++++      return NULL;
+++++++   }
++++++    job = (JOB *)GetResWithName(R_JOB, name);
++++++    return job;
++++++ }
++++++@@ -269,7 +279,9 @@
++++++       }
++++++    }
++++++    UnlockRes();
++++++-   do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name));
+++++++   if (do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) {
+++++++      return NULL;
+++++++   }
++++++    client = (CLIENT *)GetResWithName(R_CLIENT, name);
++++++    return client;
++++++ }
++++++@@ -551,7 +563,9 @@
++++++       }
++++++    }
++++++    UnlockRes();
++++++-   do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name));
+++++++   if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) {
+++++++      return NULL;
+++++++   }
++++++    pool = (POOL *)GetResWithName(R_POOL, name);
++++++    return pool;
++++++ }
++++++@@ -673,12 +687,16 @@
++++++  *  Returns: -1 on error
++++++  *            index base 0 on success, and choice
++++++  *               is copied to prompt if not NULL
+++++++ *             prompt is set to the chosen prompt item string
++++++  */
++++++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
++++++ {
++++++    int i, item;
++++++    char pmsg[MAXSTRING];
++++++ 
+++++++   if (prompt) {
+++++++      *prompt = 0;
+++++++   }
++++++    if (ua->num_prompts == 2) {
++++++       item = 1;
++++++       if (prompt) {
++++++@@ -698,15 +716,11 @@
++++++       bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
++++++    }
++++++ 
++++++-   if (prompt) {
++++++-      *prompt = 0;
++++++-   }
++++++-
++++++    for ( ;; ) {
++++++       /* First item is the prompt string, not the items */
++++++       if (ua->num_prompts == 1) {
++++++          bsendmsg(ua, _("Selection is empty!\n"));
++++++-         item = 0;                    /* list is empty ! */
+++++++         item = -1;                    /* list is empty ! */
++++++          break;
++++++       }
++++++       if (ua->num_prompts == 2) {
++++++@@ -741,7 +755,7 @@
++++++       free(ua->prompt[i]);
++++++    }
++++++    ua->num_prompts = 0;
++++++-   return item - 1;
+++++++   return item>0 ? item-1 : item;
++++++ }
++++++ 
++++++ 
++++++Index: src/dird/ua_update.c
++++++===================================================================
++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v
++++++retrieving revision 1.7
++++++diff -u -r1.7 ua_update.c
++++++--- src/dird/ua_update.c  28 Aug 2005 12:22:02 -0000      1.7
+++++++++ src/dird/ua_update.c  21 Nov 2005 13:13:02 -0000
++++++@@ -590,7 +590,7 @@
++++++          update_all_vols_from_pool(ua);
++++++          return 1;
++++++       default:                        /* Done or error */
++++++-         bsendmsg(ua, _("Selection done.\n"));
+++++++         bsendmsg(ua, _("Selection terminated.\n"));
++++++          return 1;
++++++       }
++++++    }
++++++Index: src/filed/acl.c
++++++===================================================================
++++++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v
++++++retrieving revision 1.10.2.1
++++++diff -u -r1.10.2.1 acl.c
++++++--- src/filed/acl.c       14 Nov 2005 20:20:38 -0000      1.10.2.1
+++++++++ src/filed/acl.c       21 Nov 2005 13:13:02 -0000
++++++@@ -26,7 +26,7 @@
++++++  *
++++++  *   Written by Preben 'Peppe' Guldberg, December MMIV
++++++  *
++++++- *   Version $Id$
+++++++ *   Version $Id$
++++++  */
++++++ /*
++++++    Copyright (C) 2004-2005 Kern Sibbald
++++++@@ -140,7 +140,7 @@
++++++ 
++++++    if ((acl_text = acl_get(jcr->last_fname)) != NULL) {
++++++       len = pm_strcpy(jcr->acl_text, acl_text);
++++++-      free(acl_text);
+++++++      actuallyfree(acl_text);
++++++       return len;
++++++    }
++++++    return -1;
++++++@@ -270,7 +270,7 @@
++++++    if ((n = getacl(jcr->last_fname, n, acls)) > 0) {
++++++       if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) {
++++++          len = pm_strcpy(jcr->acl_text, acl_text);
++++++-         free(acl_text);
+++++++         actuallyfree(acl_text);
++++++          return len;
++++++       }
++++++    }
++++++Index: src/findlib/bfile.c
++++++===================================================================
++++++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v
++++++retrieving revision 1.40
++++++diff -u -r1.40 bfile.c
++++++--- src/findlib/bfile.c   10 Aug 2005 16:35:19 -0000      1.40
+++++++++ src/findlib/bfile.c   21 Nov 2005 13:13:02 -0000
++++++@@ -623,13 +623,10 @@
++++++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
++++++ {
++++++    POOLMEM *rsrc_fname;
++++++-   size_t fname_len;
++++++ 
++++++-   fname_len = strlen(fname);
++++++    rsrc_fname = get_pool_memory(PM_FNAME);
++++++-   bstrncpy(rsrc_fname, fname, fname_len + 1);
++++++-   bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC,
++++++-      strlen(_PATH_RSRCFORKSPEC) + 1);
+++++++   pm_strcpy(rsrc_fname, fname);
+++++++   pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC);
++++++    bopen(bfd, rsrc_fname, flags, mode);
++++++    free_pool_memory(rsrc_fname);
++++++    return bfd->fid;
++++++Index: src/lib/bnet_server.c
++++++===================================================================
++++++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v
++++++retrieving revision 1.39
++++++diff -u -r1.39 bnet_server.c
++++++--- src/lib/bnet_server.c 18 Aug 2005 15:37:40 -0000      1.39
+++++++++ src/lib/bnet_server.c 21 Nov 2005 13:13:03 -0000
++++++@@ -153,7 +153,6 @@
++++++          /* Error, get out */
++++++          foreach_dlist(fd_ptr, &sockfds) {
++++++             close(fd_ptr->fd);
++++++-            free((void *)fd_ptr);
++++++          }
++++++          Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror());
++++++          break;
++++++Index: src/stored/autochanger.c
++++++===================================================================
++++++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
++++++retrieving revision 1.47.2.3
++++++diff -u -r1.47.2.3 autochanger.c
++++++--- src/stored/autochanger.c      12 Nov 2005 17:30:53 -0000      1.47.2.3
+++++++++ src/stored/autochanger.c      21 Nov 2005 13:13:03 -0000
++++++@@ -4,7 +4,7 @@
++++++  *
++++++  *   Kern Sibbald, August MMII
++++++  *                            
++++++- *   Version $Id$
+++++++ *   Version $Id$
++++++  */
++++++ /*
++++++    Copyright (C) 2002-2005 Kern Sibbald
++++++@@ -163,6 +163,7 @@
++++++             rtn_stat = -1;            /* hard error */
++++++          }
++++++          Dmsg2(400, "load slot %d status=%d\n", slot, status);
+++++++         unlock_changer(dcr);
++++++       } else {
++++++          status = 0;                  /* we got what we want */
++++++          dev->Slot = slot;            /* set currently loaded slot */
++++++@@ -174,7 +175,6 @@
++++++    } else {
++++++       rtn_stat = 0;                   /* no changer found */
++++++    }
++++++-   unlock_changer(dcr);
++++++    free_pool_memory(changer);
++++++    return rtn_stat;
++++++ 
++++++Index: src/stored/status.c
++++++===================================================================
++++++RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v
++++++retrieving revision 1.44.2.1
++++++diff -u -r1.44.2.1 status.c
++++++--- src/stored/status.c   6 Oct 2005 07:04:13 -0000       1.44.2.1
+++++++++ src/stored/status.c   21 Nov 2005 13:13:03 -0000
++++++@@ -264,6 +264,7 @@
++++++    bool found = false;
++++++    int bps, sec;
++++++    JCR *jcr;
+++++++   DCR *dcr;
++++++    char JobName[MAX_NAME_LENGTH];
++++++    char b1[30], b2[30], b3[30];
++++++ 
++++++@@ -273,7 +274,8 @@
++++++          bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"),
++++++             job_type_to_str(jcr->JobType), jcr->Job);
++++++       }
++++++-      if (jcr->dcr && jcr->dcr->device) {
+++++++      dcr = jcr->dcr;
+++++++      if (dcr && dcr->device) {
++++++          bstrncpy(JobName, jcr->Job, sizeof(JobName));
++++++          /* There are three periods after the Job name */
++++++          char *p;
++++++@@ -282,13 +284,16 @@
++++++                *p = 0;
++++++             }
++++++          }
++++++-         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"),
+++++++         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n"
+++++++                            "    pool=\"%s\" device=\"%s\"\n"),
++++++                    job_level_to_str(jcr->JobLevel),
++++++                    job_type_to_str(jcr->JobType),
++++++                    JobName,
++++++                    jcr->JobId,
++++++-                   jcr->dcr->VolumeName,
++++++-                   jcr->dcr->device->device_name);
+++++++                   dcr->VolumeName,
+++++++                   dcr->pool_name,
+++++++                   dcr->dev?dcr->dev->print_name(): 
+++++++                            dcr->device->device_name);
++++++          sec = time(NULL) - jcr->run_time;
++++++          if (sec <= 0) {
++++++             sec = 1;
++++++Index: src/stored/stored_conf.c
++++++===================================================================
++++++RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v
++++++retrieving revision 1.76
++++++diff -u -r1.76 stored_conf.c
++++++--- src/stored/stored_conf.c      9 Sep 2005 09:40:04 -0000       1.76
+++++++++ src/stored/stored_conf.c      21 Nov 2005 13:13:04 -0000
++++++@@ -222,16 +222,16 @@
++++++          res->res_dev.hdr.name,
++++++          res->res_dev.media_type, res->res_dev.device_name,
++++++          res->res_dev.label_type);
++++++-      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d\n",
+++++++      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n",
++++++          res->res_dev.max_rewind_wait, res->res_dev.min_block_size,
++++++-         res->res_dev.max_block_size);
+++++++         res->res_dev.max_block_size, res->res_dev.max_changer_wait);
++++++       sendit(sock, "        max_jobs=%d max_files=%" lld " max_size=%" lld "\n",
++++++          res->res_dev.max_volume_jobs, res->res_dev.max_volume_files,
++++++          res->res_dev.max_volume_size);
++++++       sendit(sock, "        max_file_size=%" lld " capacity=%" lld "\n",
++++++          res->res_dev.max_file_size, res->res_dev.volume_capacity);
++++++-      sendit(sock, "         spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
++++++-      sendit(sock, "         max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
+++++++      sendit(sock, "        spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
+++++++      sendit(sock, "        max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
++++++          res->res_dev.max_spool_size, res->res_dev.max_job_spool_size);
++++++       if (res->res_dev.changer_res) {
++++++          sendit(sock, "         changer=%p\n", res->res_dev.changer_res);
++++++Index: src/tray-monitor/tray-monitor.c
++++++===================================================================
++++++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v
++++++retrieving revision 1.25.2.1
++++++diff -u -r1.25.2.1 tray-monitor.c
++++++--- src/tray-monitor/tray-monitor.c       1 Oct 2005 10:20:18 -0000       1.25.2.1
+++++++++ src/tray-monitor/tray-monitor.c       21 Nov 2005 13:13:04 -0000
++++++@@ -4,7 +4,7 @@
++++++  *
++++++  *     Nicolas Boichat, August MMIV
++++++  *
++++++- *     Version $Id$
+++++++ *     Version $Id$
++++++  */
++++++ 
++++++ /*
++++++@@ -881,7 +881,7 @@
++++++       }
++++++ 
++++++       if (item->D_sock == NULL) {
++++++-         g_slist_append(*list, (void *)_("Cannot connect to daemon.\n"));
+++++++         g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n")));
++++++          changeStatusMessage(item, _("Cannot connect to daemon."));
++++++          item->state = error;
++++++          item->oldstate = error;
+++++Index: patches/patches-1.38.0
+++++===================================================================
+++++RCS file: patches/patches-1.38.0
+++++diff -N patches/patches-1.38.0
+++++Index: patches/patches-1.38.1
+++++===================================================================
+++++RCS file: patches/patches-1.38.1
+++++diff -N patches/patches-1.38.1
+++++--- /dev/null      1 Jan 1970 00:00:00 -0000
++++++++ patches/patches-1.38.1 21 Nov 2005 13:17:58 -0000
+++++@@ -0,0 +1,14 @@
++++++20Nov05 1.38.1-to-1.38.2.patch
++++++ This patch fixes the following bugs:
++++++
++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
++++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
++++++  says this patch does not fix his problem)
++++++- Fix cancel failure bug. Bug #481
++++++- Fix failure when Pool name has spaces. Bug #487
++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
++++++- Fix a couple of free()s in src/filed/acl.c
++++++- Fix memory overrun in bfile.c in building OS X resource
++++++  fork filename. Bug #489
++++++                         
++++++  
+++++Index: src/version.h
+++++===================================================================
+++++RCS file: /cvsroot/bacula/bacula/src/version.h,v
+++++retrieving revision 1.554.2.14
+++++diff -u -r1.554.2.14 version.h
+++++--- src/version.h  14 Nov 2005 14:21:58 -0000      1.554.2.14
++++++++ src/version.h  21 Nov 2005 13:17:58 -0000
+++++@@ -3,9 +3,9 @@
+++++  */
+++++ 
+++++ #undef  VERSION
+++++-#define VERSION "1.38.1"
+++++-#define BDATE   "14 November 2005"
+++++-#define LSMDATE "14Nov05"
++++++#define VERSION "1.38.2"
++++++#define BDATE   "20 November 2005"
++++++#define LSMDATE "20Nov05"
+++++ 
+++++ /* Debug flags */
+++++ #undef  DEBUG
+++++Index: src/dird/catreq.c
+++++===================================================================
+++++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v
+++++retrieving revision 1.77.2.1
+++++diff -u -r1.77.2.1 catreq.c
+++++--- src/dird/catreq.c      26 Oct 2005 14:02:04 -0000      1.77.2.1
++++++++ src/dird/catreq.c      21 Nov 2005 13:17:59 -0000
+++++@@ -10,7 +10,7 @@
+++++  *  Basic tasks done here:
+++++  *      Handle Catalog services.
+++++  *
+++++- *   Version $Id$
++++++ *   Version $Id$
+++++  */
+++++ /*
+++++    Copyright (C) 2001-2005 Kern Sibbald
+++++@@ -117,6 +117,7 @@
+++++    if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) {
+++++       memset(&pr, 0, sizeof(pr));
+++++       bstrncpy(pr.Name, pool_name, sizeof(pr.Name));
++++++      unbash_spaces(pr.Name);
+++++       ok = db_get_pool_record(jcr, jcr->db, &pr);
+++++       if (ok) {
+++++          mr.PoolId = pr.PoolId;
+++++Index: src/dird/ua_restore.c
+++++===================================================================
+++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v
+++++retrieving revision 1.101.2.1
+++++diff -u -r1.101.2.1 ua_restore.c
+++++--- src/dird/ua_restore.c  26 Oct 2005 14:02:04 -0000      1.101.2.1
++++++++ src/dird/ua_restore.c  21 Nov 2005 13:17:59 -0000
+++++@@ -10,7 +10,7 @@
+++++  *
+++++  *     Kern Sibbald, July MMII
+++++  *
+++++- *   Version $Id$
++++++ *   Version $Id$
+++++  */
+++++ /*
+++++    Copyright (C) 2002-2005 Kern Sibbald
+++++@@ -409,7 +409,7 @@
+++++       }
+++++       done = true;
+++++       switch (do_prompt(ua, "", _("Select item: "), NULL, 0)) {
+++++-      case -1:                        /* error */
++++++      case -1:                        /* error or cancel */
+++++          return 0;
+++++       case 0:                         /* list last 20 Jobs run */
+++++          gui_save = ua->jcr->gui;
+++++Index: src/dird/ua_run.c
+++++===================================================================
+++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v
+++++retrieving revision 1.71
+++++diff -u -r1.71 ua_run.c
+++++--- src/dird/ua_run.c      10 Aug 2005 16:35:19 -0000      1.71
++++++++ src/dird/ua_run.c      21 Nov 2005 13:17:59 -0000
+++++@@ -851,6 +851,8 @@
+++++             bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
+++++          }
+++++          goto try_again;
++++++      case -1:                        /* error or cancel */
++++++         goto bail_out;
+++++       default:
+++++          goto try_again;
+++++       }
+++++Index: src/dird/ua_select.c
+++++===================================================================
+++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v
+++++retrieving revision 1.65.2.1
+++++diff -u -r1.65.2.1 ua_select.c
+++++--- src/dird/ua_select.c   12 Nov 2005 17:30:52 -0000      1.65.2.1
++++++++ src/dird/ua_select.c   21 Nov 2005 13:17:59 -0000
+++++@@ -4,7 +4,7 @@
+++++  *
+++++  *     Kern Sibbald, October MMI
+++++  *
+++++- *   Version  $Id$
++++++ *   Version  $Id$
+++++  */
+++++ /*
+++++    Copyright (C) 2001-2005 Kern Sibbald
+++++@@ -149,7 +149,9 @@
+++++       }
+++++    }
+++++    UnlockRes();
+++++-   do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name));
++++++   if (do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name)) < 0) {
++++++      return NULL;
++++++   }
+++++    store = (STORE *)GetResWithName(R_STORAGE, name);
+++++    return store;
+++++ }
+++++@@ -170,7 +172,9 @@
+++++       }
+++++    }
+++++    UnlockRes();
+++++-   do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name));
++++++   if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) {
++++++      return NULL;
++++++   }
+++++    fs = (FILESET *)GetResWithName(R_FILESET, name);
+++++    return fs;
+++++ }
+++++@@ -202,7 +206,9 @@
+++++          }
+++++       }
+++++       UnlockRes();
+++++-      do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name));
++++++      if (do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name)) < 0) {
++++++         return NULL;
++++++      }
+++++       catalog = (CAT *)GetResWithName(R_CATALOG, name);
+++++    }
+++++    return catalog;
+++++@@ -225,7 +231,9 @@
+++++       }
+++++    }
+++++    UnlockRes();
+++++-   do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name));
++++++   if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) {
++++++      return NULL;
++++++   }
+++++    job = (JOB *)GetResWithName(R_JOB, name);
+++++    return job;
+++++ }
+++++@@ -246,7 +254,9 @@
+++++       }
+++++    }
+++++    UnlockRes();
+++++-   do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name));
++++++   if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) {
++++++      return NULL;
++++++   }
+++++    job = (JOB *)GetResWithName(R_JOB, name);
+++++    return job;
+++++ }
+++++@@ -269,7 +279,9 @@
+++++       }
+++++    }
+++++    UnlockRes();
+++++-   do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name));
++++++   if (do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) {
++++++      return NULL;
++++++   }
+++++    client = (CLIENT *)GetResWithName(R_CLIENT, name);
+++++    return client;
+++++ }
+++++@@ -551,7 +563,9 @@
+++++       }
+++++    }
+++++    UnlockRes();
+++++-   do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name));
++++++   if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) {
++++++      return NULL;
++++++   }
+++++    pool = (POOL *)GetResWithName(R_POOL, name);
+++++    return pool;
+++++ }
+++++@@ -673,12 +687,16 @@
+++++  *  Returns: -1 on error
+++++  *            index base 0 on success, and choice
+++++  *               is copied to prompt if not NULL
++++++ *             prompt is set to the chosen prompt item string
+++++  */
+++++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
+++++ {
+++++    int i, item;
+++++    char pmsg[MAXSTRING];
+++++ 
++++++   if (prompt) {
++++++      *prompt = 0;
++++++   }
+++++    if (ua->num_prompts == 2) {
+++++       item = 1;
+++++       if (prompt) {
+++++@@ -698,15 +716,11 @@
+++++       bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
+++++    }
+++++ 
+++++-   if (prompt) {
+++++-      *prompt = 0;
+++++-   }
+++++-
+++++    for ( ;; ) {
+++++       /* First item is the prompt string, not the items */
+++++       if (ua->num_prompts == 1) {
+++++          bsendmsg(ua, _("Selection is empty!\n"));
+++++-         item = 0;                    /* list is empty ! */
++++++         item = -1;                    /* list is empty ! */
+++++          break;
+++++       }
+++++       if (ua->num_prompts == 2) {
+++++@@ -741,7 +755,7 @@
+++++       free(ua->prompt[i]);
+++++    }
+++++    ua->num_prompts = 0;
+++++-   return item - 1;
++++++   return item>0 ? item-1 : item;
+++++ }
+++++ 
+++++ 
+++++Index: src/dird/ua_update.c
+++++===================================================================
+++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v
+++++retrieving revision 1.7
+++++diff -u -r1.7 ua_update.c
+++++--- src/dird/ua_update.c   28 Aug 2005 12:22:02 -0000      1.7
++++++++ src/dird/ua_update.c   21 Nov 2005 13:17:59 -0000
+++++@@ -590,7 +590,7 @@
+++++          update_all_vols_from_pool(ua);
+++++          return 1;
+++++       default:                        /* Done or error */
+++++-         bsendmsg(ua, _("Selection done.\n"));
++++++         bsendmsg(ua, _("Selection terminated.\n"));
+++++          return 1;
+++++       }
+++++    }
+++++Index: src/filed/acl.c
+++++===================================================================
+++++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v
+++++retrieving revision 1.10.2.1
+++++diff -u -r1.10.2.1 acl.c
+++++--- src/filed/acl.c        14 Nov 2005 20:20:38 -0000      1.10.2.1
++++++++ src/filed/acl.c        21 Nov 2005 13:17:59 -0000
+++++@@ -26,7 +26,7 @@
+++++  *
+++++  *   Written by Preben 'Peppe' Guldberg, December MMIV
+++++  *
+++++- *   Version $Id$
++++++ *   Version $Id$
+++++  */
+++++ /*
+++++    Copyright (C) 2004-2005 Kern Sibbald
+++++@@ -140,7 +140,7 @@
+++++ 
+++++    if ((acl_text = acl_get(jcr->last_fname)) != NULL) {
+++++       len = pm_strcpy(jcr->acl_text, acl_text);
+++++-      free(acl_text);
++++++      actuallyfree(acl_text);
+++++       return len;
+++++    }
+++++    return -1;
+++++@@ -270,7 +270,7 @@
+++++    if ((n = getacl(jcr->last_fname, n, acls)) > 0) {
+++++       if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) {
+++++          len = pm_strcpy(jcr->acl_text, acl_text);
+++++-         free(acl_text);
++++++         actuallyfree(acl_text);
+++++          return len;
+++++       }
+++++    }
+++++Index: src/findlib/bfile.c
+++++===================================================================
+++++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v
+++++retrieving revision 1.40
+++++diff -u -r1.40 bfile.c
+++++--- src/findlib/bfile.c    10 Aug 2005 16:35:19 -0000      1.40
++++++++ src/findlib/bfile.c    21 Nov 2005 13:17:59 -0000
+++++@@ -623,13 +623,10 @@
+++++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
+++++ {
+++++    POOLMEM *rsrc_fname;
+++++-   size_t fname_len;
+++++ 
+++++-   fname_len = strlen(fname);
+++++    rsrc_fname = get_pool_memory(PM_FNAME);
+++++-   bstrncpy(rsrc_fname, fname, fname_len + 1);
+++++-   bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC,
+++++-      strlen(_PATH_RSRCFORKSPEC) + 1);
++++++   pm_strcpy(rsrc_fname, fname);
++++++   pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC);
+++++    bopen(bfd, rsrc_fname, flags, mode);
+++++    free_pool_memory(rsrc_fname);
+++++    return bfd->fid;
+++++Index: src/lib/bnet_server.c
+++++===================================================================
+++++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v
+++++retrieving revision 1.39
+++++diff -u -r1.39 bnet_server.c
+++++--- src/lib/bnet_server.c  18 Aug 2005 15:37:40 -0000      1.39
++++++++ src/lib/bnet_server.c  21 Nov 2005 13:18:00 -0000
+++++@@ -153,7 +153,6 @@
+++++          /* Error, get out */
+++++          foreach_dlist(fd_ptr, &sockfds) {
+++++             close(fd_ptr->fd);
+++++-            free((void *)fd_ptr);
+++++          }
+++++          Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror());
+++++          break;
+++++Index: src/stored/autochanger.c
+++++===================================================================
+++++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
+++++retrieving revision 1.47.2.3
+++++diff -u -r1.47.2.3 autochanger.c
+++++--- src/stored/autochanger.c       12 Nov 2005 17:30:53 -0000      1.47.2.3
++++++++ src/stored/autochanger.c       21 Nov 2005 13:18:00 -0000
+++++@@ -4,7 +4,7 @@
+++++  *
+++++  *   Kern Sibbald, August MMII
+++++  *                            
+++++- *   Version $Id$
++++++ *   Version $Id$
+++++  */
+++++ /*
+++++    Copyright (C) 2002-2005 Kern Sibbald
+++++@@ -163,6 +163,7 @@
+++++             rtn_stat = -1;            /* hard error */
+++++          }
+++++          Dmsg2(400, "load slot %d status=%d\n", slot, status);
++++++         unlock_changer(dcr);
+++++       } else {
+++++          status = 0;                  /* we got what we want */
+++++          dev->Slot = slot;            /* set currently loaded slot */
+++++@@ -174,7 +175,6 @@
+++++    } else {
+++++       rtn_stat = 0;                   /* no changer found */
+++++    }
+++++-   unlock_changer(dcr);
+++++    free_pool_memory(changer);
+++++    return rtn_stat;
+++++ 
+++++Index: src/stored/status.c
+++++===================================================================
+++++RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v
+++++retrieving revision 1.44.2.1
+++++diff -u -r1.44.2.1 status.c
+++++--- src/stored/status.c    6 Oct 2005 07:04:13 -0000       1.44.2.1
++++++++ src/stored/status.c    21 Nov 2005 13:18:00 -0000
+++++@@ -264,6 +264,7 @@
+++++    bool found = false;
+++++    int bps, sec;
+++++    JCR *jcr;
++++++   DCR *dcr;
+++++    char JobName[MAX_NAME_LENGTH];
+++++    char b1[30], b2[30], b3[30];
+++++ 
+++++@@ -273,7 +274,8 @@
+++++          bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"),
+++++             job_type_to_str(jcr->JobType), jcr->Job);
+++++       }
+++++-      if (jcr->dcr && jcr->dcr->device) {
++++++      dcr = jcr->dcr;
++++++      if (dcr && dcr->device) {
+++++          bstrncpy(JobName, jcr->Job, sizeof(JobName));
+++++          /* There are three periods after the Job name */
+++++          char *p;
+++++@@ -282,13 +284,16 @@
+++++                *p = 0;
+++++             }
+++++          }
+++++-         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"),
++++++         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n"
++++++                            "    pool=\"%s\" device=\"%s\"\n"),
+++++                    job_level_to_str(jcr->JobLevel),
+++++                    job_type_to_str(jcr->JobType),
+++++                    JobName,
+++++                    jcr->JobId,
+++++-                   jcr->dcr->VolumeName,
+++++-                   jcr->dcr->device->device_name);
++++++                   dcr->VolumeName,
++++++                   dcr->pool_name,
++++++                   dcr->dev?dcr->dev->print_name(): 
++++++                            dcr->device->device_name);
+++++          sec = time(NULL) - jcr->run_time;
+++++          if (sec <= 0) {
+++++             sec = 1;
+++++Index: src/stored/stored_conf.c
+++++===================================================================
+++++RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v
+++++retrieving revision 1.76
+++++diff -u -r1.76 stored_conf.c
+++++--- src/stored/stored_conf.c       9 Sep 2005 09:40:04 -0000       1.76
++++++++ src/stored/stored_conf.c       21 Nov 2005 13:18:00 -0000
+++++@@ -222,16 +222,16 @@
+++++          res->res_dev.hdr.name,
+++++          res->res_dev.media_type, res->res_dev.device_name,
+++++          res->res_dev.label_type);
+++++-      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d\n",
++++++      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n",
+++++          res->res_dev.max_rewind_wait, res->res_dev.min_block_size,
+++++-         res->res_dev.max_block_size);
++++++         res->res_dev.max_block_size, res->res_dev.max_changer_wait);
+++++       sendit(sock, "        max_jobs=%d max_files=%" lld " max_size=%" lld "\n",
+++++          res->res_dev.max_volume_jobs, res->res_dev.max_volume_files,
+++++          res->res_dev.max_volume_size);
+++++       sendit(sock, "        max_file_size=%" lld " capacity=%" lld "\n",
+++++          res->res_dev.max_file_size, res->res_dev.volume_capacity);
+++++-      sendit(sock, "         spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
+++++-      sendit(sock, "         max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
++++++      sendit(sock, "        spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
++++++      sendit(sock, "        max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
+++++          res->res_dev.max_spool_size, res->res_dev.max_job_spool_size);
+++++       if (res->res_dev.changer_res) {
+++++          sendit(sock, "         changer=%p\n", res->res_dev.changer_res);
+++++Index: src/tray-monitor/tray-monitor.c
+++++===================================================================
+++++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v
+++++retrieving revision 1.25.2.1
+++++diff -u -r1.25.2.1 tray-monitor.c
+++++--- src/tray-monitor/tray-monitor.c        1 Oct 2005 10:20:18 -0000       1.25.2.1
++++++++ src/tray-monitor/tray-monitor.c        21 Nov 2005 13:18:00 -0000
+++++@@ -4,7 +4,7 @@
+++++  *
+++++  *     Nicolas Boichat, August MMIV
+++++  *
+++++- *     Version $Id$
++++++ *     Version $Id$
+++++  */
+++++ 
+++++ /*
+++++@@ -881,7 +881,7 @@
+++++       }
+++++ 
+++++       if (item->D_sock == NULL) {
+++++-         g_slist_append(*list, (void *)_("Cannot connect to daemon.\n"));
++++++         g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n")));
+++++          changeStatusMessage(item, _("Cannot connect to daemon."));
+++++          item->state = error;
+++++          item->oldstate = error;
++++Index: patches/patches-1.38.0
++++===================================================================
++++RCS file: patches/patches-1.38.0
++++diff -N patches/patches-1.38.0
++++Index: patches/patches-1.38.1
++++===================================================================
++++RCS file: patches/patches-1.38.1
++++diff -N patches/patches-1.38.1
++++--- /dev/null       1 Jan 1970 00:00:00 -0000
+++++++ patches/patches-1.38.1  21 Nov 2005 18:19:05 -0000
++++@@ -0,0 +1,14 @@
+++++20Nov05 1.38.1-to-1.38.2.patch
+++++ This patch fixes the following bugs:
+++++
+++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
+++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
+++++  says this patch does not fix his problem)
+++++- Fix cancel failure bug. Bug #481
+++++- Fix failure when Pool name has spaces. Bug #487
+++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
+++++- Fix a couple of free()s in src/filed/acl.c
+++++- Fix memory overrun in bfile.c in building OS X resource
+++++  fork filename. Bug #489
+++++                         
+++++  
++++Index: src/version.h
++++===================================================================
++++RCS file: /cvsroot/bacula/bacula/src/version.h,v
++++retrieving revision 1.554.2.14
++++diff -u -r1.554.2.14 version.h
++++--- src/version.h   14 Nov 2005 14:21:58 -0000      1.554.2.14
+++++++ src/version.h   21 Nov 2005 18:19:06 -0000
++++@@ -3,9 +3,9 @@
++++  */
++++ 
++++ #undef  VERSION
++++-#define VERSION "1.38.1"
++++-#define BDATE   "14 November 2005"
++++-#define LSMDATE "14Nov05"
+++++#define VERSION "1.38.2"
+++++#define BDATE   "20 November 2005"
+++++#define LSMDATE "20Nov05"
++++ 
++++ /* Debug flags */
++++ #undef  DEBUG
++++Index: src/dird/catreq.c
++++===================================================================
++++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v
++++retrieving revision 1.77.2.1
++++diff -u -r1.77.2.1 catreq.c
++++--- src/dird/catreq.c       26 Oct 2005 14:02:04 -0000      1.77.2.1
+++++++ src/dird/catreq.c       21 Nov 2005 18:19:06 -0000
++++@@ -10,7 +10,7 @@
++++  *  Basic tasks done here:
++++  *      Handle Catalog services.
++++  *
++++- *   Version $Id$
+++++ *   Version $Id$
++++  */
++++ /*
++++    Copyright (C) 2001-2005 Kern Sibbald
++++@@ -117,6 +117,7 @@
++++    if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) {
++++       memset(&pr, 0, sizeof(pr));
++++       bstrncpy(pr.Name, pool_name, sizeof(pr.Name));
+++++      unbash_spaces(pr.Name);
++++       ok = db_get_pool_record(jcr, jcr->db, &pr);
++++       if (ok) {
++++          mr.PoolId = pr.PoolId;
++++Index: src/dird/ua_restore.c
++++===================================================================
++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v
++++retrieving revision 1.101.2.1
++++diff -u -r1.101.2.1 ua_restore.c
++++--- src/dird/ua_restore.c   26 Oct 2005 14:02:04 -0000      1.101.2.1
+++++++ src/dird/ua_restore.c   21 Nov 2005 18:19:06 -0000
++++@@ -10,7 +10,7 @@
++++  *
++++  *     Kern Sibbald, July MMII
++++  *
++++- *   Version $Id$
+++++ *   Version $Id$
++++  */
++++ /*
++++    Copyright (C) 2002-2005 Kern Sibbald
++++@@ -409,7 +409,7 @@
++++       }
++++       done = true;
++++       switch (do_prompt(ua, "", _("Select item: "), NULL, 0)) {
++++-      case -1:                        /* error */
+++++      case -1:                        /* error or cancel */
++++          return 0;
++++       case 0:                         /* list last 20 Jobs run */
++++          gui_save = ua->jcr->gui;
++++Index: src/dird/ua_run.c
++++===================================================================
++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v
++++retrieving revision 1.71
++++diff -u -r1.71 ua_run.c
++++--- src/dird/ua_run.c       10 Aug 2005 16:35:19 -0000      1.71
+++++++ src/dird/ua_run.c       21 Nov 2005 18:19:06 -0000
++++@@ -851,6 +851,8 @@
++++             bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
++++          }
++++          goto try_again;
+++++      case -1:                        /* error or cancel */
+++++         goto bail_out;
++++       default:
++++          goto try_again;
++++       }
++++Index: src/dird/ua_select.c
++++===================================================================
++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v
++++retrieving revision 1.65.2.1
++++diff -u -r1.65.2.1 ua_select.c
++++--- src/dird/ua_select.c    12 Nov 2005 17:30:52 -0000      1.65.2.1
+++++++ src/dird/ua_select.c    21 Nov 2005 18:19:06 -0000
++++@@ -4,7 +4,7 @@
++++  *
++++  *     Kern Sibbald, October MMI
++++  *
++++- *   Version  $Id$
+++++ *   Version  $Id$
++++  */
++++ /*
++++    Copyright (C) 2001-2005 Kern Sibbald
++++@@ -149,7 +149,9 @@
++++       }
++++    }
++++    UnlockRes();
++++-   do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name));
+++++   if (do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name)) < 0) {
+++++      return NULL;
+++++   }
++++    store = (STORE *)GetResWithName(R_STORAGE, name);
++++    return store;
++++ }
++++@@ -170,7 +172,9 @@
++++       }
++++    }
++++    UnlockRes();
++++-   do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name));
+++++   if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) {
+++++      return NULL;
+++++   }
++++    fs = (FILESET *)GetResWithName(R_FILESET, name);
++++    return fs;
++++ }
++++@@ -202,7 +206,9 @@
++++          }
++++       }
++++       UnlockRes();
++++-      do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name));
+++++      if (do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name)) < 0) {
+++++         return NULL;
+++++      }
++++       catalog = (CAT *)GetResWithName(R_CATALOG, name);
++++    }
++++    return catalog;
++++@@ -225,7 +231,9 @@
++++       }
++++    }
++++    UnlockRes();
++++-   do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name));
+++++   if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) {
+++++      return NULL;
+++++   }
++++    job = (JOB *)GetResWithName(R_JOB, name);
++++    return job;
++++ }
++++@@ -246,7 +254,9 @@
++++       }
++++    }
++++    UnlockRes();
++++-   do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name));
+++++   if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) {
+++++      return NULL;
+++++   }
++++    job = (JOB *)GetResWithName(R_JOB, name);
++++    return job;
++++ }
++++@@ -269,7 +279,9 @@
++++       }
++++    }
++++    UnlockRes();
++++-   do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name));
+++++   if (do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) {
+++++      return NULL;
+++++   }
++++    client = (CLIENT *)GetResWithName(R_CLIENT, name);
++++    return client;
++++ }
++++@@ -551,7 +563,9 @@
++++       }
++++    }
++++    UnlockRes();
++++-   do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name));
+++++   if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) {
+++++      return NULL;
+++++   }
++++    pool = (POOL *)GetResWithName(R_POOL, name);
++++    return pool;
++++ }
++++@@ -673,12 +687,16 @@
++++  *  Returns: -1 on error
++++  *            index base 0 on success, and choice
++++  *               is copied to prompt if not NULL
+++++ *             prompt is set to the chosen prompt item string
++++  */
++++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
++++ {
++++    int i, item;
++++    char pmsg[MAXSTRING];
++++ 
+++++   if (prompt) {
+++++      *prompt = 0;
+++++   }
++++    if (ua->num_prompts == 2) {
++++       item = 1;
++++       if (prompt) {
++++@@ -698,15 +716,11 @@
++++       bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
++++    }
++++ 
++++-   if (prompt) {
++++-      *prompt = 0;
++++-   }
++++-
++++    for ( ;; ) {
++++       /* First item is the prompt string, not the items */
++++       if (ua->num_prompts == 1) {
++++          bsendmsg(ua, _("Selection is empty!\n"));
++++-         item = 0;                    /* list is empty ! */
+++++         item = -1;                    /* list is empty ! */
++++          break;
++++       }
++++       if (ua->num_prompts == 2) {
++++@@ -741,7 +755,7 @@
++++       free(ua->prompt[i]);
++++    }
++++    ua->num_prompts = 0;
++++-   return item - 1;
+++++   return item>0 ? item-1 : item;
++++ }
++++ 
++++ 
++++Index: src/dird/ua_update.c
++++===================================================================
++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v
++++retrieving revision 1.7
++++diff -u -r1.7 ua_update.c
++++--- src/dird/ua_update.c    28 Aug 2005 12:22:02 -0000      1.7
+++++++ src/dird/ua_update.c    21 Nov 2005 18:19:06 -0000
++++@@ -590,7 +590,7 @@
++++          update_all_vols_from_pool(ua);
++++          return 1;
++++       default:                        /* Done or error */
++++-         bsendmsg(ua, _("Selection done.\n"));
+++++         bsendmsg(ua, _("Selection terminated.\n"));
++++          return 1;
++++       }
++++    }
++++Index: src/filed/acl.c
++++===================================================================
++++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v
++++retrieving revision 1.10.2.1
++++diff -u -r1.10.2.1 acl.c
++++--- src/filed/acl.c 14 Nov 2005 20:20:38 -0000      1.10.2.1
+++++++ src/filed/acl.c 21 Nov 2005 18:19:07 -0000
++++@@ -26,7 +26,7 @@
++++  *
++++  *   Written by Preben 'Peppe' Guldberg, December MMIV
++++  *
++++- *   Version $Id$
+++++ *   Version $Id$
++++  */
++++ /*
++++    Copyright (C) 2004-2005 Kern Sibbald
++++@@ -140,7 +140,7 @@
++++ 
++++    if ((acl_text = acl_get(jcr->last_fname)) != NULL) {
++++       len = pm_strcpy(jcr->acl_text, acl_text);
++++-      free(acl_text);
+++++      actuallyfree(acl_text);
++++       return len;
++++    }
++++    return -1;
++++@@ -270,7 +270,7 @@
++++    if ((n = getacl(jcr->last_fname, n, acls)) > 0) {
++++       if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) {
++++          len = pm_strcpy(jcr->acl_text, acl_text);
++++-         free(acl_text);
+++++         actuallyfree(acl_text);
++++          return len;
++++       }
++++    }
++++Index: src/findlib/bfile.c
++++===================================================================
++++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v
++++retrieving revision 1.40
++++diff -u -r1.40 bfile.c
++++--- src/findlib/bfile.c     10 Aug 2005 16:35:19 -0000      1.40
+++++++ src/findlib/bfile.c     21 Nov 2005 18:19:07 -0000
++++@@ -623,13 +623,10 @@
++++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
++++ {
++++    POOLMEM *rsrc_fname;
++++-   size_t fname_len;
++++ 
++++-   fname_len = strlen(fname);
++++    rsrc_fname = get_pool_memory(PM_FNAME);
++++-   bstrncpy(rsrc_fname, fname, fname_len + 1);
++++-   bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC,
++++-      strlen(_PATH_RSRCFORKSPEC) + 1);
+++++   pm_strcpy(rsrc_fname, fname);
+++++   pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC);
++++    bopen(bfd, rsrc_fname, flags, mode);
++++    free_pool_memory(rsrc_fname);
++++    return bfd->fid;
++++Index: src/lib/bnet_server.c
++++===================================================================
++++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v
++++retrieving revision 1.39
++++diff -u -r1.39 bnet_server.c
++++--- src/lib/bnet_server.c   18 Aug 2005 15:37:40 -0000      1.39
+++++++ src/lib/bnet_server.c   21 Nov 2005 18:19:07 -0000
++++@@ -153,7 +153,6 @@
++++          /* Error, get out */
++++          foreach_dlist(fd_ptr, &sockfds) {
++++             close(fd_ptr->fd);
++++-            free((void *)fd_ptr);
++++          }
++++          Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror());
++++          break;
++++Index: src/stored/autochanger.c
++++===================================================================
++++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
++++retrieving revision 1.47.2.3
++++diff -u -r1.47.2.3 autochanger.c
++++--- src/stored/autochanger.c        12 Nov 2005 17:30:53 -0000      1.47.2.3
+++++++ src/stored/autochanger.c        21 Nov 2005 18:19:07 -0000
++++@@ -4,7 +4,7 @@
++++  *
++++  *   Kern Sibbald, August MMII
++++  *                            
++++- *   Version $Id$
+++++ *   Version $Id$
++++  */
++++ /*
++++    Copyright (C) 2002-2005 Kern Sibbald
++++@@ -163,6 +163,7 @@
++++             rtn_stat = -1;            /* hard error */
++++          }
++++          Dmsg2(400, "load slot %d status=%d\n", slot, status);
+++++         unlock_changer(dcr);
++++       } else {
++++          status = 0;                  /* we got what we want */
++++          dev->Slot = slot;            /* set currently loaded slot */
++++@@ -174,7 +175,6 @@
++++    } else {
++++       rtn_stat = 0;                   /* no changer found */
++++    }
++++-   unlock_changer(dcr);
++++    free_pool_memory(changer);
++++    return rtn_stat;
++++ 
++++Index: src/stored/status.c
++++===================================================================
++++RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v
++++retrieving revision 1.44.2.1
++++diff -u -r1.44.2.1 status.c
++++--- src/stored/status.c     6 Oct 2005 07:04:13 -0000       1.44.2.1
+++++++ src/stored/status.c     21 Nov 2005 18:19:08 -0000
++++@@ -264,6 +264,7 @@
++++    bool found = false;
++++    int bps, sec;
++++    JCR *jcr;
+++++   DCR *dcr;
++++    char JobName[MAX_NAME_LENGTH];
++++    char b1[30], b2[30], b3[30];
++++ 
++++@@ -273,7 +274,8 @@
++++          bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"),
++++             job_type_to_str(jcr->JobType), jcr->Job);
++++       }
++++-      if (jcr->dcr && jcr->dcr->device) {
+++++      dcr = jcr->dcr;
+++++      if (dcr && dcr->device) {
++++          bstrncpy(JobName, jcr->Job, sizeof(JobName));
++++          /* There are three periods after the Job name */
++++          char *p;
++++@@ -282,13 +284,16 @@
++++                *p = 0;
++++             }
++++          }
++++-         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"),
+++++         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n"
+++++                            "    pool=\"%s\" device=\"%s\"\n"),
++++                    job_level_to_str(jcr->JobLevel),
++++                    job_type_to_str(jcr->JobType),
++++                    JobName,
++++                    jcr->JobId,
++++-                   jcr->dcr->VolumeName,
++++-                   jcr->dcr->device->device_name);
+++++                   dcr->VolumeName,
+++++                   dcr->pool_name,
+++++                   dcr->dev?dcr->dev->print_name(): 
+++++                            dcr->device->device_name);
++++          sec = time(NULL) - jcr->run_time;
++++          if (sec <= 0) {
++++             sec = 1;
++++Index: src/stored/stored_conf.c
++++===================================================================
++++RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v
++++retrieving revision 1.76
++++diff -u -r1.76 stored_conf.c
++++--- src/stored/stored_conf.c        9 Sep 2005 09:40:04 -0000       1.76
+++++++ src/stored/stored_conf.c        21 Nov 2005 18:19:08 -0000
++++@@ -222,16 +222,16 @@
++++          res->res_dev.hdr.name,
++++          res->res_dev.media_type, res->res_dev.device_name,
++++          res->res_dev.label_type);
++++-      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d\n",
+++++      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n",
++++          res->res_dev.max_rewind_wait, res->res_dev.min_block_size,
++++-         res->res_dev.max_block_size);
+++++         res->res_dev.max_block_size, res->res_dev.max_changer_wait);
++++       sendit(sock, "        max_jobs=%d max_files=%" lld " max_size=%" lld "\n",
++++          res->res_dev.max_volume_jobs, res->res_dev.max_volume_files,
++++          res->res_dev.max_volume_size);
++++       sendit(sock, "        max_file_size=%" lld " capacity=%" lld "\n",
++++          res->res_dev.max_file_size, res->res_dev.volume_capacity);
++++-      sendit(sock, "         spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
++++-      sendit(sock, "         max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
+++++      sendit(sock, "        spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
+++++      sendit(sock, "        max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
++++          res->res_dev.max_spool_size, res->res_dev.max_job_spool_size);
++++       if (res->res_dev.changer_res) {
++++          sendit(sock, "         changer=%p\n", res->res_dev.changer_res);
++++Index: src/tray-monitor/tray-monitor.c
++++===================================================================
++++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v
++++retrieving revision 1.25.2.1
++++diff -u -r1.25.2.1 tray-monitor.c
++++--- src/tray-monitor/tray-monitor.c 1 Oct 2005 10:20:18 -0000       1.25.2.1
+++++++ src/tray-monitor/tray-monitor.c 21 Nov 2005 18:19:08 -0000
++++@@ -4,7 +4,7 @@
++++  *
++++  *     Nicolas Boichat, August MMIV
++++  *
++++- *     Version $Id$
+++++ *     Version $Id$
++++  */
++++ 
++++ /*
++++@@ -881,7 +881,7 @@
++++       }
++++ 
++++       if (item->D_sock == NULL) {
++++-         g_slist_append(*list, (void *)_("Cannot connect to daemon.\n"));
+++++         g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n")));
++++          changeStatusMessage(item, _("Cannot connect to daemon."));
++++          item->state = error;
++++          item->oldstate = error;
+++Index: patches/patches-1.38.0
+++===================================================================
+++RCS file: patches/patches-1.38.0
+++diff -N patches/patches-1.38.0
+++Index: patches/patches-1.38.1
+++===================================================================
+++RCS file: patches/patches-1.38.1
+++diff -N patches/patches-1.38.1
+++--- /dev/null        1 Jan 1970 00:00:00 -0000
++++++ patches/patches-1.38.1   22 Nov 2005 10:42:22 -0000
+++@@ -0,0 +1,14 @@
++++20Nov05 1.38.1-to-1.38.2.patch
++++ This patch fixes the following bugs:
++++
++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
++++  says this patch does not fix his problem)
++++- Fix cancel failure bug. Bug #481
++++- Fix failure when Pool name has spaces. Bug #487
++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
++++- Fix a couple of free()s in src/filed/acl.c
++++- Fix memory overrun in bfile.c in building OS X resource
++++  fork filename. Bug #489
++++                         
++++  
+++Index: src/version.h
+++===================================================================
+++RCS file: /cvsroot/bacula/bacula/src/version.h,v
+++retrieving revision 1.554.2.14
+++diff -u -r1.554.2.14 version.h
+++--- src/version.h    14 Nov 2005 14:21:58 -0000      1.554.2.14
++++++ src/version.h    22 Nov 2005 10:42:22 -0000
+++@@ -3,9 +3,9 @@
+++  */
+++ 
+++ #undef  VERSION
+++-#define VERSION "1.38.1"
+++-#define BDATE   "14 November 2005"
+++-#define LSMDATE "14Nov05"
++++#define VERSION "1.38.2"
++++#define BDATE   "20 November 2005"
++++#define LSMDATE "20Nov05"
+++ 
+++ /* Debug flags */
+++ #undef  DEBUG
+++Index: src/dird/catreq.c
+++===================================================================
+++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v
+++retrieving revision 1.77.2.1
+++diff -u -r1.77.2.1 catreq.c
+++--- src/dird/catreq.c        26 Oct 2005 14:02:04 -0000      1.77.2.1
++++++ src/dird/catreq.c        22 Nov 2005 10:42:22 -0000
+++@@ -10,7 +10,7 @@
+++  *  Basic tasks done here:
+++  *      Handle Catalog services.
+++  *
+++- *   Version $Id$
++++ *   Version $Id$
+++  */
+++ /*
+++    Copyright (C) 2001-2005 Kern Sibbald
+++@@ -117,6 +117,7 @@
+++    if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) {
+++       memset(&pr, 0, sizeof(pr));
+++       bstrncpy(pr.Name, pool_name, sizeof(pr.Name));
++++      unbash_spaces(pr.Name);
+++       ok = db_get_pool_record(jcr, jcr->db, &pr);
+++       if (ok) {
+++          mr.PoolId = pr.PoolId;
+++Index: src/dird/ua_restore.c
+++===================================================================
+++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v
+++retrieving revision 1.101.2.1
+++diff -u -r1.101.2.1 ua_restore.c
+++--- src/dird/ua_restore.c    26 Oct 2005 14:02:04 -0000      1.101.2.1
++++++ src/dird/ua_restore.c    22 Nov 2005 10:42:23 -0000
+++@@ -10,7 +10,7 @@
+++  *
+++  *     Kern Sibbald, July MMII
+++  *
+++- *   Version $Id$
++++ *   Version $Id$
+++  */
+++ /*
+++    Copyright (C) 2002-2005 Kern Sibbald
+++@@ -409,7 +409,7 @@
+++       }
+++       done = true;
+++       switch (do_prompt(ua, "", _("Select item: "), NULL, 0)) {
+++-      case -1:                        /* error */
++++      case -1:                        /* error or cancel */
+++          return 0;
+++       case 0:                         /* list last 20 Jobs run */
+++          gui_save = ua->jcr->gui;
+++Index: src/dird/ua_run.c
+++===================================================================
+++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v
+++retrieving revision 1.71
+++diff -u -r1.71 ua_run.c
+++--- src/dird/ua_run.c        10 Aug 2005 16:35:19 -0000      1.71
++++++ src/dird/ua_run.c        22 Nov 2005 10:42:23 -0000
+++@@ -851,6 +851,8 @@
+++             bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
+++          }
+++          goto try_again;
++++      case -1:                        /* error or cancel */
++++         goto bail_out;
+++       default:
+++          goto try_again;
+++       }
+++Index: src/dird/ua_select.c
+++===================================================================
+++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v
+++retrieving revision 1.65.2.1
+++diff -u -r1.65.2.1 ua_select.c
+++--- src/dird/ua_select.c     12 Nov 2005 17:30:52 -0000      1.65.2.1
++++++ src/dird/ua_select.c     22 Nov 2005 10:42:23 -0000
+++@@ -4,7 +4,7 @@
+++  *
+++  *     Kern Sibbald, October MMI
+++  *
+++- *   Version  $Id$
++++ *   Version  $Id$
+++  */
+++ /*
+++    Copyright (C) 2001-2005 Kern Sibbald
+++@@ -149,7 +149,9 @@
+++       }
+++    }
+++    UnlockRes();
+++-   do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name));
++++   if (do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name)) < 0) {
++++      return NULL;
++++   }
+++    store = (STORE *)GetResWithName(R_STORAGE, name);
+++    return store;
+++ }
+++@@ -170,7 +172,9 @@
+++       }
+++    }
+++    UnlockRes();
+++-   do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name));
++++   if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) {
++++      return NULL;
++++   }
+++    fs = (FILESET *)GetResWithName(R_FILESET, name);
+++    return fs;
+++ }
+++@@ -202,7 +206,9 @@
+++          }
+++       }
+++       UnlockRes();
+++-      do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name));
++++      if (do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name)) < 0) {
++++         return NULL;
++++      }
+++       catalog = (CAT *)GetResWithName(R_CATALOG, name);
+++    }
+++    return catalog;
+++@@ -225,7 +231,9 @@
+++       }
+++    }
+++    UnlockRes();
+++-   do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name));
++++   if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) {
++++      return NULL;
++++   }
+++    job = (JOB *)GetResWithName(R_JOB, name);
+++    return job;
+++ }
+++@@ -246,7 +254,9 @@
+++       }
+++    }
+++    UnlockRes();
+++-   do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name));
++++   if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) {
++++      return NULL;
++++   }
+++    job = (JOB *)GetResWithName(R_JOB, name);
+++    return job;
+++ }
+++@@ -269,7 +279,9 @@
+++       }
+++    }
+++    UnlockRes();
+++-   do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name));
++++   if (do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) {
++++      return NULL;
++++   }
+++    client = (CLIENT *)GetResWithName(R_CLIENT, name);
+++    return client;
+++ }
+++@@ -551,7 +563,9 @@
+++       }
+++    }
+++    UnlockRes();
+++-   do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name));
++++   if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) {
++++      return NULL;
++++   }
+++    pool = (POOL *)GetResWithName(R_POOL, name);
+++    return pool;
+++ }
+++@@ -673,12 +687,16 @@
+++  *  Returns: -1 on error
+++  *            index base 0 on success, and choice
+++  *               is copied to prompt if not NULL
++++ *             prompt is set to the chosen prompt item string
+++  */
+++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
+++ {
+++    int i, item;
+++    char pmsg[MAXSTRING];
+++ 
++++   if (prompt) {
++++      *prompt = 0;
++++   }
+++    if (ua->num_prompts == 2) {
+++       item = 1;
+++       if (prompt) {
+++@@ -698,15 +716,11 @@
+++       bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
+++    }
+++ 
+++-   if (prompt) {
+++-      *prompt = 0;
+++-   }
+++-
+++    for ( ;; ) {
+++       /* First item is the prompt string, not the items */
+++       if (ua->num_prompts == 1) {
+++          bsendmsg(ua, _("Selection is empty!\n"));
+++-         item = 0;                    /* list is empty ! */
++++         item = -1;                    /* list is empty ! */
+++          break;
+++       }
+++       if (ua->num_prompts == 2) {
+++@@ -741,7 +755,7 @@
+++       free(ua->prompt[i]);
+++    }
+++    ua->num_prompts = 0;
+++-   return item - 1;
++++   return item>0 ? item-1 : item;
+++ }
+++ 
+++ 
+++Index: src/dird/ua_update.c
+++===================================================================
+++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v
+++retrieving revision 1.7
+++diff -u -r1.7 ua_update.c
+++--- src/dird/ua_update.c     28 Aug 2005 12:22:02 -0000      1.7
++++++ src/dird/ua_update.c     22 Nov 2005 10:42:23 -0000
+++@@ -590,7 +590,7 @@
+++          update_all_vols_from_pool(ua);
+++          return 1;
+++       default:                        /* Done or error */
+++-         bsendmsg(ua, _("Selection done.\n"));
++++         bsendmsg(ua, _("Selection terminated.\n"));
+++          return 1;
+++       }
+++    }
+++Index: src/filed/acl.c
+++===================================================================
+++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v
+++retrieving revision 1.10.2.1
+++diff -u -r1.10.2.1 acl.c
+++--- src/filed/acl.c  14 Nov 2005 20:20:38 -0000      1.10.2.1
++++++ src/filed/acl.c  22 Nov 2005 10:42:23 -0000
+++@@ -26,7 +26,7 @@
+++  *
+++  *   Written by Preben 'Peppe' Guldberg, December MMIV
+++  *
+++- *   Version $Id$
++++ *   Version $Id$
+++  */
+++ /*
+++    Copyright (C) 2004-2005 Kern Sibbald
+++@@ -140,7 +140,7 @@
+++ 
+++    if ((acl_text = acl_get(jcr->last_fname)) != NULL) {
+++       len = pm_strcpy(jcr->acl_text, acl_text);
+++-      free(acl_text);
++++      actuallyfree(acl_text);
+++       return len;
+++    }
+++    return -1;
+++@@ -270,7 +270,7 @@
+++    if ((n = getacl(jcr->last_fname, n, acls)) > 0) {
+++       if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) {
+++          len = pm_strcpy(jcr->acl_text, acl_text);
+++-         free(acl_text);
++++         actuallyfree(acl_text);
+++          return len;
+++       }
+++    }
+++Index: src/findlib/bfile.c
+++===================================================================
+++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v
+++retrieving revision 1.40
+++diff -u -r1.40 bfile.c
+++--- src/findlib/bfile.c      10 Aug 2005 16:35:19 -0000      1.40
++++++ src/findlib/bfile.c      22 Nov 2005 10:42:24 -0000
+++@@ -623,13 +623,10 @@
+++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
+++ {
+++    POOLMEM *rsrc_fname;
+++-   size_t fname_len;
+++ 
+++-   fname_len = strlen(fname);
+++    rsrc_fname = get_pool_memory(PM_FNAME);
+++-   bstrncpy(rsrc_fname, fname, fname_len + 1);
+++-   bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC,
+++-      strlen(_PATH_RSRCFORKSPEC) + 1);
++++   pm_strcpy(rsrc_fname, fname);
++++   pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC);
+++    bopen(bfd, rsrc_fname, flags, mode);
+++    free_pool_memory(rsrc_fname);
+++    return bfd->fid;
+++Index: src/lib/bnet_server.c
+++===================================================================
+++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v
+++retrieving revision 1.39
+++diff -u -r1.39 bnet_server.c
+++--- src/lib/bnet_server.c    18 Aug 2005 15:37:40 -0000      1.39
++++++ src/lib/bnet_server.c    22 Nov 2005 10:42:24 -0000
+++@@ -153,7 +153,6 @@
+++          /* Error, get out */
+++          foreach_dlist(fd_ptr, &sockfds) {
+++             close(fd_ptr->fd);
+++-            free((void *)fd_ptr);
+++          }
+++          Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror());
+++          break;
+++Index: src/stored/autochanger.c
+++===================================================================
+++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
+++retrieving revision 1.47.2.3
+++diff -u -r1.47.2.3 autochanger.c
+++--- src/stored/autochanger.c 12 Nov 2005 17:30:53 -0000      1.47.2.3
++++++ src/stored/autochanger.c 22 Nov 2005 10:42:24 -0000
+++@@ -4,7 +4,7 @@
+++  *
+++  *   Kern Sibbald, August MMII
+++  *                            
+++- *   Version $Id$
++++ *   Version $Id$
+++  */
+++ /*
+++    Copyright (C) 2002-2005 Kern Sibbald
+++@@ -163,6 +163,7 @@
+++             rtn_stat = -1;            /* hard error */
+++          }
+++          Dmsg2(400, "load slot %d status=%d\n", slot, status);
++++         unlock_changer(dcr);
+++       } else {
+++          status = 0;                  /* we got what we want */
+++          dev->Slot = slot;            /* set currently loaded slot */
+++@@ -174,7 +175,6 @@
+++    } else {
+++       rtn_stat = 0;                   /* no changer found */
+++    }
+++-   unlock_changer(dcr);
+++    free_pool_memory(changer);
+++    return rtn_stat;
+++ 
+++Index: src/stored/status.c
+++===================================================================
+++RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v
+++retrieving revision 1.44.2.1
+++diff -u -r1.44.2.1 status.c
+++--- src/stored/status.c      6 Oct 2005 07:04:13 -0000       1.44.2.1
++++++ src/stored/status.c      22 Nov 2005 10:42:24 -0000
+++@@ -264,6 +264,7 @@
+++    bool found = false;
+++    int bps, sec;
+++    JCR *jcr;
++++   DCR *dcr;
+++    char JobName[MAX_NAME_LENGTH];
+++    char b1[30], b2[30], b3[30];
+++ 
+++@@ -273,7 +274,8 @@
+++          bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"),
+++             job_type_to_str(jcr->JobType), jcr->Job);
+++       }
+++-      if (jcr->dcr && jcr->dcr->device) {
++++      dcr = jcr->dcr;
++++      if (dcr && dcr->device) {
+++          bstrncpy(JobName, jcr->Job, sizeof(JobName));
+++          /* There are three periods after the Job name */
+++          char *p;
+++@@ -282,13 +284,16 @@
+++                *p = 0;
+++             }
+++          }
+++-         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"),
++++         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n"
++++                            "    pool=\"%s\" device=\"%s\"\n"),
+++                    job_level_to_str(jcr->JobLevel),
+++                    job_type_to_str(jcr->JobType),
+++                    JobName,
+++                    jcr->JobId,
+++-                   jcr->dcr->VolumeName,
+++-                   jcr->dcr->device->device_name);
++++                   dcr->VolumeName,
++++                   dcr->pool_name,
++++                   dcr->dev?dcr->dev->print_name(): 
++++                            dcr->device->device_name);
+++          sec = time(NULL) - jcr->run_time;
+++          if (sec <= 0) {
+++             sec = 1;
+++Index: src/stored/stored_conf.c
+++===================================================================
+++RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v
+++retrieving revision 1.76
+++diff -u -r1.76 stored_conf.c
+++--- src/stored/stored_conf.c 9 Sep 2005 09:40:04 -0000       1.76
++++++ src/stored/stored_conf.c 22 Nov 2005 10:42:24 -0000
+++@@ -222,16 +222,16 @@
+++          res->res_dev.hdr.name,
+++          res->res_dev.media_type, res->res_dev.device_name,
+++          res->res_dev.label_type);
+++-      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d\n",
++++      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n",
+++          res->res_dev.max_rewind_wait, res->res_dev.min_block_size,
+++-         res->res_dev.max_block_size);
++++         res->res_dev.max_block_size, res->res_dev.max_changer_wait);
+++       sendit(sock, "        max_jobs=%d max_files=%" lld " max_size=%" lld "\n",
+++          res->res_dev.max_volume_jobs, res->res_dev.max_volume_files,
+++          res->res_dev.max_volume_size);
+++       sendit(sock, "        max_file_size=%" lld " capacity=%" lld "\n",
+++          res->res_dev.max_file_size, res->res_dev.volume_capacity);
+++-      sendit(sock, "         spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
+++-      sendit(sock, "         max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
++++      sendit(sock, "        spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
++++      sendit(sock, "        max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
+++          res->res_dev.max_spool_size, res->res_dev.max_job_spool_size);
+++       if (res->res_dev.changer_res) {
+++          sendit(sock, "         changer=%p\n", res->res_dev.changer_res);
+++Index: src/tray-monitor/tray-monitor.c
+++===================================================================
+++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v
+++retrieving revision 1.25.2.1
+++diff -u -r1.25.2.1 tray-monitor.c
+++--- src/tray-monitor/tray-monitor.c  1 Oct 2005 10:20:18 -0000       1.25.2.1
++++++ src/tray-monitor/tray-monitor.c  22 Nov 2005 10:42:24 -0000
+++@@ -4,7 +4,7 @@
+++  *
+++  *     Nicolas Boichat, August MMIV
+++  *
+++- *     Version $Id$
++++ *     Version $Id$
+++  */
+++ 
+++ /*
+++@@ -881,7 +881,7 @@
+++       }
+++ 
+++       if (item->D_sock == NULL) {
+++-         g_slist_append(*list, (void *)_("Cannot connect to daemon.\n"));
++++         g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n")));
+++          changeStatusMessage(item, _("Cannot connect to daemon."));
+++          item->state = error;
+++          item->oldstate = error;
+++Index: updatedb/kes-1.38
+++===================================================================
+++RCS file: updatedb/kes-1.38
+++diff -N updatedb/kes-1.38
+++--- updatedb/kes-1.38        3 Nov 2005 14:54:28 -0000       1.1.2.1
++++++ /dev/null        1 Jan 1970 00:00:00 -0000
+++@@ -1,19 +0,0 @@
+++-              Technical notes on version 1.38  
+++-                        Kern Sibbald
+++-
+++-General:
+++-
+++-Changes to 1.38.0:
+++-- Modify configure.in to add execute option to sqlite3 catalog  
+++-  scripts.
+++-- Create update_xxx_table_8_to_9 scripts for updatedb
+++-- Fix wrong variable in bpipe.c debug output reported by user.
+++-- Fix improper placement of encode_and_send_attributes() in
+++-  FD backup.c causing first file of non-portable Win32 backup
+++-  to have wrong stream. Reported by Thorsten.
+++-- Move the -lcrypt for PostgreSQL after the PostgreSQL libs in
+++-  autoconf/bacula-macros/db.m4 as suggested by user.  Fixes bug #457.
+++-- Remove @STATIC_CONS@ from tray-monitor Makefile as suggested
+++-  by user. Fixes bug #456.
+++-
+++-Released 1.38.0 (28Oct05): 31 October 2005
++Index: patches/patches-1.38.0
++===================================================================
++RCS file: patches/patches-1.38.0
++diff -N patches/patches-1.38.0
++Index: patches/patches-1.38.1
++===================================================================
++RCS file: patches/patches-1.38.1
++diff -N patches/patches-1.38.1
++--- /dev/null 1 Jan 1970 00:00:00 -0000
+++++ patches/patches-1.38.1    22 Nov 2005 10:50:55 -0000      1.1.2.2
++@@ -0,0 +1,14 @@
+++20Nov05 1.38.1-to-1.38.2.patch
+++ This patch fixes the following bugs:
+++
+++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
+++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
+++  says this patch does not fix his problem)
+++- Fix cancel failure bug. Bug #481
+++- Fix failure when Pool name has spaces. Bug #487
+++- Fix SD crash in autochanger code. Mutex failure. Bug #488
+++- Fix a couple of free()s in src/filed/acl.c
+++- Fix memory overrun in bfile.c in building OS X resource
+++  fork filename. Bug #489
+++                         
+++  
++Index: src/version.h
++===================================================================
++RCS file: /cvsroot/bacula/bacula/src/version.h,v
++retrieving revision 1.554.2.14
++retrieving revision 1.554.2.15
++diff -u -r1.554.2.14 -r1.554.2.15
++--- src/version.h     14 Nov 2005 14:21:58 -0000      1.554.2.14
+++++ src/version.h     22 Nov 2005 10:50:55 -0000      1.554.2.15
++@@ -1,11 +1,11 @@
++ /*
++- *  Version $Id$
+++ *  Version $Id$
++  */
++ 
++ #undef  VERSION
++-#define VERSION "1.38.1"
++-#define BDATE   "14 November 2005"
++-#define LSMDATE "14Nov05"
+++#define VERSION "1.38.2"
+++#define BDATE   "20 November 2005"
+++#define LSMDATE "20Nov05"
++ 
++ /* Debug flags */
++ #undef  DEBUG
++Index: src/dird/catreq.c
++===================================================================
++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v
++retrieving revision 1.77.2.1
++retrieving revision 1.77.2.2
++diff -u -r1.77.2.1 -r1.77.2.2
++--- src/dird/catreq.c 26 Oct 2005 14:02:04 -0000      1.77.2.1
+++++ src/dird/catreq.c 22 Nov 2005 10:50:55 -0000      1.77.2.2
++@@ -10,7 +10,7 @@
++  *  Basic tasks done here:
++  *      Handle Catalog services.
++  *
++- *   Version $Id$
+++ *   Version $Id$
++  */
++ /*
++    Copyright (C) 2001-2005 Kern Sibbald
++@@ -117,6 +117,7 @@
++    if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) {
++       memset(&pr, 0, sizeof(pr));
++       bstrncpy(pr.Name, pool_name, sizeof(pr.Name));
+++      unbash_spaces(pr.Name);
++       ok = db_get_pool_record(jcr, jcr->db, &pr);
++       if (ok) {
++          mr.PoolId = pr.PoolId;
++Index: src/dird/ua_restore.c
++===================================================================
++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v
++retrieving revision 1.101.2.1
++retrieving revision 1.101.2.2
++diff -u -r1.101.2.1 -r1.101.2.2
++--- src/dird/ua_restore.c     26 Oct 2005 14:02:04 -0000      1.101.2.1
+++++ src/dird/ua_restore.c     22 Nov 2005 10:50:55 -0000      1.101.2.2
++@@ -10,7 +10,7 @@
++  *
++  *     Kern Sibbald, July MMII
++  *
++- *   Version $Id$
+++ *   Version $Id$
++  */
++ /*
++    Copyright (C) 2002-2005 Kern Sibbald
++@@ -409,7 +409,7 @@
++       }
++       done = true;
++       switch (do_prompt(ua, "", _("Select item: "), NULL, 0)) {
++-      case -1:                        /* error */
+++      case -1:                        /* error or cancel */
++          return 0;
++       case 0:                         /* list last 20 Jobs run */
++          gui_save = ua->jcr->gui;
++Index: src/dird/ua_run.c
++===================================================================
++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v
++retrieving revision 1.71
++retrieving revision 1.71.2.1
++diff -u -r1.71 -r1.71.2.1
++--- src/dird/ua_run.c 10 Aug 2005 16:35:19 -0000      1.71
+++++ src/dird/ua_run.c 22 Nov 2005 10:50:55 -0000      1.71.2.1
++@@ -4,7 +4,7 @@
++  *
++  *     Kern Sibbald, December MMI
++  *
++- *   Version $Id$
+++ *   Version $Id$
++  */
++ /*
++    Copyright (C) 2001-2005 Kern Sibbald
++@@ -851,6 +851,8 @@
++             bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
++          }
++          goto try_again;
+++      case -1:                        /* error or cancel */
+++         goto bail_out;
++       default:
++          goto try_again;
++       }
++Index: src/dird/ua_select.c
++===================================================================
++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v
++retrieving revision 1.65.2.1
++retrieving revision 1.65.2.2
++diff -u -r1.65.2.1 -r1.65.2.2
++--- src/dird/ua_select.c      12 Nov 2005 17:30:52 -0000      1.65.2.1
+++++ src/dird/ua_select.c      22 Nov 2005 10:50:55 -0000      1.65.2.2
++@@ -4,7 +4,7 @@
++  *
++  *     Kern Sibbald, October MMI
++  *
++- *   Version  $Id$
+++ *   Version  $Id$
++  */
++ /*
++    Copyright (C) 2001-2005 Kern Sibbald
++@@ -149,7 +149,9 @@
++       }
++    }
++    UnlockRes();
++-   do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name));
+++   if (do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name)) < 0) {
+++      return NULL;
+++   }
++    store = (STORE *)GetResWithName(R_STORAGE, name);
++    return store;
++ }
++@@ -170,7 +172,9 @@
++       }
++    }
++    UnlockRes();
++-   do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name));
+++   if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) {
+++      return NULL;
+++   }
++    fs = (FILESET *)GetResWithName(R_FILESET, name);
++    return fs;
++ }
++@@ -202,7 +206,9 @@
++          }
++       }
++       UnlockRes();
++-      do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name));
+++      if (do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name)) < 0) {
+++         return NULL;
+++      }
++       catalog = (CAT *)GetResWithName(R_CATALOG, name);
++    }
++    return catalog;
++@@ -225,7 +231,9 @@
++       }
++    }
++    UnlockRes();
++-   do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name));
+++   if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) {
+++      return NULL;
+++   }
++    job = (JOB *)GetResWithName(R_JOB, name);
++    return job;
++ }
++@@ -246,7 +254,9 @@
++       }
++    }
++    UnlockRes();
++-   do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name));
+++   if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) {
+++      return NULL;
+++   }
++    job = (JOB *)GetResWithName(R_JOB, name);
++    return job;
++ }
++@@ -269,7 +279,9 @@
++       }
++    }
++    UnlockRes();
++-   do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name));
+++   if (do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) {
+++      return NULL;
+++   }
++    client = (CLIENT *)GetResWithName(R_CLIENT, name);
++    return client;
++ }
++@@ -551,7 +563,9 @@
++       }
++    }
++    UnlockRes();
++-   do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name));
+++   if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) {
+++      return NULL;
+++   }
++    pool = (POOL *)GetResWithName(R_POOL, name);
++    return pool;
++ }
++@@ -673,12 +687,16 @@
++  *  Returns: -1 on error
++  *            index base 0 on success, and choice
++  *               is copied to prompt if not NULL
+++ *             prompt is set to the chosen prompt item string
++  */
++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
++ {
++    int i, item;
++    char pmsg[MAXSTRING];
++ 
+++   if (prompt) {
+++      *prompt = 0;
+++   }
++    if (ua->num_prompts == 2) {
++       item = 1;
++       if (prompt) {
++@@ -698,15 +716,11 @@
++       bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
++    }
++ 
++-   if (prompt) {
++-      *prompt = 0;
++-   }
++-
++    for ( ;; ) {
++       /* First item is the prompt string, not the items */
++       if (ua->num_prompts == 1) {
++          bsendmsg(ua, _("Selection is empty!\n"));
++-         item = 0;                    /* list is empty ! */
+++         item = -1;                    /* list is empty ! */
++          break;
++       }
++       if (ua->num_prompts == 2) {
++@@ -741,7 +755,7 @@
++       free(ua->prompt[i]);
++    }
++    ua->num_prompts = 0;
++-   return item - 1;
+++   return item>0 ? item-1 : item;
++ }
++ 
++ 
++Index: src/dird/ua_update.c
++===================================================================
++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v
++retrieving revision 1.7
++retrieving revision 1.7.2.1
++diff -u -r1.7 -r1.7.2.1
++--- src/dird/ua_update.c      28 Aug 2005 12:22:02 -0000      1.7
+++++ src/dird/ua_update.c      22 Nov 2005 10:50:55 -0000      1.7.2.1
++@@ -5,7 +5,7 @@
++  *
++  *     Kern Sibbald, September MM
++  *
++- *   Version $Id$
+++ *   Version $Id$
++  */
++ /*
++    Copyright (C) 2000-2005 Kern Sibbald
++@@ -590,7 +590,7 @@
++          update_all_vols_from_pool(ua);
++          return 1;
++       default:                        /* Done or error */
++-         bsendmsg(ua, _("Selection done.\n"));
+++         bsendmsg(ua, _("Selection terminated.\n"));
++          return 1;
++       }
++    }
++Index: src/filed/acl.c
++===================================================================
++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v
++retrieving revision 1.10.2.1
++retrieving revision 1.10.2.2
++diff -u -r1.10.2.1 -r1.10.2.2
++--- src/filed/acl.c   14 Nov 2005 20:20:38 -0000      1.10.2.1
+++++ src/filed/acl.c   22 Nov 2005 10:50:55 -0000      1.10.2.2
++@@ -26,7 +26,7 @@
++  *
++  *   Written by Preben 'Peppe' Guldberg, December MMIV
++  *
++- *   Version $Id$
+++ *   Version $Id$
++  */
++ /*
++    Copyright (C) 2004-2005 Kern Sibbald
++@@ -140,7 +140,7 @@
++ 
++    if ((acl_text = acl_get(jcr->last_fname)) != NULL) {
++       len = pm_strcpy(jcr->acl_text, acl_text);
++-      free(acl_text);
+++      actuallyfree(acl_text);
++       return len;
++    }
++    return -1;
++@@ -270,7 +270,7 @@
++    if ((n = getacl(jcr->last_fname, n, acls)) > 0) {
++       if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) {
++          len = pm_strcpy(jcr->acl_text, acl_text);
++-         free(acl_text);
+++         actuallyfree(acl_text);
++          return len;
++       }
++    }
++Index: src/findlib/bfile.c
++===================================================================
++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v
++retrieving revision 1.40
++retrieving revision 1.40.2.1
++diff -u -r1.40 -r1.40.2.1
++--- src/findlib/bfile.c       10 Aug 2005 16:35:19 -0000      1.40
+++++ src/findlib/bfile.c       22 Nov 2005 10:50:55 -0000      1.40.2.1
++@@ -5,7 +5,7 @@
++  *
++  *    Kern Sibbald, April MMIII
++  *
++- *   Version $Id$
+++ *   Version $Id$
++  *
++  */
++ /*
++@@ -623,13 +623,10 @@
++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
++ {
++    POOLMEM *rsrc_fname;
++-   size_t fname_len;
++ 
++-   fname_len = strlen(fname);
++    rsrc_fname = get_pool_memory(PM_FNAME);
++-   bstrncpy(rsrc_fname, fname, fname_len + 1);
++-   bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC,
++-      strlen(_PATH_RSRCFORKSPEC) + 1);
+++   pm_strcpy(rsrc_fname, fname);
+++   pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC);
++    bopen(bfd, rsrc_fname, flags, mode);
++    free_pool_memory(rsrc_fname);
++    return bfd->fid;
++Index: src/lib/bnet_server.c
++===================================================================
++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v
++retrieving revision 1.39
++retrieving revision 1.39.2.1
++diff -u -r1.39 -r1.39.2.1
++--- src/lib/bnet_server.c     18 Aug 2005 15:37:40 -0000      1.39
+++++ src/lib/bnet_server.c     22 Nov 2005 10:50:55 -0000      1.39.2.1
++@@ -16,7 +16,7 @@
++   * Originally written by Kern Sibbald for inclusion in apcupsd,
++   *  but heavily modified for Bacula
++   *
++-  *   Version $Id$
+++  *   Version $Id$
++   */
++ 
++ #include "bacula.h"
++@@ -153,7 +153,6 @@
++          /* Error, get out */
++          foreach_dlist(fd_ptr, &sockfds) {
++             close(fd_ptr->fd);
++-            free((void *)fd_ptr);
++          }
++          Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror());
++          break;
++Index: src/stored/autochanger.c
++===================================================================
++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
++retrieving revision 1.47.2.3
++retrieving revision 1.47.2.4
++diff -u -r1.47.2.3 -r1.47.2.4
++--- src/stored/autochanger.c  12 Nov 2005 17:30:53 -0000      1.47.2.3
+++++ src/stored/autochanger.c  22 Nov 2005 10:50:55 -0000      1.47.2.4
++@@ -4,7 +4,7 @@
++  *
++  *   Kern Sibbald, August MMII
++  *                            
++- *   Version $Id$
+++ *   Version $Id$
++  */
++ /*
++    Copyright (C) 2002-2005 Kern Sibbald
++@@ -163,6 +163,7 @@
++             rtn_stat = -1;            /* hard error */
++          }
++          Dmsg2(400, "load slot %d status=%d\n", slot, status);
+++         unlock_changer(dcr);
++       } else {
++          status = 0;                  /* we got what we want */
++          dev->Slot = slot;            /* set currently loaded slot */
++@@ -174,7 +175,6 @@
++    } else {
++       rtn_stat = 0;                   /* no changer found */
++    }
++-   unlock_changer(dcr);
++    free_pool_memory(changer);
++    return rtn_stat;
++ 
++Index: src/stored/status.c
++===================================================================
++RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v
++retrieving revision 1.44.2.1
++retrieving revision 1.44.2.2
++diff -u -r1.44.2.1 -r1.44.2.2
++--- src/stored/status.c       6 Oct 2005 07:04:13 -0000       1.44.2.1
+++++ src/stored/status.c       22 Nov 2005 10:50:55 -0000      1.44.2.2
++@@ -3,7 +3,7 @@
++  *
++  *     Kern Sibbald, May MMIII
++  *
++- *   Version $Id$
+++ *   Version $Id$
++  *
++  */
++ /*
++@@ -264,6 +264,7 @@
++    bool found = false;
++    int bps, sec;
++    JCR *jcr;
+++   DCR *dcr;
++    char JobName[MAX_NAME_LENGTH];
++    char b1[30], b2[30], b3[30];
++ 
++@@ -273,7 +274,8 @@
++          bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"),
++             job_type_to_str(jcr->JobType), jcr->Job);
++       }
++-      if (jcr->dcr && jcr->dcr->device) {
+++      dcr = jcr->dcr;
+++      if (dcr && dcr->device) {
++          bstrncpy(JobName, jcr->Job, sizeof(JobName));
++          /* There are three periods after the Job name */
++          char *p;
++@@ -282,13 +284,16 @@
++                *p = 0;
++             }
++          }
++-         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"),
+++         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n"
+++                            "    pool=\"%s\" device=\"%s\"\n"),
++                    job_level_to_str(jcr->JobLevel),
++                    job_type_to_str(jcr->JobType),
++                    JobName,
++                    jcr->JobId,
++-                   jcr->dcr->VolumeName,
++-                   jcr->dcr->device->device_name);
+++                   dcr->VolumeName,
+++                   dcr->pool_name,
+++                   dcr->dev?dcr->dev->print_name(): 
+++                            dcr->device->device_name);
++          sec = time(NULL) - jcr->run_time;
++          if (sec <= 0) {
++             sec = 1;
++Index: src/stored/stored_conf.c
++===================================================================
++RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v
++retrieving revision 1.76
++retrieving revision 1.76.2.1
++diff -u -r1.76 -r1.76.2.1
++--- src/stored/stored_conf.c  9 Sep 2005 09:40:04 -0000       1.76
+++++ src/stored/stored_conf.c  22 Nov 2005 10:50:55 -0000      1.76.2.1
++@@ -3,7 +3,7 @@
++  *
++  *     Kern Sibbald, March MM
++  *
++- *   Version $Id$
+++ *   Version $Id$
++  */
++ /*
++    Copyright (C) 2000-2005 Kern Sibbald
++@@ -222,16 +222,16 @@
++          res->res_dev.hdr.name,
++          res->res_dev.media_type, res->res_dev.device_name,
++          res->res_dev.label_type);
++-      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d\n",
+++      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n",
++          res->res_dev.max_rewind_wait, res->res_dev.min_block_size,
++-         res->res_dev.max_block_size);
+++         res->res_dev.max_block_size, res->res_dev.max_changer_wait);
++       sendit(sock, "        max_jobs=%d max_files=%" lld " max_size=%" lld "\n",
++          res->res_dev.max_volume_jobs, res->res_dev.max_volume_files,
++          res->res_dev.max_volume_size);
++       sendit(sock, "        max_file_size=%" lld " capacity=%" lld "\n",
++          res->res_dev.max_file_size, res->res_dev.volume_capacity);
++-      sendit(sock, "         spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
++-      sendit(sock, "         max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
+++      sendit(sock, "        spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
+++      sendit(sock, "        max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
++          res->res_dev.max_spool_size, res->res_dev.max_job_spool_size);
++       if (res->res_dev.changer_res) {
++          sendit(sock, "         changer=%p\n", res->res_dev.changer_res);
++Index: src/tray-monitor/tray-monitor.c
++===================================================================
++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v
++retrieving revision 1.25.2.1
++retrieving revision 1.25.2.2
++diff -u -r1.25.2.1 -r1.25.2.2
++--- src/tray-monitor/tray-monitor.c   1 Oct 2005 10:20:18 -0000       1.25.2.1
+++++ src/tray-monitor/tray-monitor.c   22 Nov 2005 10:50:55 -0000      1.25.2.2
++@@ -4,7 +4,7 @@
++  *
++  *     Nicolas Boichat, August MMIV
++  *
++- *     Version $Id$
+++ *     Version $Id$
++  */
++ 
++ /*
++@@ -881,7 +881,7 @@
++       }
++ 
++       if (item->D_sock == NULL) {
++-         g_slist_append(*list, (void *)_("Cannot connect to daemon.\n"));
+++         g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n")));
++          changeStatusMessage(item, _("Cannot connect to daemon."));
++          item->state = error;
++          item->oldstate = error;
++Index: updatedb/kes-1.38
++===================================================================
++RCS file: updatedb/kes-1.38
++diff -N updatedb/kes-1.38
++--- updatedb/kes-1.38 3 Nov 2005 14:54:28 -0000       1.1.2.1
+++++ /dev/null 1 Jan 1970 00:00:00 -0000
++@@ -1,19 +0,0 @@
++-              Technical notes on version 1.38  
++-                        Kern Sibbald
++-
++-General:
++-
++-Changes to 1.38.0:
++-- Modify configure.in to add execute option to sqlite3 catalog  
++-  scripts.
++-- Create update_xxx_table_8_to_9 scripts for updatedb
++-- Fix wrong variable in bpipe.c debug output reported by user.
++-- Fix improper placement of encode_and_send_attributes() in
++-  FD backup.c causing first file of non-portable Win32 backup
++-  to have wrong stream. Reported by Thorsten.
++-- Move the -lcrypt for PostgreSQL after the PostgreSQL libs in
++-  autoconf/bacula-macros/db.m4 as suggested by user.  Fixes bug #457.
++-- Remove @STATIC_CONS@ from tray-monitor Makefile as suggested
++-  by user. Fixes bug #456.
++-
++-Released 1.38.0 (28Oct05): 31 October 2005
+Index: patches/patches-1.38.0
+===================================================================
+RCS file: patches/patches-1.38.0
+diff -N patches/patches-1.38.0
+Index: patches/patches-1.38.1
+===================================================================
+RCS file: patches/patches-1.38.1
+diff -N patches/patches-1.38.1
+--- /dev/null  1 Jan 1970 00:00:00 -0000
++++ patches/patches-1.38.1     22 Nov 2005 10:50:55 -0000      1.1.2.2
+@@ -0,0 +1,14 @@
++20Nov05 1.38.1-to-1.38.2.patch
++ This patch fixes the following bugs:
++
++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
++  says this patch does not fix his problem)
++- Fix cancel failure bug. Bug #481
++- Fix failure when Pool name has spaces. Bug #487
++- Fix SD crash in autochanger code. Mutex failure. Bug #488
++- Fix a couple of free()s in src/filed/acl.c
++- Fix memory overrun in bfile.c in building OS X resource
++  fork filename. Bug #489
++                         
++  
+Index: src/version.h
+===================================================================
+RCS file: /cvsroot/bacula/bacula/src/version.h,v
+retrieving revision 1.554.2.14
+retrieving revision 1.554.2.15
+diff -u -r1.554.2.14 -r1.554.2.15
+--- src/version.h      14 Nov 2005 14:21:58 -0000      1.554.2.14
++++ src/version.h      22 Nov 2005 10:50:55 -0000      1.554.2.15
+@@ -1,11 +1,11 @@
+ /*
+- *  Version $Id$
++ *  Version $Id$
+  */
+ #undef  VERSION
+-#define VERSION "1.38.1"
+-#define BDATE   "14 November 2005"
+-#define LSMDATE "14Nov05"
++#define VERSION "1.38.2"
++#define BDATE   "20 November 2005"
++#define LSMDATE "20Nov05"
+ /* Debug flags */
+ #undef  DEBUG
+Index: src/dird/catreq.c
+===================================================================
+RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v
+retrieving revision 1.77.2.1
+retrieving revision 1.77.2.2
+diff -u -r1.77.2.1 -r1.77.2.2
+--- src/dird/catreq.c  26 Oct 2005 14:02:04 -0000      1.77.2.1
++++ src/dird/catreq.c  22 Nov 2005 10:50:55 -0000      1.77.2.2
+@@ -10,7 +10,7 @@
+  *  Basic tasks done here:
+  *      Handle Catalog services.
+  *
+- *   Version $Id$
++ *   Version $Id$
+  */
+ /*
+    Copyright (C) 2001-2005 Kern Sibbald
+@@ -117,6 +117,7 @@
+    if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) {
+       memset(&pr, 0, sizeof(pr));
+       bstrncpy(pr.Name, pool_name, sizeof(pr.Name));
++      unbash_spaces(pr.Name);
+       ok = db_get_pool_record(jcr, jcr->db, &pr);
+       if (ok) {
+          mr.PoolId = pr.PoolId;
+Index: src/dird/ua_restore.c
+===================================================================
+RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v
+retrieving revision 1.101.2.1
+retrieving revision 1.101.2.2
+diff -u -r1.101.2.1 -r1.101.2.2
+--- src/dird/ua_restore.c      26 Oct 2005 14:02:04 -0000      1.101.2.1
++++ src/dird/ua_restore.c      22 Nov 2005 10:50:55 -0000      1.101.2.2
+@@ -10,7 +10,7 @@
+  *
+  *     Kern Sibbald, July MMII
+  *
+- *   Version $Id$
++ *   Version $Id$
+  */
+ /*
+    Copyright (C) 2002-2005 Kern Sibbald
+@@ -409,7 +409,7 @@
+       }
+       done = true;
+       switch (do_prompt(ua, "", _("Select item: "), NULL, 0)) {
+-      case -1:                        /* error */
++      case -1:                        /* error or cancel */
+          return 0;
+       case 0:                         /* list last 20 Jobs run */
+          gui_save = ua->jcr->gui;
+Index: src/dird/ua_run.c
+===================================================================
+RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v
+retrieving revision 1.71
+retrieving revision 1.71.2.1
+diff -u -r1.71 -r1.71.2.1
+--- src/dird/ua_run.c  10 Aug 2005 16:35:19 -0000      1.71
++++ src/dird/ua_run.c  22 Nov 2005 10:50:55 -0000      1.71.2.1
+@@ -4,7 +4,7 @@
+  *
+  *     Kern Sibbald, December MMI
+  *
+- *   Version $Id$
++ *   Version $Id$
+  */
+ /*
+    Copyright (C) 2001-2005 Kern Sibbald
+@@ -851,6 +851,8 @@
+             bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
+          }
+          goto try_again;
++      case -1:                        /* error or cancel */
++         goto bail_out;
+       default:
+          goto try_again;
+       }
+Index: src/dird/ua_select.c
+===================================================================
+RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v
+retrieving revision 1.65.2.1
+retrieving revision 1.65.2.2
+diff -u -r1.65.2.1 -r1.65.2.2
+--- src/dird/ua_select.c       12 Nov 2005 17:30:52 -0000      1.65.2.1
++++ src/dird/ua_select.c       22 Nov 2005 10:50:55 -0000      1.65.2.2
+@@ -4,7 +4,7 @@
+  *
+  *     Kern Sibbald, October MMI
+  *
+- *   Version  $Id$
++ *   Version  $Id$
+  */
+ /*
+    Copyright (C) 2001-2005 Kern Sibbald
+@@ -149,7 +149,9 @@
+       }
+    }
+    UnlockRes();
+-   do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name));
++   if (do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name)) < 0) {
++      return NULL;
++   }
+    store = (STORE *)GetResWithName(R_STORAGE, name);
+    return store;
+ }
+@@ -170,7 +172,9 @@
+       }
+    }
+    UnlockRes();
+-   do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name));
++   if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) {
++      return NULL;
++   }
+    fs = (FILESET *)GetResWithName(R_FILESET, name);
+    return fs;
+ }
+@@ -202,7 +206,9 @@
+          }
+       }
+       UnlockRes();
+-      do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name));
++      if (do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name)) < 0) {
++         return NULL;
++      }
+       catalog = (CAT *)GetResWithName(R_CATALOG, name);
+    }
+    return catalog;
+@@ -225,7 +231,9 @@
+       }
+    }
+    UnlockRes();
+-   do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name));
++   if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) {
++      return NULL;
++   }
+    job = (JOB *)GetResWithName(R_JOB, name);
+    return job;
+ }
+@@ -246,7 +254,9 @@
+       }
+    }
+    UnlockRes();
+-   do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name));
++   if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) {
++      return NULL;
++   }
+    job = (JOB *)GetResWithName(R_JOB, name);
+    return job;
+ }
+@@ -269,7 +279,9 @@
+       }
+    }
+    UnlockRes();
+-   do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name));
++   if (do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) {
++      return NULL;
++   }
+    client = (CLIENT *)GetResWithName(R_CLIENT, name);
+    return client;
+ }
+@@ -551,7 +563,9 @@
+       }
+    }
+    UnlockRes();
+-   do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name));
++   if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) {
++      return NULL;
++   }
+    pool = (POOL *)GetResWithName(R_POOL, name);
+    return pool;
+ }
+@@ -673,12 +687,16 @@
+  *  Returns: -1 on error
+  *            index base 0 on success, and choice
+  *               is copied to prompt if not NULL
++ *             prompt is set to the chosen prompt item string
+  */
+ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
+ {
+    int i, item;
+    char pmsg[MAXSTRING];
++   if (prompt) {
++      *prompt = 0;
++   }
+    if (ua->num_prompts == 2) {
+       item = 1;
+       if (prompt) {
+@@ -698,15 +716,11 @@
+       bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
+    }
+-   if (prompt) {
+-      *prompt = 0;
+-   }
+-
+    for ( ;; ) {
+       /* First item is the prompt string, not the items */
+       if (ua->num_prompts == 1) {
+          bsendmsg(ua, _("Selection is empty!\n"));
+-         item = 0;                    /* list is empty ! */
++         item = -1;                    /* list is empty ! */
+          break;
+       }
+       if (ua->num_prompts == 2) {
+@@ -741,7 +755,7 @@
+       free(ua->prompt[i]);
+    }
+    ua->num_prompts = 0;
+-   return item - 1;
++   return item>0 ? item-1 : item;
+ }
+Index: src/dird/ua_update.c
+===================================================================
+RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v
+retrieving revision 1.7
+retrieving revision 1.7.2.1
+diff -u -r1.7 -r1.7.2.1
+--- src/dird/ua_update.c       28 Aug 2005 12:22:02 -0000      1.7
++++ src/dird/ua_update.c       22 Nov 2005 10:50:55 -0000      1.7.2.1
+@@ -5,7 +5,7 @@
+  *
+  *     Kern Sibbald, September MM
+  *
+- *   Version $Id$
++ *   Version $Id$
+  */
+ /*
+    Copyright (C) 2000-2005 Kern Sibbald
+@@ -590,7 +590,7 @@
+          update_all_vols_from_pool(ua);
+          return 1;
+       default:                        /* Done or error */
+-         bsendmsg(ua, _("Selection done.\n"));
++         bsendmsg(ua, _("Selection terminated.\n"));
+          return 1;
+       }
+    }
+Index: src/filed/acl.c
+===================================================================
+RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v
+retrieving revision 1.10.2.1
+retrieving revision 1.10.2.2
+diff -u -r1.10.2.1 -r1.10.2.2
+--- src/filed/acl.c    14 Nov 2005 20:20:38 -0000      1.10.2.1
++++ src/filed/acl.c    22 Nov 2005 10:50:55 -0000      1.10.2.2
+@@ -26,7 +26,7 @@
+  *
+  *   Written by Preben 'Peppe' Guldberg, December MMIV
+  *
+- *   Version $Id$
++ *   Version $Id$
+  */
+ /*
+    Copyright (C) 2004-2005 Kern Sibbald
+@@ -140,7 +140,7 @@
+    if ((acl_text = acl_get(jcr->last_fname)) != NULL) {
+       len = pm_strcpy(jcr->acl_text, acl_text);
+-      free(acl_text);
++      actuallyfree(acl_text);
+       return len;
+    }
+    return -1;
+@@ -270,7 +270,7 @@
+    if ((n = getacl(jcr->last_fname, n, acls)) > 0) {
+       if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) {
+          len = pm_strcpy(jcr->acl_text, acl_text);
+-         free(acl_text);
++         actuallyfree(acl_text);
+          return len;
+       }
+    }
+Index: src/findlib/bfile.c
+===================================================================
+RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v
+retrieving revision 1.40
+retrieving revision 1.40.2.1
+diff -u -r1.40 -r1.40.2.1
+--- src/findlib/bfile.c        10 Aug 2005 16:35:19 -0000      1.40
++++ src/findlib/bfile.c        22 Nov 2005 10:50:55 -0000      1.40.2.1
+@@ -5,7 +5,7 @@
+  *
+  *    Kern Sibbald, April MMIII
+  *
+- *   Version $Id$
++ *   Version $Id$
+  *
+  */
+ /*
+@@ -623,13 +623,10 @@
+ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
+ {
+    POOLMEM *rsrc_fname;
+-   size_t fname_len;
+-   fname_len = strlen(fname);
+    rsrc_fname = get_pool_memory(PM_FNAME);
+-   bstrncpy(rsrc_fname, fname, fname_len + 1);
+-   bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC,
+-      strlen(_PATH_RSRCFORKSPEC) + 1);
++   pm_strcpy(rsrc_fname, fname);
++   pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC);
+    bopen(bfd, rsrc_fname, flags, mode);
+    free_pool_memory(rsrc_fname);
+    return bfd->fid;
+Index: src/lib/bnet_server.c
+===================================================================
+RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v
+retrieving revision 1.39
+retrieving revision 1.39.2.1
+diff -u -r1.39 -r1.39.2.1
+--- src/lib/bnet_server.c      18 Aug 2005 15:37:40 -0000      1.39
++++ src/lib/bnet_server.c      22 Nov 2005 10:50:55 -0000      1.39.2.1
+@@ -16,7 +16,7 @@
+   * Originally written by Kern Sibbald for inclusion in apcupsd,
+   *  but heavily modified for Bacula
+   *
+-  *   Version $Id$
++  *   Version $Id$
+   */
+ #include "bacula.h"
+@@ -153,7 +153,6 @@
+          /* Error, get out */
+          foreach_dlist(fd_ptr, &sockfds) {
+             close(fd_ptr->fd);
+-            free((void *)fd_ptr);
+          }
+          Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror());
+          break;
+Index: src/stored/autochanger.c
+===================================================================
+RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
+retrieving revision 1.47.2.3
+retrieving revision 1.47.2.4
+diff -u -r1.47.2.3 -r1.47.2.4
+--- src/stored/autochanger.c   12 Nov 2005 17:30:53 -0000      1.47.2.3
++++ src/stored/autochanger.c   22 Nov 2005 10:50:55 -0000      1.47.2.4
+@@ -4,7 +4,7 @@
+  *
+  *   Kern Sibbald, August MMII
+  *                            
+- *   Version $Id$
++ *   Version $Id$
+  */
+ /*
+    Copyright (C) 2002-2005 Kern Sibbald
+@@ -163,6 +163,7 @@
+             rtn_stat = -1;            /* hard error */
+          }
+          Dmsg2(400, "load slot %d status=%d\n", slot, status);
++         unlock_changer(dcr);
+       } else {
+          status = 0;                  /* we got what we want */
+          dev->Slot = slot;            /* set currently loaded slot */
+@@ -174,7 +175,6 @@
+    } else {
+       rtn_stat = 0;                   /* no changer found */
+    }
+-   unlock_changer(dcr);
+    free_pool_memory(changer);
+    return rtn_stat;
+Index: src/stored/status.c
+===================================================================
+RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v
+retrieving revision 1.44.2.1
+retrieving revision 1.44.2.2
+diff -u -r1.44.2.1 -r1.44.2.2
+--- src/stored/status.c        6 Oct 2005 07:04:13 -0000       1.44.2.1
++++ src/stored/status.c        22 Nov 2005 10:50:55 -0000      1.44.2.2
+@@ -3,7 +3,7 @@
+  *
+  *     Kern Sibbald, May MMIII
+  *
+- *   Version $Id$
++ *   Version $Id$
+  *
+  */
+ /*
+@@ -264,6 +264,7 @@
+    bool found = false;
+    int bps, sec;
+    JCR *jcr;
++   DCR *dcr;
+    char JobName[MAX_NAME_LENGTH];
+    char b1[30], b2[30], b3[30];
+@@ -273,7 +274,8 @@
+          bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"),
+             job_type_to_str(jcr->JobType), jcr->Job);
+       }
+-      if (jcr->dcr && jcr->dcr->device) {
++      dcr = jcr->dcr;
++      if (dcr && dcr->device) {
+          bstrncpy(JobName, jcr->Job, sizeof(JobName));
+          /* There are three periods after the Job name */
+          char *p;
+@@ -282,13 +284,16 @@
+                *p = 0;
+             }
+          }
+-         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"),
++         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n"
++                            "    pool=\"%s\" device=\"%s\"\n"),
+                    job_level_to_str(jcr->JobLevel),
+                    job_type_to_str(jcr->JobType),
+                    JobName,
+                    jcr->JobId,
+-                   jcr->dcr->VolumeName,
+-                   jcr->dcr->device->device_name);
++                   dcr->VolumeName,
++                   dcr->pool_name,
++                   dcr->dev?dcr->dev->print_name(): 
++                            dcr->device->device_name);
+          sec = time(NULL) - jcr->run_time;
+          if (sec <= 0) {
+             sec = 1;
+Index: src/stored/stored_conf.c
+===================================================================
+RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v
+retrieving revision 1.76
+retrieving revision 1.76.2.1
+diff -u -r1.76 -r1.76.2.1
+--- src/stored/stored_conf.c   9 Sep 2005 09:40:04 -0000       1.76
++++ src/stored/stored_conf.c   22 Nov 2005 10:50:55 -0000      1.76.2.1
+@@ -3,7 +3,7 @@
+  *
+  *     Kern Sibbald, March MM
+  *
+- *   Version $Id$
++ *   Version $Id$
+  */
+ /*
+    Copyright (C) 2000-2005 Kern Sibbald
+@@ -222,16 +222,16 @@
+          res->res_dev.hdr.name,
+          res->res_dev.media_type, res->res_dev.device_name,
+          res->res_dev.label_type);
+-      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d\n",
++      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n",
+          res->res_dev.max_rewind_wait, res->res_dev.min_block_size,
+-         res->res_dev.max_block_size);
++         res->res_dev.max_block_size, res->res_dev.max_changer_wait);
+       sendit(sock, "        max_jobs=%d max_files=%" lld " max_size=%" lld "\n",
+          res->res_dev.max_volume_jobs, res->res_dev.max_volume_files,
+          res->res_dev.max_volume_size);
+       sendit(sock, "        max_file_size=%" lld " capacity=%" lld "\n",
+          res->res_dev.max_file_size, res->res_dev.volume_capacity);
+-      sendit(sock, "         spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
+-      sendit(sock, "         max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
++      sendit(sock, "        spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
++      sendit(sock, "        max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
+          res->res_dev.max_spool_size, res->res_dev.max_job_spool_size);
+       if (res->res_dev.changer_res) {
+          sendit(sock, "         changer=%p\n", res->res_dev.changer_res);
+Index: src/tray-monitor/tray-monitor.c
+===================================================================
+RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v
+retrieving revision 1.25.2.1
+retrieving revision 1.25.2.2
+diff -u -r1.25.2.1 -r1.25.2.2
+--- src/tray-monitor/tray-monitor.c    1 Oct 2005 10:20:18 -0000       1.25.2.1
++++ src/tray-monitor/tray-monitor.c    22 Nov 2005 10:50:55 -0000      1.25.2.2
+@@ -4,7 +4,7 @@
+  *
+  *     Nicolas Boichat, August MMIV
+  *
+- *     Version $Id$
++ *     Version $Id$
+  */
+ /*
+@@ -881,7 +881,7 @@
+       }
+       if (item->D_sock == NULL) {
+-         g_slist_append(*list, (void *)_("Cannot connect to daemon.\n"));
++         g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n")));
+          changeStatusMessage(item, _("Cannot connect to daemon."));
+          item->state = error;
+          item->oldstate = error;
+Index: updatedb/kes-1.38
+===================================================================
+RCS file: updatedb/kes-1.38
+diff -N updatedb/kes-1.38
+--- updatedb/kes-1.38  3 Nov 2005 14:54:28 -0000       1.1.2.1
++++ /dev/null  1 Jan 1970 00:00:00 -0000
+@@ -1,19 +0,0 @@
+-              Technical notes on version 1.38  
+-                        Kern Sibbald
+-
+-General:
+-
+-Changes to 1.38.0:
+-- Modify configure.in to add execute option to sqlite3 catalog  
+-  scripts.
+-- Create update_xxx_table_8_to_9 scripts for updatedb
+-- Fix wrong variable in bpipe.c debug output reported by user.
+-- Fix improper placement of encode_and_send_attributes() in
+-  FD backup.c causing first file of non-portable Win32 backup
+-  to have wrong stream. Reported by Thorsten.
+-- Move the -lcrypt for PostgreSQL after the PostgreSQL libs in
+-  autoconf/bacula-macros/db.m4 as suggested by user.  Fixes bug #457.
+-- Remove @STATIC_CONS@ from tray-monitor Makefile as suggested
+-  by user. Fixes bug #456.
+-
+-Released 1.38.0 (28Oct05): 31 October 2005
diff --git a/bacula/patches/1.38.x/1.38.10-dvd-eof.patch b/bacula/patches/1.38.x/1.38.10-dvd-eof.patch
new file mode 100644 (file)
index 0000000..26cb3a7
--- /dev/null
@@ -0,0 +1,35 @@
+Index: src/stored/block.c
+===================================================================
+RCS file: /cvsroot/bacula/bacula/src/stored/block.c,v
+retrieving revision 1.116.2.3
+diff -u -u -b -r1.116.2.3 block.c
+--- src/stored/block.c 24 Mar 2006 16:35:23 -0000      1.116.2.3
++++ src/stored/block.c 12 Jun 2006 16:19:27 -0000
+@@ -9,7 +9,7 @@
+  *
+  */
+ /*
+-   Copyright (C) 2001-2005 Kern Sibbald
++   Copyright (C) 2001-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
+@@ -910,13 +910,12 @@
+    Dmsg3(100, "Tests : %d %d %d\n", (dev->VolCatInfo.VolCatParts > 0), 
+          ((dev->file_addr-dev->part_start) == dev->part_size), 
+          (dev->part <= dev->VolCatInfo.VolCatParts));*/
+-   /* Check for part file end */
+-   if ((dev->num_parts > 0) &&
+-        ((dev->file_addr-dev->part_start) == dev->part_size) && 
+-        (dev->part < dev->num_parts)) {
++   /* Check for DVD part file end */
++   if (dev->at_eof() && dev->is_dvd() && dev->num_parts > 0 &&
++        dev->part < dev->num_parts) {
+       if (dvd_open_next_part(dcr) < 0) {
+-         Jmsg2(dcr->jcr, M_FATAL, 0, _("Unable to open device next part %s: ERR=%s\n"),
+-               dev->print_name(), strerror_dev(dev));
++         Jmsg3(dcr->jcr, M_FATAL, 0, _("Unable to open device part=%d %s: ERR=%s\n"),
++               dev->part, dev->print_name(), strerror_dev(dev));
+          dev->dev_errno = EIO;
+          return false;
+       }
diff --git a/bacula/patches/1.38.x/1.38.10-scheduler.patch b/bacula/patches/1.38.x/1.38.10-scheduler.patch
new file mode 100644 (file)
index 0000000..292c4d6
--- /dev/null
@@ -0,0 +1,28 @@
+
+ This patch should correct the FreeBSD mutex crash that happens in
+ the Director after a sudden clock shift or after the "reload" command.
+ Apply it to 1.38.10 (will not work with prior version) with:
+
+  cd <bacula-source>
+  patch -p0 <1.38.10-scheduler.patch
+  make
+  make install
+  ...
+
+
+
+Index: src/dird/scheduler.c
+===================================================================
+RCS file: /cvsroot/bacula/bacula/src/dird/scheduler.c,v
+retrieving revision 1.33.2.2
+diff -u -r1.33.2.2 scheduler.c
+--- src/dird/scheduler.c       4 Jun 2006 12:24:39 -0000       1.33.2.2
++++ src/dird/scheduler.c       24 Jun 2006 17:25:58 -0000
+@@ -151,6 +151,7 @@
+               free(next_job);
+           }
+           schedules_invalidated = false;
++          unlock_jobs();
+           goto again;
+       }
+       unlock_jobs();
diff --git a/bacula/patches/1.38.x/1.38.6-script.patch b/bacula/patches/1.38.x/1.38.6-script.patch
new file mode 100644 (file)
index 0000000..7bce5fd
--- /dev/null
@@ -0,0 +1,63 @@
+
+ This patch fixes a bug in the bacula start/stop script where
+ the binary directory is used rather than the scripts directory.
+ Apply the patch to version 1.38.6 with:
+
+ cd <bacula-source>
+ patch -p0 <1.38.6-script.patch
+ make Makefiles
+ make install
+ ...
+
+Index: scripts/bacula.in
+===================================================================
+RCS file: /cvsroot/bacula/bacula/scripts/bacula.in,v
+retrieving revision 1.13.2.3
+diff -u -r1.13.2.3 bacula.in
+--- scripts/bacula.in  28 Mar 2006 16:42:19 -0000      1.13.2.3
++++ scripts/bacula.in  29 Mar 2006 16:24:51 -0000
+@@ -13,25 +13,22 @@
+ #  easier to "steal" this code for the development 
+ #  environment where they are different.
+ #  
+-BACFDBIN=@sbindir@
+ BACFDCFG=@sysconfdir@
+-BACSDBIN=@sbindir@
+ BACSDCFG=@sysconfdir@
+-BACDIRBIN=@sbindir@
+ BACDIRCFG=@sysconfdir@
+ case "$1" in
+    start)
+-      [ -x ${BACSDBIN}/bacula-ctl-sd ] && ${BACSDBIN}/bacula-ctl-sd $1 $2
+-      [ -x ${BACFDBIN}/bacula-ctl-fd ] && ${BACFDBIN}/bacula-ctl-fd $1 $2
+-      [ -x ${BACDIRBIN}/bacula-ctl-dir ] && ${BACDIRBIN}/bacula-ctl-dir $1 $2
++      [ -x ${BACSDCFG}/bacula-ctl-sd ] && ${BACSDCFG}/bacula-ctl-sd $1 $2
++      [ -x ${BACFDCFG}/bacula-ctl-fd ] && ${BACFDCFG}/bacula-ctl-fd $1 $2
++      [ -x ${BACDIRCFG}/bacula-ctl-dir ] && ${BACDIRCFG}/bacula-ctl-dir $1 $2
+       ;;
+    stop)
+       # Stop the FD first so that SD will fail jobs and update catalog
+-      [ -x ${BACFDBIN}/bacula-ctl-fd ] && ${BACFDBIN}/bacula-ctl-fd $1 $2
+-      [ -x ${BACSDBIN}/bacula-ctl-sd ] && ${BACSDBIN}/bacula-ctl-sd $1 $2
+-      [ -x ${BACDIRBIN}/bacula-ctl-dir ] && ${BACDIRBIN}/bacula-ctl-dir $1 $2
++      [ -x ${BACFDCFG}/bacula-ctl-fd ] && ${BACFDCFG}/bacula-ctl-fd $1 $2
++      [ -x ${BACSDCFG}/bacula-ctl-sd ] && ${BACSDCFG}/bacula-ctl-sd $1 $2
++      [ -x ${BACDIRCFG}/bacula-ctl-dir ] && ${BACDIRCFG}/bacula-ctl-dir $1 $2
+       echo
+       sleep 6
+       ;;
+@@ -42,9 +39,9 @@
+       ;;
+    status)
+-      [ -x ${BACSDBIN}/bacula-ctl-sd ] && ${BACSDBIN}/bacula-ctl-sd status
+-      [ -x ${BACFDBIN}/bacula-ctl-fd ] && ${BACFDBIN}/bacula-ctl-fd status
+-      [ -x ${BACDIRBIN}/bacula-ctl-dir ] && ${BACDIRBIN}/bacula-ctl-dir status
++      [ -x ${BACSDCFG}/bacula-ctl-sd ] && ${BACSDCFG}/bacula-ctl-sd status
++      [ -x ${BACFDCFG}/bacula-ctl-fd ] && ${BACFDCFG}/bacula-ctl-fd status
++      [ -x ${BACDIRCFG}/bacula-ctl-dir ] && ${BACDIRCFG}/bacula-ctl-dir status
+       ;;
+    *)
diff --git a/bacula/patches/1.38.x/1.38.7-mysql.patch b/bacula/patches/1.38.x/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 19c9fe911a1c61a61523f4df2360dd25bd0711aa..08fea2d7f7cf7e1cac7fb2689acacd2a3f6b78de 100644 (file)
@@ -1,6 +1,6 @@
 diff -Naur cvs/src/cats/cats.h my/src/cats/cats.h
 --- cvs/src/cats/cats.h        2006-12-06 15:11:53.000000000 +0100
-+++ my/src/cats/cats.h 2006-12-14 21:11:40.000000000 +0100
++++ my/src/cats/cats.h 2007-01-10 19:21:42.000000000 +0100
 @@ -141,6 +141,7 @@
     POOLMEM *fname;                    /* Filename only */
     POOLMEM *path;                     /* Path only */
@@ -156,7 +156,7 @@ diff -Naur cvs/src/cats/cats.h my/src/cats/cats.h
  
 diff -Naur cvs/src/cats/mysql.c my/src/cats/mysql.c
 --- cvs/src/cats/mysql.c       2006-12-09 14:41:50.000000000 +0100
-+++ my/src/cats/mysql.c        2006-12-16 19:18:17.000000000 +0100
++++ my/src/cats/mysql.c        2007-01-10 19:21:42.000000000 +0100
 @@ -121,6 +121,7 @@
     mdb->fname = get_pool_memory(PM_FNAME);
     mdb->path = get_pool_memory(PM_FNAME);
@@ -210,7 +210,7 @@ diff -Naur cvs/src/cats/mysql.c my/src/cats/mysql.c
 +
 diff -Naur cvs/src/cats/postgresql.c my/src/cats/postgresql.c
 --- cvs/src/cats/postgresql.c  2006-12-06 15:11:53.000000000 +0100
-+++ my/src/cats/postgresql.c   2006-12-14 20:28:28.000000000 +0100
++++ my/src/cats/postgresql.c   2007-01-10 19:25:47.000000000 +0100
 @@ -124,6 +124,7 @@
     mdb->fname          = get_pool_memory(PM_FNAME);
     mdb->path           = get_pool_memory(PM_FNAME);
@@ -227,7 +227,7 @@ diff -Naur cvs/src/cats/postgresql.c my/src/cats/postgresql.c
        if (mdb->db_name) {
           free(mdb->db_name);
        }
-@@ -538,5 +540,201 @@
+@@ -538,5 +540,202 @@
     return id;
  }
  
@@ -323,6 +323,7 @@ diff -Naur cvs/src/cats/postgresql.c my/src/cats/postgresql.c
 +   int count=30;
 +   size_t len;
 +   char *digest;
++   char ed1[50];
 +
 +   mdb->esc_name = check_pool_memory_size(mdb->esc_name, mdb->fnl*2+1);
 +   my_postgresql_copy_escape(mdb->esc_name, mdb->fname, mdb->fnl);
@@ -336,8 +337,8 @@ diff -Naur cvs/src/cats/postgresql.c my/src/cats/postgresql.c
 +      digest = ar->Digest;
 +   }
 +
-+   len = Mmsg(mdb->cmd, "%u\t%u\t%s\t%s\t%s\t%s\n", 
-+            ar->FileIndex, ar->JobId, mdb->path, 
++   len = Mmsg(mdb->cmd, "%u\t%s\t%s\t%s\t%s\t%s\n", 
++            ar->FileIndex, edit_int64(ar->JobId, ed1), mdb->path, 
 +            mdb->fname, ar->attr, digest);
 +
 +   do { 
@@ -431,7 +432,7 @@ diff -Naur cvs/src/cats/postgresql.c my/src/cats/postgresql.c
  #endif /* HAVE_POSTGRESQL */
 diff -Naur cvs/src/cats/protos.h my/src/cats/protos.h
 --- cvs/src/cats/protos.h      2006-12-06 15:11:53.000000000 +0100
-+++ my/src/cats/protos.h       2006-12-13 19:03:46.000000000 +0100
++++ my/src/cats/protos.h       2007-01-10 19:21:42.000000000 +0100
 @@ -67,6 +67,10 @@
  bool db_create_device_record(JCR *jcr, B_DB *mdb, DEVICE_DBR *dr);
  bool db_create_storage_record(JCR *jcr, B_DB *mdb, STORAGE_DBR *sr);
@@ -445,8 +446,8 @@ diff -Naur cvs/src/cats/protos.h my/src/cats/protos.h
  int db_delete_pool_record(JCR *jcr, B_DB *db, POOL_DBR *pool_dbr);
 diff -Naur cvs/src/cats/sql_create.c my/src/cats/sql_create.c
 --- cvs/src/cats/sql_create.c  2006-12-06 15:11:53.000000000 +0100
-+++ my/src/cats/sql_create.c   2006-12-14 22:06:41.000000000 +0100
-@@ -664,9 +664,207 @@
++++ my/src/cats/sql_create.c   2007-01-10 21:46:59.000000000 +0100
+@@ -664,9 +664,208 @@
   *  };
   */
  
@@ -478,6 +479,7 @@ diff -Naur cvs/src/cats/sql_create.c my/src/cats/sql_create.c
 +{
 +   size_t len;
 +   char *digest;
++   char edi1[50];
 +
 +   mdb->esc_name = check_pool_memory_size(mdb->esc_name, mdb->fnl*2+1);
 +   db_escape_string(mdb->esc_name, mdb->fname, mdb->fnl);
@@ -491,8 +493,8 @@ diff -Naur cvs/src/cats/sql_create.c my/src/cats/sql_create.c
 +      digest = ar->Digest;
 +   }
 +
-+   len = Mmsg(mdb->cmd, "INSERT INTO batch VALUES (%u,%u,'%s','%s','%s','%s')",
-+              ar->FileIndex, ar->JobId, mdb->path, 
++   len = Mmsg(mdb->cmd, "INSERT INTO batch VALUES (%u,%s,'%s','%s','%s','%s')",
++              ar->FileIndex, edit_int64(ar->JobId,ed1), mdb->path, 
 +              mdb->fname, ar->attr, digest);
 +
 +   sql_query(mdb, mdb->cmd);
@@ -654,7 +656,7 @@ diff -Naur cvs/src/cats/sql_create.c my/src/cats/sql_create.c
   * Create File record in B_DB
   *
   *  In order to reduce database size, we store the File attributes,
-@@ -721,6 +919,8 @@
+@@ -721,6 +920,8 @@
     return 0;
  }
  
@@ -665,7 +667,7 @@ diff -Naur cvs/src/cats/sql_create.c my/src/cats/sql_create.c
   *  The filename and path records have already been created.
 diff -Naur cvs/src/cats/sqlite.c my/src/cats/sqlite.c
 --- cvs/src/cats/sqlite.c      2006-12-06 15:11:53.000000000 +0100
-+++ my/src/cats/sqlite.c       2006-12-14 22:30:35.000000000 +0100
++++ my/src/cats/sqlite.c       2007-01-10 19:21:42.000000000 +0100
 @@ -108,6 +108,7 @@
     mdb->fname = get_pool_memory(PM_FNAME);
     mdb->path = get_pool_memory(PM_FNAME);
@@ -701,7 +703,7 @@ diff -Naur cvs/src/cats/sqlite.c my/src/cats/sqlite.c
  #endif /* HAVE_SQLITE */
 diff -Naur cvs/src/dird/backup.c my/src/dird/backup.c
 --- cvs/src/dird/backup.c      2006-12-13 11:57:52.000000000 +0100
-+++ my/src/dird/backup.c       2006-12-13 19:03:46.000000000 +0100
++++ my/src/dird/backup.c       2007-01-10 19:21:42.000000000 +0100
 @@ -233,6 +233,9 @@
  
     /* Pickup Job termination data */
@@ -714,7 +716,7 @@ diff -Naur cvs/src/dird/backup.c my/src/dird/backup.c
        return true;
 diff -Naur cvs/src/dird/jobq.c my/src/dird/jobq.c
 --- cvs/src/dird/jobq.c        2006-11-24 11:29:37.000000000 +0100
-+++ my/src/dird/jobq.c 2006-12-13 19:03:46.000000000 +0100
++++ my/src/dird/jobq.c 2007-01-10 19:21:42.000000000 +0100
 @@ -563,6 +563,10 @@
              db_close_database(jcr, jcr->db);
              jcr->db = NULL;
@@ -727,8 +729,8 @@ diff -Naur cvs/src/dird/jobq.c my/src/dird/jobq.c
           jcr->SDJobStatus = 0;
           V(jq->mutex);                /* release internal lock */
 diff -Naur cvs/src/jcr.h my/src/jcr.h
---- cvs/src/jcr.h      2006-12-12 21:03:36.000000000 +0100
-+++ my/src/jcr.h       2006-12-13 19:03:46.000000000 +0100
+--- cvs/src/jcr.h      2006-12-19 21:57:38.000000000 +0100
++++ my/src/jcr.h       2007-01-10 19:21:42.000000000 +0100
 @@ -184,6 +184,7 @@
     bool cached_attribute;             /* set if attribute is cached */
     POOLMEM *attr;                     /* Attribute string from SD */
index b192d86391aded216b4e7f989d0516796bda3995..0b505e5cefcfd0f116b5fc97b47e6732ba01ab72 100644 (file)
@@ -1,7 +1,7 @@
-diff -Naur new/bacula-1.39.30/src/baconfig.h bacula-1.39.30/src/baconfig.h
---- new/bacula-1.39.30/src/baconfig.h  2006-12-08 15:27:09.000000000 +0100
-+++ bacula-1.39.30/src/baconfig.h      2006-12-19 22:27:27.000000000 +0100
-@@ -107,8 +107,8 @@
+diff -Naur org/bacula-2.0.0/src/baconfig.h bacula-2.0.0/src/baconfig.h
+--- org/bacula-2.0.0/src/baconfig.h    2006-12-17 14:36:35.000000000 +0100
++++ bacula-2.0.0/src/baconfig.h        2007-01-09 16:10:02.000000000 +0100
+@@ -106,8 +106,8 @@
  #define  OSDependentInit()
  #define  tape_open            open
  #define  tape_ioctl           ioctl
@@ -12,9 +12,9 @@ diff -Naur new/bacula-1.39.30/src/baconfig.h bacula-1.39.30/src/baconfig.h
  #define  tape_close           ::close
  
  #endif
-diff -Naur new/bacula-1.39.30/src/cats/sql_find.c bacula-1.39.30/src/cats/sql_find.c
---- new/bacula-1.39.30/src/cats/sql_find.c     2006-11-27 11:02:59.000000000 +0100
-+++ bacula-1.39.30/src/cats/sql_find.c 2006-12-19 22:27:27.000000000 +0100
+diff -Naur org/bacula-2.0.0/src/cats/sql_find.c bacula-2.0.0/src/cats/sql_find.c
+--- org/bacula-2.0.0/src/cats/sql_find.c       2006-11-27 11:02:59.000000000 +0100
++++ bacula-2.0.0/src/cats/sql_find.c   2007-01-09 16:10:02.000000000 +0100
 @@ -283,7 +283,7 @@
            "VolBytes,VolMounts,VolErrors,VolWrites,MaxVolBytes,VolCapacityBytes,"
            "VolRetention,VolUseDuration,MaxVolJobs,MaxVolFiles,Recycle,Slot,"
@@ -42,9 +42,9 @@ diff -Naur new/bacula-1.39.30/src/cats/sql_find.c bacula-1.39.30/src/cats/sql_fi
     mr->Enabled = 1;   /* ensured via query */
     sql_free_result(mdb);
  
-diff -Naur new/bacula-1.39.30/src/cats/sql_get.c bacula-1.39.30/src/cats/sql_get.c
---- new/bacula-1.39.30/src/cats/sql_get.c      2006-11-27 11:02:59.000000000 +0100
-+++ bacula-1.39.30/src/cats/sql_get.c  2006-12-19 22:27:27.000000000 +0100
+diff -Naur org/bacula-2.0.0/src/cats/sql_get.c bacula-2.0.0/src/cats/sql_get.c
+--- org/bacula-2.0.0/src/cats/sql_get.c        2006-11-27 11:02:59.000000000 +0100
++++ bacula-2.0.0/src/cats/sql_get.c    2007-01-09 16:10:02.000000000 +0100
 @@ -872,7 +872,7 @@
           "MaxVolFiles,Recycle,Slot,FirstWritten,LastWritten,InChanger,"
           "EndFile,EndBlock,VolParts,LabelType,LabelDate,StorageId,"
@@ -72,10 +72,10 @@ diff -Naur new/bacula-1.39.30/src/cats/sql_get.c bacula-1.39.30/src/cats/sql_get
              
              ok = true;
           }
-diff -Naur new/bacula-1.39.30/src/dird/catreq.c bacula-1.39.30/src/dird/catreq.c
---- new/bacula-1.39.30/src/dird/catreq.c       2006-11-21 14:20:08.000000000 +0100
-+++ bacula-1.39.30/src/dird/catreq.c   2006-12-19 22:27:27.000000000 +0100
-@@ -277,7 +277,7 @@
+diff -Naur org/bacula-2.0.0/src/dird/catreq.c bacula-2.0.0/src/dird/catreq.c
+--- org/bacula-2.0.0/src/dird/catreq.c 2006-12-23 17:33:52.000000000 +0100
++++ bacula-2.0.0/src/dird/catreq.c     2007-01-09 16:10:02.000000000 +0100
+@@ -280,7 +280,7 @@
        mr.VolWriteTime = sdmr.VolWriteTime;
        mr.VolParts     = sdmr.VolParts;
        bstrncpy(mr.VolStatus, sdmr.VolStatus, sizeof(mr.VolStatus));
@@ -84,9 +84,9 @@ diff -Naur new/bacula-1.39.30/src/dird/catreq.c bacula-1.39.30/src/dird/catreq.c
           mr.StorageId = jcr->wstore->StorageId;
        }
  
-diff -Naur new/bacula-1.39.30/src/dird/dird.c bacula-1.39.30/src/dird/dird.c
---- new/bacula-1.39.30/src/dird/dird.c 2006-11-27 11:02:59.000000000 +0100
-+++ bacula-1.39.30/src/dird/dird.c     2006-12-19 22:27:27.000000000 +0100
+diff -Naur org/bacula-2.0.0/src/dird/dird.c bacula-2.0.0/src/dird/dird.c
+--- org/bacula-2.0.0/src/dird/dird.c   2006-12-22 16:01:05.000000000 +0100
++++ bacula-2.0.0/src/dird/dird.c       2007-01-09 16:10:02.000000000 +0100
 @@ -269,6 +269,8 @@
  
     init_job_server(director->MaxConcurrentJobs);
@@ -96,9 +96,9 @@ diff -Naur new/bacula-1.39.30/src/dird/dird.c bacula-1.39.30/src/dird/dird.c
     Dmsg0(200, "wait for next job\n");
     /* Main loop -- call scheduler to get next job to run */
     while ( (jcr = wait_for_next_job(runjob)) ) {
-diff -Naur new/bacula-1.39.30/src/dird/getmsg.c bacula-1.39.30/src/dird/getmsg.c
---- new/bacula-1.39.30/src/dird/getmsg.c       2006-11-21 14:20:09.000000000 +0100
-+++ bacula-1.39.30/src/dird/getmsg.c   2006-12-19 22:27:27.000000000 +0100
+diff -Naur org/bacula-2.0.0/src/dird/getmsg.c bacula-2.0.0/src/dird/getmsg.c
+--- org/bacula-2.0.0/src/dird/getmsg.c 2006-11-21 14:20:09.000000000 +0100
++++ bacula-2.0.0/src/dird/getmsg.c     2007-01-09 16:10:02.000000000 +0100
 @@ -62,7 +62,9 @@
     "open=%d labeled=%d offline=%d "
     "reserved=%d max_writers=%d "
@@ -140,9 +140,9 @@ diff -Naur new/bacula-1.39.30/src/dird/getmsg.c bacula-1.39.30/src/dird/getmsg.c
           }
           continue;
        }
-diff -Naur new/bacula-1.39.30/src/stored/acquire.c bacula-1.39.30/src/stored/acquire.c
---- new/bacula-1.39.30/src/stored/acquire.c    2006-11-27 11:03:01.000000000 +0100
-+++ bacula-1.39.30/src/stored/acquire.c        2006-12-19 22:27:27.000000000 +0100
+diff -Naur org/bacula-2.0.0/src/stored/acquire.c bacula-2.0.0/src/stored/acquire.c
+--- org/bacula-2.0.0/src/stored/acquire.c      2006-12-16 16:30:22.000000000 +0100
++++ bacula-2.0.0/src/stored/acquire.c  2007-01-09 16:10:02.000000000 +0100
 @@ -461,8 +461,8 @@
  
     if (dev->can_read()) {
@@ -154,9 +154,9 @@ diff -Naur new/bacula-1.39.30/src/stored/acquire.c bacula-1.39.30/src/stored/acq
  
     } else if (dev->num_writers > 0) {
        /* 
-diff -Naur new/bacula-1.39.30/src/stored/ansi_label.c bacula-1.39.30/src/stored/ansi_label.c
---- new/bacula-1.39.30/src/stored/ansi_label.c 2006-11-21 18:03:45.000000000 +0100
-+++ bacula-1.39.30/src/stored/ansi_label.c     2006-12-19 22:27:27.000000000 +0100
+diff -Naur org/bacula-2.0.0/src/stored/ansi_label.c bacula-2.0.0/src/stored/ansi_label.c
+--- org/bacula-2.0.0/src/stored/ansi_label.c   2006-11-21 18:03:45.000000000 +0100
++++ bacula-2.0.0/src/stored/ansi_label.c       2007-01-09 16:10:02.000000000 +0100
 @@ -87,7 +87,7 @@
     /* Read a maximum of 5 records VOL1, HDR1, ... HDR4 */
     for (i=0; i < 6; i++) {
@@ -193,9 +193,9 @@ diff -Naur new/bacula-1.39.30/src/stored/ansi_label.c bacula-1.39.30/src/stored/
        if (stat != sizeof(label)) {
           berrno be;
           if (stat == -1) {
-diff -Naur new/bacula-1.39.30/src/stored/askdir.c bacula-1.39.30/src/stored/askdir.c
---- new/bacula-1.39.30/src/stored/askdir.c     2006-12-08 15:27:10.000000000 +0100
-+++ bacula-1.39.30/src/stored/askdir.c 2006-12-19 22:27:27.000000000 +0100
+diff -Naur org/bacula-2.0.0/src/stored/askdir.c bacula-2.0.0/src/stored/askdir.c
+--- org/bacula-2.0.0/src/stored/askdir.c       2006-12-08 15:27:10.000000000 +0100
++++ bacula-2.0.0/src/stored/askdir.c   2007-01-09 16:10:02.000000000 +0100
 @@ -308,11 +308,6 @@
        Pmsg0(000, _("NULL Volume name. This shouldn't happen!!!\n"));
        return false;
@@ -208,9 +208,9 @@ diff -Naur new/bacula-1.39.30/src/stored/askdir.c bacula-1.39.30/src/stored/askd
  
     Dmsg1(100, "Update cat VolFiles=%d\n", dev->file);
     /* Just labeled or relabeled the tape */
-diff -Naur new/bacula-1.39.30/src/stored/block.c bacula-1.39.30/src/stored/block.c
---- new/bacula-1.39.30/src/stored/block.c      2006-12-08 15:27:10.000000000 +0100
-+++ bacula-1.39.30/src/stored/block.c  2006-12-19 22:27:27.000000000 +0100
+diff -Naur org/bacula-2.0.0/src/stored/block.c bacula-2.0.0/src/stored/block.c
+--- org/bacula-2.0.0/src/stored/block.c        2006-12-16 12:10:17.000000000 +0100
++++ bacula-2.0.0/src/stored/block.c    2007-01-09 16:10:02.000000000 +0100
 @@ -537,11 +537,8 @@
           bmicrosleep(5, 0);    /* pause a bit if busy or lots of errors */
           dev->clrerror(-1);
@@ -239,10 +239,10 @@ diff -Naur new/bacula-1.39.30/src/stored/block.c bacula-1.39.30/src/stored/block
     } while (stat == -1 && (errno == EBUSY || errno == EINTR || errno == EIO) && retry++ < 3);
     if (stat < 0) {
        berrno be;
-diff -Naur new/bacula-1.39.30/src/stored/dev.c bacula-1.39.30/src/stored/dev.c
---- new/bacula-1.39.30/src/stored/dev.c        2006-11-22 15:48:29.000000000 +0100
-+++ bacula-1.39.30/src/stored/dev.c    2006-12-19 22:27:27.000000000 +0100
-@@ -1326,7 +1326,7 @@
+diff -Naur org/bacula-2.0.0/src/stored/dev.c bacula-2.0.0/src/stored/dev.c
+--- org/bacula-2.0.0/src/stored/dev.c  2006-12-22 16:01:05.000000000 +0100
++++ bacula-2.0.0/src/stored/dev.c      2007-01-09 16:10:02.000000000 +0100
+@@ -1325,7 +1325,7 @@
        mt_com.mt_count = 1;
        while (num-- && !at_eot()) {
           Dmsg0(100, "Doing read before fsf\n");
@@ -251,7 +251,7 @@ diff -Naur new/bacula-1.39.30/src/stored/dev.c bacula-1.39.30/src/stored/dev.c
              if (errno == ENOMEM) {     /* tape record exceeds buf len */
                 stat = rbuf_len;        /* This is OK */
              /*
-@@ -2193,6 +2193,68 @@
+@@ -2192,6 +2192,68 @@
     }
  }
  
@@ -320,10 +320,10 @@ diff -Naur new/bacula-1.39.30/src/stored/dev.c bacula-1.39.30/src/stored/dev.c
  
  /* Return the resource name for the device */
  const char *DEVICE::name() const
-diff -Naur new/bacula-1.39.30/src/stored/dev.h bacula-1.39.30/src/stored/dev.h
---- new/bacula-1.39.30/src/stored/dev.h        2006-11-21 18:03:46.000000000 +0100
-+++ bacula-1.39.30/src/stored/dev.h    2006-12-19 22:27:27.000000000 +0100
-@@ -283,7 +283,17 @@
+diff -Naur org/bacula-2.0.0/src/stored/dev.h bacula-2.0.0/src/stored/dev.h
+--- org/bacula-2.0.0/src/stored/dev.h  2006-12-14 12:41:01.000000000 +0100
++++ bacula-2.0.0/src/stored/dev.h      2007-01-09 16:10:02.000000000 +0100
+@@ -280,7 +280,17 @@
     int rem_wait_sec;
     int num_wait;
  
@@ -339,9 +339,9 @@ diff -Naur new/bacula-1.39.30/src/stored/dev.h bacula-1.39.30/src/stored/dev.h
 +   int get_timer_count();           /* return the last timer interval (ms) */
 +
     int has_cap(int cap) const { return capabilities & cap; }
-    int is_autochanger() const { return capabilities & CAP_AUTOCHANGER; }
-    int requires_mount() const { return capabilities & CAP_REQMOUNT; }
-@@ -364,6 +374,8 @@
+    void clear_cap(int cap) { capabilities &= ~cap; }
+    void set_cap(int cap) { capabilities |= cap; }
+@@ -363,6 +373,8 @@
     bool truncate(DCR *dcr);      /* in dev.c */
     int open(DCR *dcr, int mode); /* in dev.c */
     void term(void);              /* in dev.c */
index d19f13c052489a524ac12b2fe3ffd9a5c7f48aff..e4c990ecc26ce38a077b87c3d28ca7aaead8d0ca 100644 (file)
@@ -1,11 +1,14 @@
---- my/src/stored/spool.c       2006-12-13 19:02:47.000000000 +0100
-+++ cvs/src/stored/spool.c      2006-12-30 10:24:31.000000000 +0100
+diff -Naur org/bacula-2.0.0/src/stored/spool.c bacula-2.0.0/src/stored/spool.c
+--- org/bacula-2.0.0/src/stored/spool.c        2006-11-27 11:03:03.000000000 +0100
++++ bacula-2.0.0/src/stored/spool.c    2007-01-09 16:15:02.000000000 +0100
 @@ -154,8 +154,8 @@
     } else {
        dir = working_directory;
     }
--   Mmsg(name, "%s/%s.data.%s.%s.spool", dir, my_name, dcr->jcr->Job,
+-   Mmsg(name, "%s/%s.data.%s.%s.spool", dir, my_name, dcr->jcr->Job, 
 -        dcr->device->hdr.name);
 +   Mmsg(name, "%s/%s.data.%u.%s.%s.spool", dir, my_name, dcr->jcr->JobId,
 +        dcr->jcr->Job, dcr->device->hdr.name);
  }
index 7dd9f8c88a686c2d55d1b1344f0eea23fa65eaf2..81166aa41379eb9c38f504f30f1b59f57ee08e9b 100644 (file)
@@ -1,50 +1,7 @@
-diff -Naur cvs/src/dird/next_vol.c my/src/dird/next_vol.c
---- cvs/src/dird/next_vol.c    2006-11-15 22:16:02.000000000 +0100
-+++ my/src/dird/next_vol.c     2006-11-15 23:47:43.000000000 +0100
-@@ -313,6 +313,7 @@
-    MEDIA_DBR smr;
-    POOL_DBR spr, pr;
-    bool ok = false;
-+   bool found = false;
-    char ed1[50], ed2[50];
-    /* Only one thread at a time can pull from the scratch pool */
-@@ -328,9 +329,20 @@
-       if (InChanger) {       
-          smr.StorageId = mr->StorageId;  /* want only Scratch Volumes in changer */
-       }
--      bstrncpy(smr.VolStatus, "Append", sizeof(smr.VolStatus));  /* want only appendable volumes */
-       bstrncpy(smr.MediaType, mr->MediaType, sizeof(smr.MediaType));
-+      
-+      /* first, try to get Append volume */
-+      bstrncpy(smr.VolStatus, "Append", sizeof(smr.VolStatus));
-       if (db_find_next_volume(jcr, jcr->db, 1, InChanger, &smr)) {
-+          found = true;
-+      /* next, we can try to find an Recycled volume */
-+      } else if (find_recycled_volume(jcr, InChanger, &smr)) {
-+          found = true;
-+      /* finaly, we take a Purged volume */
-+      } else if (recycle_oldest_purged_volume(jcr, InChanger, &smr)) {
-+          found = true;
-+      }
-+      if (found) {
-          POOL_MEM query(PM_MESSAGE);
-          /*   
-@@ -369,6 +381,9 @@
-          memcpy(mr, &smr, sizeof(MEDIA_DBR));
-          /* Set default parameters from current pool */
-          set_pool_dbr_defaults_in_media_dbr(mr, &pr);
-+         /* set_pool_dbr_defaults_in_media_dbr set VolStatus to Append,
-+          * we could have Recycled media */
-+         bstrncpy(mr->VolStatus, smr.VolStatus, sizeof(smr.VolStatus));
-          if (!db_update_media_record(jcr, jcr->db, mr)) {
-             Jmsg(jcr, M_WARNING, 0, _("Unable to update Volume record: ERR=%s"), 
-                  db_strerror(jcr->db));
-diff -Naur cvs/src/dird/protos.h my/src/dird/protos.h
---- cvs/src/dird/protos.h      2006-11-15 22:16:02.000000000 +0100
-+++ my/src/dird/protos.h       2006-11-15 23:26:50.000000000 +0100
-@@ -178,6 +178,9 @@
+diff -Naur org/bacula-2.0.0/src/dird/protos.h bacula-2.0.0/src/dird/protos.h
+--- org/bacula-2.0.0/src/dird/protos.h 2006-12-23 17:33:52.000000000 +0100
++++ bacula-2.0.0/src/dird/protos.h     2007-01-09 16:12:18.000000000 +0100
+@@ -195,6 +195,9 @@
  int get_num_drives_from_SD(UAContext *ua);
  void update_slots(UAContext *ua);
  
@@ -54,10 +11,10 @@ diff -Naur cvs/src/dird/protos.h my/src/dird/protos.h
  /* ua_output.c */
  void prtit(void *ctx, const char *msg);
  int complete_jcr_for_job(JCR *jcr, JOB *job, POOL *pool);
-diff -Naur cvs/src/dird/ua_purge.c my/src/dird/ua_purge.c
---- cvs/src/dird/ua_purge.c    2006-11-15 22:16:03.000000000 +0100
-+++ my/src/dird/ua_purge.c     2006-11-15 23:55:14.000000000 +0100
-@@ -569,6 +569,18 @@
+diff -Naur org/bacula-2.0.0/src/dird/ua_purge.c bacula-2.0.0/src/dird/ua_purge.c
+--- org/bacula-2.0.0/src/dird/ua_purge.c       2006-12-22 16:01:05.000000000 +0100
++++ bacula-2.0.0/src/dird/ua_purge.c   2007-01-09 16:12:18.000000000 +0100
+@@ -605,6 +605,18 @@
        }
        pm_strcpy(jcr->VolumeName, mr->VolumeName);
        generate_job_event(jcr, "VolumePurged");
@@ -76,10 +33,10 @@ diff -Naur cvs/src/dird/ua_purge.c my/src/dird/ua_purge.c
        /* Send message to Job report, if it is a *real* job */           
        if (jcr && jcr->JobId > 0) {
           Jmsg1(jcr, M_INFO, 0, _("All records pruned from Volume \"%s\"; marking it \"Purged\"\n"),
-diff -Naur cvs/src/dird/ua_update.c my/src/dird/ua_update.c
---- cvs/src/dird/ua_update.c   2006-11-15 23:30:10.000000000 +0100
-+++ my/src/dird/ua_update.c    2006-11-15 23:56:30.000000000 +0100
-@@ -276,7 +276,7 @@
+diff -Naur org/bacula-2.0.0/src/dird/ua_update.c bacula-2.0.0/src/dird/ua_update.c
+--- org/bacula-2.0.0/src/dird/ua_update.c      2006-12-23 17:33:52.000000000 +0100
++++ bacula-2.0.0/src/dird/ua_update.c  2007-01-09 16:12:18.000000000 +0100
+@@ -290,7 +290,7 @@
  }
  
  /* Modify the Pool in which this Volume is located */
index af2bddd4a884905938c98c2deedef2941f719737..6fff826513020cd3098ebd1ad289a45cd0ba15bc 100644 (file)
@@ -1,13 +1,16 @@
 From: Eric Bollengier <eric AT eb.homelinux.org>
 
 This patch allow you to :
- - use Purged media in Scratch (not only on Append mode)
  - move Purged media to there RecyclePool
 
 $Log$
+Revision 1.1.2.1  2007/01/12 10:23:14  kerns
+Pull in new spec files
+Update patches
+
+Revision 1.2  2007/01/09 15:18:20  ricozz
+ebl  works with 2.0.0
+
 Revision 1.1  2006/12/20 18:47:42  ricozz
 ebl  works with 1.39.30
 
-Revision 1.1  2006/12/19 21:33:06  ricozz
-ebl  ok against 1.39.30
-
index 759374edcebc59d51e6a23610a5a8b158f2dcb27..802792452218301f6f64d667b5312cdf34dac781 100644 (file)
@@ -1,13 +1,13 @@
 # Bacula RPM spec file
-# Copyright (C) 2000-2006 Free Software Foundation Europe e.V.
+# Copyright (C) 2000-2007 Free Software Foundation Europe, e.V.
 
 # Platform Build Configuration
 
 # basic defines for every build
 %define _version @VERSION@
 %define _release 1
-%define depkgs_version 25Jun06
-%define _rescuever 1.8.6
+%define depkgs_version 04Jan07
+%define _rescuever 2.0.0
 %define docs_version @VERSION@
 
 # any patches for this release
@@ -1686,6 +1686,8 @@ fi
 %endif
 
 %changelog
+* Sat Jan 06 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- 2.0.0 release
 * Sun Oct 15 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
 - 1.39.26 remove create_sqlite_database.in.patch
 * Sun Sep 24 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
index 759374edcebc59d51e6a23610a5a8b158f2dcb27..802792452218301f6f64d667b5312cdf34dac781 100644 (file)
@@ -1,13 +1,13 @@
 # Bacula RPM spec file
-# Copyright (C) 2000-2006 Free Software Foundation Europe e.V.
+# Copyright (C) 2000-2007 Free Software Foundation Europe, e.V.
 
 # Platform Build Configuration
 
 # basic defines for every build
 %define _version @VERSION@
 %define _release 1
-%define depkgs_version 25Jun06
-%define _rescuever 1.8.6
+%define depkgs_version 04Jan07
+%define _rescuever 2.0.0
 %define docs_version @VERSION@
 
 # any patches for this release
@@ -1686,6 +1686,8 @@ fi
 %endif
 
 %changelog
+* Sat Jan 06 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- 2.0.0 release
 * Sun Oct 15 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
 - 1.39.26 remove create_sqlite_database.in.patch
 * Sun Sep 24 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
index 759374edcebc59d51e6a23610a5a8b158f2dcb27..802792452218301f6f64d667b5312cdf34dac781 100644 (file)
@@ -1,13 +1,13 @@
 # Bacula RPM spec file
-# Copyright (C) 2000-2006 Free Software Foundation Europe e.V.
+# Copyright (C) 2000-2007 Free Software Foundation Europe, e.V.
 
 # Platform Build Configuration
 
 # basic defines for every build
 %define _version @VERSION@
 %define _release 1
-%define depkgs_version 25Jun06
-%define _rescuever 1.8.6
+%define depkgs_version 04Jan07
+%define _rescuever 2.0.0
 %define docs_version @VERSION@
 
 # any patches for this release
@@ -1686,6 +1686,8 @@ fi
 %endif
 
 %changelog
+* Sat Jan 06 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- 2.0.0 release
 * Sun Oct 15 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
 - 1.39.26 remove create_sqlite_database.in.patch
 * Sun Sep 24 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
index 24e0cdce1efb40cdcd40943792d71ef669d57c37..20039116336841219f0a95fc93711731fbf30f11 100644 (file)
@@ -28,6 +28,9 @@ grant all on mediatype          to ${USER};
 grant all on storage     to ${USER};
 grant all on device      to ${USER};
 grant all on status      to ${USER};
+grant all on location    to ${USER};
+grant all on locationlog  to ${USER};
+grant all on log         to ${USER};
 
 -- for sequences on those tables
 
@@ -44,7 +47,9 @@ grant select, update on basefiles_baseid_seq     to ${USER};
 grant select, update on storage_storageid_seq     to ${USER};
 grant select, update on mediatype_mediatypeid_seq  to ${USER};
 grant select, update on device_deviceid_seq       to ${USER};
-
+grant select, update on location_locationid_seq    to ${USER};
+grant select, update on locationlog_loclogid_seq   to ${USER};
+grant select, update on log_logid_seq             to ${USER};
 
 END-OF-DATA
 then
index 1361514577b358be3807b4a4a786814f70fa8e31..6ce5469c7669caf31d0d297f493d734fc3390b32 100755 (executable)
@@ -1,10 +1,10 @@
 #!/bin/sh
 #
-# Shell script to update MySQL tables from version 1.38 to 1.39  
+# Shell script to update MySQL tables from version 1.38 to 2.0 
 #
 echo " "
 echo "This script will update a Bacula MySQL database from version 9 to 10"
-echo " which is needed to convert from Bacula version 1.38.x to 1.39.x or higher"
+echo " which is needed to convert from Bacula version 1.38.x to 2.0.x or higher"
 echo "Depending on the size of your database,"
 echo "this script may take several minutes to run."
 echo " "
index a584543ee35e24539de9266e5984960058c38c03..e6149ae54d9c276649f25c9d49b91a3b12fa65bf 100755 (executable)
@@ -1,10 +1,10 @@
 #!/bin/sh
 #
-# Shell script to update PostgreSQL tables from version 1.38 to 1.39
+# Shell script to update PostgreSQL tables from version 1.38 to 2.0.0 or higher
 #
 echo " "
 echo "This script will update a Bacula PostgreSQL database from version 9 to 10"
-echo " which is needed to convert from Bacula version 1.38.x to 1.39.x or higher"
+echo " which is needed to convert from Bacula version 1.38.x to 2.0.0 or higher"
 echo "Depending on the size of your database,"
 echo "this script may take several minutes to run."
 echo " "
index efb79fb88ab7cb9cc3a39f1f64df78b3ea41dac9..7712d35a5592e634e00533eff681c17aa4187de5 100755 (executable)
@@ -1,10 +1,10 @@
 #!/bin/sh
 #
-# shell script to update SQLite from version 1.38 to 1.39
+# shell script to update SQLite from version 1.38 to 2.0
 #
 echo " "
 echo "This script will update a Bacula SQLite database from version 9 to 10"
-echo " which is needed to convert from Bacula version 1.38.x to 1.39.x or higher"
+echo " which is needed to convert from Bacula version 1.38.x to 2.0.x or higher"
 echo "Depending on the size of your database,"
 echo "this script may take several minutes to run."
 echo " "
index efb79fb88ab7cb9cc3a39f1f64df78b3ea41dac9..7712d35a5592e634e00533eff681c17aa4187de5 100755 (executable)
@@ -1,10 +1,10 @@
 #!/bin/sh
 #
-# shell script to update SQLite from version 1.38 to 1.39
+# shell script to update SQLite from version 1.38 to 2.0
 #
 echo " "
 echo "This script will update a Bacula SQLite database from version 9 to 10"
-echo " which is needed to convert from Bacula version 1.38.x to 1.39.x or higher"
+echo " which is needed to convert from Bacula version 1.38.x to 2.0.x or higher"
 echo "Depending on the size of your database,"
 echo "this script may take several minutes to run."
 echo " "