]> git.sur5r.net Git - bacula/bacula/blob - bacula/patches/1.38.x/1.38.1-to-1.38.2.patch
Update spec file copyrights
[bacula/bacula] / bacula / patches / 1.38.x / 1.38.1-to-1.38.2.patch
1
2  This patch fixes the following bugs:
3
4 - Fix crash in tray-monitor when daemon disconnects. Bug #479.
5 - Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
6   says that this patch does not fix his problem)
7 - Fix cancel failure bug. Bug #481
8 - Fix failure when Pool name has spaces. Bug #487
9 - Fix SD crash in autochanger code. Mutex failure. Bug #488
10 - Fix a couple of free()s in src/filed/acl.c
11 - Fix memory overrun in bfile.c in building OS X resource
12   fork filename. Bug #489
13 - Add Pool name to SD status output.
14 - Add Python install dir for Solaris to configure. Bug #492
15
16 This patch is applied to Bacula source version 1.38.1 and will
17 produce Bacula source version 1.38.2.  Apply it with:
18
19    cd <bacula-1.38.1-source>
20    ./configure (your options) if not already done
21    patch -p0 <1.38.1-to-1.38.2.patch
22    make
23    make install
24
25 Index: ChangeLog
26 ===================================================================
27 RCS file: /cvsroot/bacula/bacula/ChangeLog,v
28 retrieving revision 1.154.2.7
29 retrieving revision 1.154.2.8
30 diff -u -r1.154.2.7 -r1.154.2.8
31 --- ChangeLog   15 Nov 2005 09:27:19 -0000      1.154.2.7
32 +++ ChangeLog   22 Nov 2005 10:50:54 -0000      1.154.2.8
33 @@ -1,4 +1,15 @@
34  
35 +Changes to 1.38.2:
36 +- Fix crash in tray-monitor when daemon disconnects. Bug #479.
37 +- Fix bnet-server bug found on OpenBSD. Bug #486
38 +- Fix cancel failure bug. Bug #481
39 +- Fix failure when Pool name has spaces. Bug #487   
40 +- Fix SD crash in autochanger code. Mutex failure. Bug #488
41 +- Fix a couple of free()s in src/filed/acl.c
42 +- Fix memory overrun in bfile.c in building OS X resource
43 +  fork filename. Bug #489 
44 +- Add Pool name to SD status output.
45 +- Add Python install dir for Solaris to configure. Bug #492
46  
47  Changes to 1.38.1:
48  - Apply SunOS patch for ACLs submitted by David Duchscher.                  
49 Index: ReleaseNotes
50 ===================================================================
51 RCS file: /cvsroot/bacula/bacula/ReleaseNotes,v
52 retrieving revision 1.147.2.9
53 retrieving revision 1.147.2.10
54 diff -u -r1.147.2.9 -r1.147.2.10
55 --- ReleaseNotes        15 Nov 2005 09:27:19 -0000      1.147.2.9
56 +++ ReleaseNotes        22 Nov 2005 10:50:54 -0000      1.147.2.10
57 @@ -1,10 +1,22 @@
58  
59 -          Release Notes for Bacula 1.38.1
60 +          Release Notes for Bacula 1.38.2
61  
62    Bacula code: Total files = 420 Total lines = 138,440 (*.h *.c *.in)
63        20,440 additional lines of code since version 1.36.3
64  
65 -Changes since 1.38.0:
66 +Changes to 1.38.2:
67 +- Fix crash in tray-monitor when daemon disconnects. Bug #479.
68 +- Fix bnet-server bug found on OpenBSD. Bug #486
69 +- Fix cancel failure bug. Bug #481
70 +- Fix failure when Pool name has spaces. Bug #487   
71 +- Fix SD crash in autochanger code. Mutex failure. Bug #488
72 +- Fix a couple of free()s in src/filed/acl.c
73 +- Fix memory overrun in bfile.c in building OS X resource
74 +  fork filename. Bug #489 
75 +- Add Pool name to SD status output.
76 +- Add Python install dir for Solaris to configure. Bug #492
77 +
78 +Changes to 1.38.1:
79  - Corrected ACL for Solaris (David Duchscher and Attila Fulop).
80  - Add bacula_mail_summary.sh to examples directory. It makes
81    a single email summary of any number of jobs. Submitted
82 Index: configure
83 ===================================================================
84 RCS file: /cvsroot/bacula/bacula/configure,v
85 retrieving revision 1.203.2.5
86 retrieving revision 1.203.2.6
87 diff -u -r1.203.2.5 -r1.203.2.6
88 --- configure   13 Nov 2005 10:51:17 -0000      1.203.2.5
89 +++ configure   22 Nov 2005 10:50:54 -0000      1.203.2.6
90 @@ -14948,7 +14948,7 @@
91    PYTHON_LIBS=
92    if test "$withval" != "no"; then
93       if test "$withval" = "yes"; then
94 -       for python_root in /usr /usr/local; do
95 +       for python_root in /usr /usr/local /usr/sfw; do
96           if test -f $python_root/include/python2.2/Python.h; then
97              PYTHON_INCDIR=-I$python_root/include/python2.2
98              PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
99 Index: kernstodo
100 ===================================================================
101 RCS file: /cvsroot/bacula/bacula/kernstodo,v
102 retrieving revision 1.570.2.6
103 retrieving revision 1.570.2.7
104 diff -u -r1.570.2.6 -r1.570.2.7
105 --- kernstodo   4 Nov 2005 09:16:49 -0000       1.570.2.6
106 +++ kernstodo   22 Nov 2005 10:50:55 -0000      1.570.2.7
107 @@ -1,5 +1,5 @@
108                      Kern's ToDo List
109 -                     03 November 2005
110 +                     21 November 2005
111  
112  Major development:      
113  Project                     Developer
114 @@ -7,8 +7,6 @@
115  Version 1.37                Kern (see below)
116  ========================================================
117  
118 -Final items for 1.37 before release:
119 -
120  Document:
121  - Does ClientRunAfterJob fail the job on a bad return code?
122  - Document cleaning up the spool files:
123 @@ -18,6 +16,8 @@
124  - Does WildFile match against full name?  Doc.
125  
126  For 1.39:
127 +- Make sure that all do_prompt() calls in Dir check for
128 +  -1 (error) and -2 (cancel) returns.
129  - Look at -D_FORTIFY_SOURCE=2
130  - Add Win32 FileSet definition somewhere
131  - Look at fixing restore status stats in SD.
132 @@ -27,6 +27,12 @@
133    encountered, read many times (as it currently does), and if the
134    block cannot be read, skip to the next block, and try again.  If
135    that fails, skip to the next file and try again, ...
136 +- Add level table:
137 +  create table LevelType (LevelType binary(1), LevelTypeLong tinyblob);
138 +  insert into LevelType (LevelType,LevelTypeLong) values
139 +  ("F","Full"),
140 +  ("D","Diff"),
141 +  ("I","Inc");
142  - Add ACL to restore only to original location.
143  - Add a recursive mark command (rmark) to restore.
144  - "Minimum Job Interval = nnn" sets minimum interval between Jobs
145 @@ -1246,219 +1252,4 @@
146  ====
147  
148  
149 -=== Done
150 -- Save mount point for directories not traversed with onefs=yes.
151 -- Add seconds to start and end times in the Job report output.
152 -- if 2 concurrent backups are attempted on the same tape
153 -  drive (autoloader) into different tape pools, one of them will exit
154 -  fatally instead of halting until the drive is idle
155 -- Update StartTime if job held in Job Queue.
156 -- Look at www.nu2.nu/pebuilder as a helper for full windows
157 -  bare metal restore. (done by Scott)
158 -- Fix orphanned buffers:
159 -   Orphaned buffer:      24 bytes allocated at line 808 of rufus-dir job.c
160 -   Orphaned buffer:      40 bytes allocated at line 45 of rufus-dir alist.c
161 -- Implement Preben's suggestion to add
162 -  File System Types = ext2, ext3 
163 -  to FileSets, thus simplifying backup of *all* local partitions.
164 -- Try to open a device on each Job if it was not opened
165 -  when the SD started.
166 -- Add dump of VolSessionId/Time and FileIndex with bls.
167 -- If Bacula does not find the right tape in the Autochanger,
168 -  then mark the tape in error and move on rather than asking
169 -  for operator intervention.
170 -- Cancel command should include JobId in list of Jobs.
171 -- Add performance testing hooks
172 -- Bootstrap from JobMedia records.
173 -- Implement WildFile and WildDir to solve problem of 
174 -  saving only *.doc files.
175 -- Fix
176 -   Please use the "label"  command to create a new Volume for:
177 -       Storage:      DDS-4-changer
178 -       Media type:   
179 -       Pool:         Default
180 -   label
181 -   The defined Storage resources are:
182 -- Copy Changer Device and Changer Command from Autochanger
183 -  to Device resource in SD if none given in Device resource.
184 -- 1. Automatic use of more than one drive in an autochanger (done)
185 -- 2. Automatic selection of the correct drive for each Job (i.e.
186 -     selects a drive with an appropriate Volume for the Job) (done)
187 -- 6. Allow multiple simultaneous Jobs referencing the same pool write
188 -    to several tapes (some new directive(s) are are probably needed for
189 -    this) (done)
190 -- Locking (done)
191 -- Key on Storage rather than Pool (done)
192 -- Allow multiple drives to use same Pool (change jobq.c DIR) (done).
193 -- Synchronize multiple drives so that not more
194 -  than one loads a tape and any time (done)
195 -- 4. Use Changer Device and Changer Command specified in the
196 -     Autochanger resource, if none is found in the Device resource.
197 -    You can continue to specify them in the Device resource if you want
198 -    or need them to be different for each device.
199 -- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") 
200 -    that can allow a Device be part of an Autochanger, and hence the changer
201 -    script protected, but if set to no, will prevent the Device from being 
202 -    automatically selected from the changer. This allows the device to
203 -    be directly accessed through its Device name, but not through the
204 -    AutoChanger name.
205 -#6   Select one from among Multiple Storage Devices for Job
206 -#5   Events that call a Python program 
207 -     (Implemented in Dir/SD)
208 -- Make sure the Device name is in the Query packet returned.
209 -- Don't start a second file job if one is already running.
210 -- Implement EOF/EOV labels for ANSI labels
211 -- Implement IBM labels.
212 -- When Python creates a new label, the tape is immediately
213 -  recycled and no label created. This happens when using   
214 -  autolabeling -- even when Python doesn't generate the name.
215 -- Scratch Pool where the volumes can be re-assigned to any Pool.
216 -- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) 
217 -  is busy reading. Job 6 canceled.
218 -- Remove separate thread for opening devices in SD.  On the other
219 -  hand, don't block waiting for open() for devices.
220 -- Fix code to either handle updating NumVol or to calculate it in
221 -  Dir next_vol.c
222 -- Ensure that you cannot exclude a directory or a file explicitly
223 -  Included with File.
224 -#4   Embedded Python Scripting 
225 -     (Implemented in Dir/SD/FD)
226 -- Add Python writable variable for changing the Priority,
227 -    Client, Storage, JobStatus (error), ...
228 -- SD Python
229 -  - Solicit Events
230 -- Add disk seeking on restore; turn off seek on tapes.
231 -  stored/match_bsr.c
232 -- Look at dird_conf.c:1000: warning: `int size' 
233 -  might be used uninitialized in this function
234 -- Indicate when a Job is purged/pruned during restore.
235 -- Implement some way to turn off automatic pruning in Jobs.
236 -- Implement a way an Admin Job can prune, possibly multiple
237 -  clients -- Python script?
238 -- Look at Preben's acl.c error handling code.
239 -- SD crashes after a tape restore then doing a backup. 
240 -- If drive is opened read/write, close it and re-open
241 -  read-only if doing a restore, and vice-versa.
242 -- Windows restore:
243 -  data-fd: RestoreFiles.2004-12-07_15.56.42 Error:
244 -  > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der
245 -  > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen
246 -  > Prozess verwendet wird.
247 -  Restore restores all files, but then fails at the end trying
248 -  to set the attributes of e:
249 -  from failed jobs.- Resolve the problem between Device name and Archive name,
250 -  and fix SD messages.
251 -- Tell the "restore" user when browsing is no longer possible.
252 -- Add a restore directory-x
253 -- Write non-optimized bsrs from the JobMedia and Media records,
254 -  even after Files are pruned.
255 -- Delete Stripe and Copy from VolParams to save space.
256 -- Fix option 2 of restore -- list where file is backed up -- require Client,
257 -  then list last 20 backups.
258 -- Finish implementation of passing all Storage and Device needs to
259 -  the SD.
260 -- Move test for max wait time exceeded in job.c up -- Peter's idea.
261 -##   Consider moving docs to their own project.
262 -##   Move rescue to its own project.
263 -- Add client version to the Client name line that prints in
264 -  the Job report.
265 -- Fix the Rescue CDROM.
266 -- By the way: on page http://www.bacula.org/?page=tapedrives , at the 
267 -  bottom, the link to "Tape Testing Chapter" is broken. It goes to 
268 -  /html-manual/... while the others point to /rel-manual/...
269 -- Device resource needs the "name" of the SD.
270 -- Specify a single directory to restore.
271 -- Implement MediaType keyword in bsr?   
272 -- Add a date and time stamp at the beginning of every line in the 
273 -  Job report (Volker Sauer).
274 -- Add level to estimate command.
275 -- Add "limit=n" for "list jobs"
276 -- Make bootstrap filename unique.
277 -- Make Dmsg look at global before calling subroutine.
278 -- From Chris Hull:
279 -   it seems to be complaining about 12:00pm which should be a valid 12
280 -   hour time.  I changed the time to 11:59am and everything works fine.
281 -   Also 12:00am works fine.  0:00pm also works (which I don't think
282 -   should).  None of the values 12:00pm - 12:59pm work for that matter.
283 -- Require restore via the restore command or make a restore Job
284 -  get the bootstrap file.
285 -- Implement Maximum Job Spool Size
286 -- Fix 3993 error in SD. It forgets to look at autochanger
287 -  resource for device command, ...
288 -- 3. Prevent two drives requesting the same Volume in any given
289 -     autochanger, by checking if a Volume is mounted on another drive
290 -     in an Autochanger.
291 -- Upgrade to MySQL 4.1.12 See:  
292 -  http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html
293 -- Add # Job Level date to bsr file
294 -- Implement "PreferMountedVolumes = yes|no" in Job resource.
295 -##   Integrate web-bacula into a new Bacula project with
296 -     bimagemgr.
297 -- Cleaning tapes should have Status "Cleaning" rather than append.
298 -- Make sure that Python has access to Client address/port so that
299 -  it can check if Clients are alive.
300 -- Review all items in "restore".
301 -- Fix PostgreSQL GROUP BY problems in restore.
302 -- Fix PostgreSQL sql problems in bugs.
303 -- After rename
304 -  04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume 
305 -     "DLT-13Feb04".
306 -  Current Volume "DLT-04Jul05" not acceptable because:
307 -  1997 Volume "DLT-13Feb04" not in catalog.
308 -  04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device 
309 -     "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02
310 -##   Create a new GUI chapter explaining all the GUI programs.
311 --    Make "update slots" when pointing to Autochanger, remove
312 -     all Volumes from other drives.  "update slots all-drives"?
313 -     No, this is done by modifying mtx-changer to list what is
314 -     in the drives.
315 -- Finish TLS implementation.
316 -- Port limiting -m in iptables to prevent DoS attacks
317 -  could cause broken pipes on Bacula.
318 -6. Build and test the Volume Shadow Copy (VSS) for Win32. 
319 --  Allow cancel of unknown Job
320 --  State not saved when closing Win32 FD by icon
321 --  bsr-opt-test fails. bsr deleted. Fix.
322 --  Move Python daemon variables from Job to Bacula object.
323 -   WorkingDir, ConfigFile
324 -- Document that Bootstrap files can be written with cataloging
325 -  turned off.
326 -- Document details of ANSI/IBM labels
327 -- OS linux 2.4
328 -  1) ADIC, DLT, FastStor 4000, 7*20GB
329 -- Linux Sony LIB-D81, AIT-3 library works.
330 -- Doc the following
331 -  to activate, check or disable the hardware compression feature on my 
332 -  exb-8900 i use the exabyte "MammothTool" you can get it here:
333 -  http://www.exabyte.com/support/online/downloads/index.cfm
334 -  There is a solaris version of this tool. With option -C 0 or 1 you can 
335 -  disable or activate compression. Start this tool without any options for 
336 -  a small reference.
337 -- Document Heartbeat Interval in the dealing with firewalls section.
338 -- Document new CDROM directory.
339 -- On Win32 working directory must have drive letter ????
340 -- On Win32 working directory must be writable by SYSTEM to
341 -  do restores.
342 -- Document that ChangerDevice is used for Alert command.
343 -- Add better documentation on how restores can be done
344 -8. Take one more try at making DVD writing work (no go)
345 -7. Write a bacula-web document
346 -- Why isn't the DEVICE structure defined when doing
347 -  a reservation?
348 -- Multi-drive changer seems to only use drive 0
349 -  Multiple drives don't seem to be opened.
350 -- My database is growing
351 -- Call GetLastError() in the berrno constructor rather
352 -  than delaying until strerror.
353 -- Tape xxx in drive 0, requested in drive 1
354 -- The mount command does not work with drives other than 0.
355 -- A mount should cause the SD to re-examine what Slot is   
356 -  loaded.
357 -- The SD locks on to the first available drive then
358 -  wants a Volume that is released but in another drive --
359 -  chaos.
360 -- Run the regression scripts on Solaris and FreeBSD
361 --  Figure out how to package gui, and rescue programs.
362 -- Add a .dir command to restore tree code to eliminate the problem
363 -- Mount after manually unloading changer causes hang in SD
364 -- Fix JobACL with restore by JobId.
365 +=== Done -- see kernsdone
366 Index: kes-1.38
367 ===================================================================
368 RCS file: /cvsroot/bacula/bacula/kes-1.38,v
369 retrieving revision 1.1.2.13
370 retrieving revision 1.1.2.14
371 diff -u -r1.1.2.13 -r1.1.2.14
372 --- kes-1.38    14 Nov 2005 20:20:38 -0000      1.1.2.13
373 +++ kes-1.38    22 Nov 2005 10:50:55 -0000      1.1.2.14
374 @@ -3,6 +3,20 @@
375  
376  General:
377  
378 +Changes to 1.38.2:
379 +20Oct05
380 +- Fix crash in tray-monitor when daemon disconnects. Bug #479.
381 +- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
382 +  says this does not fix *his* bug).
383 +- Fix cancel failure bug. Bug #481
384 +- Fix failure when Pool name has spaces. Bug #487   
385 +- Fix SD crash in autochanger code. Mutex failure. Bug #488
386 +- Fix a couple of free()s in src/filed/acl.c
387 +- Fix memory overrun in bfile.c in building OS X resource
388 +  fork filename. Bug #489 
389 +- Add Pool name to SD status output.
390 +- Add Python install dir for Solaris to configure. Bug #492
391 +
392  Changes to 1.38.1:
393  14Oct05
394  - Apply SunOS patch for ACLs submitted by David Duchscher.                  
395 Index: projects
396 ===================================================================
397 RCS file: /cvsroot/bacula/bacula/projects,v
398 retrieving revision 1.12.2.3
399 retrieving revision 1.12.2.4
400 diff -u -r1.12.2.3 -r1.12.2.4
401 --- projects    10 Nov 2005 20:25:27 -0000      1.12.2.3
402 +++ projects    22 Nov 2005 10:50:55 -0000      1.12.2.4
403 @@ -228,7 +228,175 @@
404  
405    Why:    Performance enhancement.
406  
407 +Item 13:  Let Bacula log tape usage and handle drive cleaning cycles.
408 +  Date:   November 11, 2005
409 +  Origin: Arno Lehmann <al at its-lehmann dot de>
410 +  Status:
411 +
412 +  What:   Make Bacula manage tape life cycle information and drive 
413 +          cleaning cycles.
414 +
415 +  Why:    Both parts of this project are important when operating backups.
416 +          We need to know which tapes need replacement, and we need to
417 +          make sure the drives are cleaned when necessary.  While many
418 +          tape libraries and even autoloaders can handle all this
419 +          automatically, support by Bacula can be helpful for smaller
420 +          (older) libraries and single drives.  Also, checking drive
421 +          status during operation can prevent some failures (as I had to
422 +          learn the hard way...)
423 +
424 +  Notes:  First, Bacula could (and even does, to some limited extent)
425 +          record tape and drive usage.  For tapes, the number of mounts,
426 +          the amount of data, and the time the tape has actually been
427 +          running could be recorded.  Data fields for Read and Write time
428 +          and Nmber of mounts already exist in the catalog (I'm not sure
429 +          if VolBytes is the sum of all bytes ever written to that volume
430 +          by Bacula).  This information can be important when determining
431 +          which media to replace.  For the tape drives known to Bacula,
432 +          similar information is interesting to determine the device
433 +          status and expected life time: Time it's been Reading and
434 +          Writing, number of tape Loads / Unloads / Errors.  This
435 +          information is not yet recorded as far as I know.
436 +
437 +          The next step would be implementing drive cleaning setup.
438 +          Bacula already has knowledge about cleaning tapes.  Once it has
439 +          some information about cleaning cycles (measured in drive run
440 +          time, number of tapes used, or calender days, for example) it
441 +          can automatically execute tape cleaning (with an autochanger,
442 +          obviously) or ask for operator assistence loading a cleaning
443 +          tape.
444 +
445 +          The next step would be to implement TAPEALERT checks not only
446 +          when changing tapes and only sending he information to the
447 +          administrator, but rather checking after each tape error,
448 +          checking on a regular basis (for example after each tape file),
449 +          and also before unloading and after loading a new tape.  Then,
450 +          depending on the drives TAPEALERT state and the know drive
451 +          cleaning state Bacula could automatically schedule later
452 +          cleaning, clean immediately, or inform the operator.
453 +
454 +          Implementing this would perhaps require another catalog change
455 +          and perhaps major changes in SD code and the DIR-SD protocoll,
456 +          so I'd only consider this worth implementing if it would
457 +          actually be used or even needed by many people. 
458 +
459 +Item 14:  Merging of multiple backups into a single one. (Also called Synthetic
460 +          Backup or Consolidation).
461 +
462 +  Origin: Marc Cousin and Eric Bollengier 
463 +  Date:   15 November 2005
464 +  Status: Depends on first implementing project Item 1 (Migration).
465 +
466 +  What:   A merged backup is a backup made without connecting to the Client.
467 +          It would be a Merge of existing backups into a single backup.
468 +          In effect, it is like a restore but to the backup medium.
469 +
470 +          For instance, say that last sunday we made a full backup.  Then
471 +          all week long, we created incremental backups, in order to do
472 +          them fast.  Now comes sunday again, and we need another full.
473 +          The merged backup makes it possible to do instead an incremental
474 +          backup (during the night for instance), and then create a merged
475 +          backup during the day, by using the full and incrementals from
476 +          the week.  The merged backup will be exactly like a full made
477 +          sunday night on the tape, but the production interruption on the
478 +          Client will be minimal, as the Client will only have to send
479 +          incrementals.
480 +
481 +          In fact, if it's done correctly, you could merge all the
482 +          Incrementals into single Incremental, or all the Incrementals
483 +          and the last Differential into a new Differential, or the Full,
484 +          last differential and all the Incrementals into a new Full
485 +          backup.  And there is no need to involve the Client.
486 +
487 +  Why:    The benefit is that :
488 +          - the Client just does an incremental ;
489 +          - the merged backup on tape is just as a single full backup,
490 +            and can be restored very fast.
491 +
492 +          This is also a way of reducing the backup data since the old
493 +          data can then be pruned (or not) from the catalog, possibly
494 +          allowing older volumes to be recycled
495 +
496 +Item 15:  Automatic disabling of devices
497 +   Date:   2005-11-11
498 +   Origin: Peter Eriksson <peter at ifm.liu dot se>
499 +   Status:
500 +
501 +   What:  After a configurable amount of fatal errors with a tape drive
502 +          Bacula should automatically disable further use of a certain
503 +          tape drive. There should also be "disable"/"enable" commands in
504 +          the "bconsole" tool.
505 +
506 +   Why:   On a multi-drive jukebox there is a possibility of tape drives
507 +          going bad during large backups (needing a cleaning tape run,
508 +          tapes getting stuck). It would be advantageous if Bacula would
509 +          automatically disable further use of a problematic tape drive
510 +          after a configurable amount of errors has occured.
511 +
512 +          An example: I have a multi-drive jukebox (6 drives, 380+ slots)
513 +          where tapes occasionally get stuck inside the drive. Bacula will
514 +          notice that the "mtx-changer" command will fail and then fail
515 +          any backup jobs trying to use that drive. However, it will still
516 +          keep on trying to run new jobs using that drive and fail -
517 +          forever, and thus failing lots and lots of jobs... Since we have
518 +          many drives Bacula could have just automatically disabled
519 +          further use of that drive and used one of the other ones
520 +          instead.
521 +
522 +
523 +Item 16:  Directive/mode to backup only file changes, not entire file
524 +  Date:   11 November 2005
525 +  Origin: Joshua Kugler <joshua dot kugler at uaf dot edu>
526 +          Marek Bajon <mbajon at bimsplus dot com dot pl>
527 +  Status: RFC
528 +
529 +  What:   Currently when a file changes, the entire file will be backed up in
530 +          the next incremental or full backup.  To save space on the tapes
531 +          it would be nice to have a mode whereby only the changes to the
532 +          file would be backed up when it is changed.
533 +
534 +  Why:    This would save lots of space when backing up large files such as 
535 +          logs, mbox files, Outlook PST files and the like.
536 +
537 +  Notes:  This would require the usage of disk-based volumes as comparing 
538 +          files would not be feasible using a tape drive.
539 +
540 +Item 17:  Quick release of FD-SD connection
541 +  Origin: Frank Volf (frank at deze dot org)
542 +  Date:   17 november 2005
543 +  Status:
544 +
545 +   What:  In the bacula implementation a backup is finished after all data
546 +          and attributes are succesfully written to storage.  When using a
547 +          tape backup it is very annoying that a backup can take a day,
548 +          simply because the current tape (or whatever) is full and the
549 +          administrator has not put a new one in.  During that time the
550 +          system cannot be taken off-line, because there is still an open
551 +          session between the storage daemon and the file daemon on the
552 +          client.
553 +
554 +          Although this is a very good strategey for making "safe backups"
555 +          This can be annoying for e.g.  laptops, that must remain
556 +          connected until the bacukp is completed.
557 +
558 +          Using a new feature called "migration" it will be possible to
559 +          spool first to harddisk (using a special 'spool' migration
560 +          scheme) and then migrate the backup to tape.
561 +
562 +          There is still the problem of getting the attributes committed.
563 +          If it takes a very long time to do, with the current code, the
564 +          job has not terminated, and the File daemon is not freed up.  The
565 +          Storage daemon should release the File daemon as soon as all the
566 +          file data and all the attributes have been sent to it (the SD).
567 +          Currently the SD waits until everything is on tape and all the
568 +          attributes are transmitted to the Director before signalling
569 +          completion to the FD. I don't think I would have any problem
570 +          changing this.  The reason is that even if the FD reports back to
571 +          the Dir that all is OK, the job will not terminate until the SD
572 +          has done the same thing -- so in a way keeping the SD-FD link
573 +          open to the very end is not really very productive ...
574  
575 +   Why:   Makes backup of laptops much easier.
576  
577  
578  ============= Empty RFC form ===========
579 @@ -245,33 +413,4 @@
580  ============== End RFC form ==============
581  
582  
583 -Items completed for release 1.38.0:
584 -#4   Embedded Python Scripting (implemented in all Daemons)
585 -#5   Events that call a Python program (Implemented in all
586 -       daemons, but more cleanup work to be done).
587 -#6   Select one from among Multiple Storage Devices for Job.
588 -       This is already implemented in 1.37.
589 -#7   Single Job Writing to Multiple Storage Devices. This is
590 -       currently implemented with a Clone feature.
591 -#-   Full multiple drive Autochanger support (done in 1.37)
592 -#-   Built in support for communications encryption (TLS) 
593 -       done by Landon Fuller.
594 -#    Support for Unicode characters
595 -       (via UTF-8) on Win32 machines thanks to Thorsten Engel.
596 -Item  8:  Break the one-to-one Relationship between a Job and a
597 -          Specific Storage Device (or Devices if #10 is implemented).
598 -
599 -Completed items from last year's list:
600 -Item 1:   Multiple simultaneous Jobs. (done)
601 -Item 3:   Write the bscan program -- also write a bcopy program (done).
602 -Item 5:   Implement Label templates (done).
603 -Item 6:   Write a regression script (done)
604 -Item 9:   Add SSL to daemon communications (done by Landon Fuller)
605 -Item 10:  Define definitive tape format (done)
606 -Item 3:   GUI for interactive restore. Partially Implemented in 1.34
607 -          Note, there is now a complete Webmin plugin, a partial
608 -          GNOME console, and an excellent wx-console GUI.
609 -Item 4:   GUI for interactive backup
610 -Item 2:   Job Data Spooling.
611 -    Done: Regular expression matching.
612 -Item 10:  New daemon communication protocol (this has been dropped).
613 +Items completed for release 1.38.0 -- see kernsdone
614 Index: autoconf/configure.in
615 ===================================================================
616 RCS file: /cvsroot/bacula/bacula/autoconf/configure.in,v
617 retrieving revision 1.184.2.4
618 retrieving revision 1.184.2.5
619 diff -u -r1.184.2.4 -r1.184.2.5
620 --- autoconf/configure.in       13 Nov 2005 10:51:17 -0000      1.184.2.4
621 +++ autoconf/configure.in       22 Nov 2005 10:50:55 -0000      1.184.2.5
622 @@ -604,7 +604,7 @@
623    PYTHON_LIBS=
624    if test "$withval" != "no"; then
625       if test "$withval" = "yes"; then
626 -       for python_root in /usr /usr/local; do
627 +       for python_root in /usr /usr/local /usr/sfw; do
628           if test -f $python_root/include/python2.2/Python.h; then
629              PYTHON_INCDIR=-I$python_root/include/python2.2
630              PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
631 Index: patches/1.38.1-to-1.38.2.patch
632 ===================================================================
633 RCS file: patches/1.38.1-to-1.38.2.patch
634 diff -N patches/1.38.1-to-1.38.2.patch
635 --- /dev/null   1 Jan 1970 00:00:00 -0000
636 +++ patches/1.38.1-to-1.38.2.patch      22 Nov 2005 10:52:49 -0000      1.1.2.3
637 @@ -0,0 +1,6901 @@
638 +
639 + This patch fixes the following bugs:
640 +
641 +- Fix crash in tray-monitor when daemon disconnects. Bug #479.
642 +- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
643 +  says that this patch does not fix his problem)
644 +- Fix cancel failure bug. Bug #481
645 +- Fix failure when Pool name has spaces. Bug #487
646 +- Fix SD crash in autochanger code. Mutex failure. Bug #488
647 +- Fix a couple of free()s in src/filed/acl.c
648 +- Fix memory overrun in bfile.c in building OS X resource
649 +  fork filename. Bug #489
650 +- Add Pool name to SD status output.
651 +- Add Python install dir for Solaris to configure. Bug #492
652 +
653 +This patch is applied to Bacula source version 1.38.1 and will
654 +produce Bacula source version 1.38.2.  Apply it with:
655 +
656 +   cd <bacula-1.38.1-source>
657 +   ./configure (your options) if not already done
658 +   patch -p0 <1.38.1-to-1.38.2.patch
659 +   make
660 +   make install
661 +
662 +Index: ChangeLog
663 +===================================================================
664 +RCS file: /cvsroot/bacula/bacula/ChangeLog,v
665 +retrieving revision 1.154.2.7
666 +retrieving revision 1.154.2.8
667 +diff -u -r1.154.2.7 -r1.154.2.8
668 +--- ChangeLog  15 Nov 2005 09:27:19 -0000      1.154.2.7
669 ++++ ChangeLog  22 Nov 2005 10:50:54 -0000      1.154.2.8
670 +@@ -1,4 +1,15 @@
671
672 ++Changes to 1.38.2:
673 ++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
674 ++- Fix bnet-server bug found on OpenBSD. Bug #486
675 ++- Fix cancel failure bug. Bug #481
676 ++- Fix failure when Pool name has spaces. Bug #487   
677 ++- Fix SD crash in autochanger code. Mutex failure. Bug #488
678 ++- Fix a couple of free()s in src/filed/acl.c
679 ++- Fix memory overrun in bfile.c in building OS X resource
680 ++  fork filename. Bug #489 
681 ++- Add Pool name to SD status output.
682 ++- Add Python install dir for Solaris to configure. Bug #492
683
684 + Changes to 1.38.1:
685 + - Apply SunOS patch for ACLs submitted by David Duchscher.                  
686 +Index: ReleaseNotes
687 +===================================================================
688 +RCS file: /cvsroot/bacula/bacula/ReleaseNotes,v
689 +retrieving revision 1.147.2.9
690 +retrieving revision 1.147.2.10
691 +diff -u -r1.147.2.9 -r1.147.2.10
692 +--- ReleaseNotes       15 Nov 2005 09:27:19 -0000      1.147.2.9
693 ++++ ReleaseNotes       22 Nov 2005 10:50:54 -0000      1.147.2.10
694 +@@ -1,10 +1,22 @@
695
696 +-          Release Notes for Bacula 1.38.1
697 ++          Release Notes for Bacula 1.38.2
698
699 +   Bacula code: Total files = 420 Total lines = 138,440 (*.h *.c *.in)
700 +       20,440 additional lines of code since version 1.36.3
701
702 +-Changes since 1.38.0:
703 ++Changes to 1.38.2:
704 ++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
705 ++- Fix bnet-server bug found on OpenBSD. Bug #486
706 ++- Fix cancel failure bug. Bug #481
707 ++- Fix failure when Pool name has spaces. Bug #487   
708 ++- Fix SD crash in autochanger code. Mutex failure. Bug #488
709 ++- Fix a couple of free()s in src/filed/acl.c
710 ++- Fix memory overrun in bfile.c in building OS X resource
711 ++  fork filename. Bug #489 
712 ++- Add Pool name to SD status output.
713 ++- Add Python install dir for Solaris to configure. Bug #492
714 ++
715 ++Changes to 1.38.1:
716 + - Corrected ACL for Solaris (David Duchscher and Attila Fulop).
717 + - Add bacula_mail_summary.sh to examples directory. It makes
718 +   a single email summary of any number of jobs. Submitted
719 +Index: configure
720 +===================================================================
721 +RCS file: /cvsroot/bacula/bacula/configure,v
722 +retrieving revision 1.203.2.5
723 +retrieving revision 1.203.2.6
724 +diff -u -r1.203.2.5 -r1.203.2.6
725 +--- configure  13 Nov 2005 10:51:17 -0000      1.203.2.5
726 ++++ configure  22 Nov 2005 10:50:54 -0000      1.203.2.6
727 +@@ -14948,7 +14948,7 @@
728 +   PYTHON_LIBS=
729 +   if test "$withval" != "no"; then
730 +      if test "$withval" = "yes"; then
731 +-      for python_root in /usr /usr/local; do
732 ++      for python_root in /usr /usr/local /usr/sfw; do
733 +         if test -f $python_root/include/python2.2/Python.h; then
734 +            PYTHON_INCDIR=-I$python_root/include/python2.2
735 +            PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
736 +Index: kernstodo
737 +===================================================================
738 +RCS file: /cvsroot/bacula/bacula/kernstodo,v
739 +retrieving revision 1.570.2.6
740 +retrieving revision 1.570.2.7
741 +diff -u -r1.570.2.6 -r1.570.2.7
742 +--- kernstodo  4 Nov 2005 09:16:49 -0000       1.570.2.6
743 ++++ kernstodo  22 Nov 2005 10:50:55 -0000      1.570.2.7
744 +@@ -1,5 +1,5 @@
745 +                     Kern's ToDo List
746 +-                     03 November 2005
747 ++                     21 November 2005
748
749 + Major development:      
750 + Project                     Developer
751 +@@ -7,8 +7,6 @@
752 + Version 1.37                Kern (see below)
753 + ========================================================
754
755 +-Final items for 1.37 before release:
756 +-
757 + Document:
758 + - Does ClientRunAfterJob fail the job on a bad return code?
759 + - Document cleaning up the spool files:
760 +@@ -18,6 +16,8 @@
761 + - Does WildFile match against full name?  Doc.
762
763 + For 1.39:
764 ++- Make sure that all do_prompt() calls in Dir check for
765 ++  -1 (error) and -2 (cancel) returns.
766 + - Look at -D_FORTIFY_SOURCE=2
767 + - Add Win32 FileSet definition somewhere
768 + - Look at fixing restore status stats in SD.
769 +@@ -27,6 +27,12 @@
770 +   encountered, read many times (as it currently does), and if the
771 +   block cannot be read, skip to the next block, and try again.  If
772 +   that fails, skip to the next file and try again, ...
773 ++- Add level table:
774 ++  create table LevelType (LevelType binary(1), LevelTypeLong tinyblob);
775 ++  insert into LevelType (LevelType,LevelTypeLong) values
776 ++  ("F","Full"),
777 ++  ("D","Diff"),
778 ++  ("I","Inc");
779 + - Add ACL to restore only to original location.
780 + - Add a recursive mark command (rmark) to restore.
781 + - "Minimum Job Interval = nnn" sets minimum interval between Jobs
782 +@@ -1246,219 +1252,4 @@
783 + ====
784
785
786 +-=== Done
787 +-- Save mount point for directories not traversed with onefs=yes.
788 +-- Add seconds to start and end times in the Job report output.
789 +-- if 2 concurrent backups are attempted on the same tape
790 +-  drive (autoloader) into different tape pools, one of them will exit
791 +-  fatally instead of halting until the drive is idle
792 +-- Update StartTime if job held in Job Queue.
793 +-- Look at www.nu2.nu/pebuilder as a helper for full windows
794 +-  bare metal restore. (done by Scott)
795 +-- Fix orphanned buffers:
796 +-   Orphaned buffer:      24 bytes allocated at line 808 of rufus-dir job.c
797 +-   Orphaned buffer:      40 bytes allocated at line 45 of rufus-dir alist.c
798 +-- Implement Preben's suggestion to add
799 +-  File System Types = ext2, ext3 
800 +-  to FileSets, thus simplifying backup of *all* local partitions.
801 +-- Try to open a device on each Job if it was not opened
802 +-  when the SD started.
803 +-- Add dump of VolSessionId/Time and FileIndex with bls.
804 +-- If Bacula does not find the right tape in the Autochanger,
805 +-  then mark the tape in error and move on rather than asking
806 +-  for operator intervention.
807 +-- Cancel command should include JobId in list of Jobs.
808 +-- Add performance testing hooks
809 +-- Bootstrap from JobMedia records.
810 +-- Implement WildFile and WildDir to solve problem of 
811 +-  saving only *.doc files.
812 +-- Fix
813 +-   Please use the "label"  command to create a new Volume for:
814 +-       Storage:      DDS-4-changer
815 +-       Media type:   
816 +-       Pool:         Default
817 +-   label
818 +-   The defined Storage resources are:
819 +-- Copy Changer Device and Changer Command from Autochanger
820 +-  to Device resource in SD if none given in Device resource.
821 +-- 1. Automatic use of more than one drive in an autochanger (done)
822 +-- 2. Automatic selection of the correct drive for each Job (i.e.
823 +-     selects a drive with an appropriate Volume for the Job) (done)
824 +-- 6. Allow multiple simultaneous Jobs referencing the same pool write
825 +-    to several tapes (some new directive(s) are are probably needed for
826 +-    this) (done)
827 +-- Locking (done)
828 +-- Key on Storage rather than Pool (done)
829 +-- Allow multiple drives to use same Pool (change jobq.c DIR) (done).
830 +-- Synchronize multiple drives so that not more
831 +-  than one loads a tape and any time (done)
832 +-- 4. Use Changer Device and Changer Command specified in the
833 +-     Autochanger resource, if none is found in the Device resource.
834 +-    You can continue to specify them in the Device resource if you want
835 +-    or need them to be different for each device.
836 +-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") 
837 +-    that can allow a Device be part of an Autochanger, and hence the changer
838 +-    script protected, but if set to no, will prevent the Device from being 
839 +-    automatically selected from the changer. This allows the device to
840 +-    be directly accessed through its Device name, but not through the
841 +-    AutoChanger name.
842 +-#6   Select one from among Multiple Storage Devices for Job
843 +-#5   Events that call a Python program 
844 +-     (Implemented in Dir/SD)
845 +-- Make sure the Device name is in the Query packet returned.
846 +-- Don't start a second file job if one is already running.
847 +-- Implement EOF/EOV labels for ANSI labels
848 +-- Implement IBM labels.
849 +-- When Python creates a new label, the tape is immediately
850 +-  recycled and no label created. This happens when using   
851 +-  autolabeling -- even when Python doesn't generate the name.
852 +-- Scratch Pool where the volumes can be re-assigned to any Pool.
853 +-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) 
854 +-  is busy reading. Job 6 canceled.
855 +-- Remove separate thread for opening devices in SD.  On the other
856 +-  hand, don't block waiting for open() for devices.
857 +-- Fix code to either handle updating NumVol or to calculate it in
858 +-  Dir next_vol.c
859 +-- Ensure that you cannot exclude a directory or a file explicitly
860 +-  Included with File.
861 +-#4   Embedded Python Scripting 
862 +-     (Implemented in Dir/SD/FD)
863 +-- Add Python writable variable for changing the Priority,
864 +-    Client, Storage, JobStatus (error), ...
865 +-- SD Python
866 +-  - Solicit Events
867 +-- Add disk seeking on restore; turn off seek on tapes.
868 +-  stored/match_bsr.c
869 +-- Look at dird_conf.c:1000: warning: `int size' 
870 +-  might be used uninitialized in this function
871 +-- Indicate when a Job is purged/pruned during restore.
872 +-- Implement some way to turn off automatic pruning in Jobs.
873 +-- Implement a way an Admin Job can prune, possibly multiple
874 +-  clients -- Python script?
875 +-- Look at Preben's acl.c error handling code.
876 +-- SD crashes after a tape restore then doing a backup. 
877 +-- If drive is opened read/write, close it and re-open
878 +-  read-only if doing a restore, and vice-versa.
879 +-- Windows restore:
880 +-  data-fd: RestoreFiles.2004-12-07_15.56.42 Error:
881 +-  > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der
882 +-  > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen
883 +-  > Prozess verwendet wird.
884 +-  Restore restores all files, but then fails at the end trying
885 +-  to set the attributes of e:
886 +-  from failed jobs.- Resolve the problem between Device name and Archive name,
887 +-  and fix SD messages.
888 +-- Tell the "restore" user when browsing is no longer possible.
889 +-- Add a restore directory-x
890 +-- Write non-optimized bsrs from the JobMedia and Media records,
891 +-  even after Files are pruned.
892 +-- Delete Stripe and Copy from VolParams to save space.
893 +-- Fix option 2 of restore -- list where file is backed up -- require Client,
894 +-  then list last 20 backups.
895 +-- Finish implementation of passing all Storage and Device needs to
896 +-  the SD.
897 +-- Move test for max wait time exceeded in job.c up -- Peter's idea.
898 +-##   Consider moving docs to their own project.
899 +-##   Move rescue to its own project.
900 +-- Add client version to the Client name line that prints in
901 +-  the Job report.
902 +-- Fix the Rescue CDROM.
903 +-- By the way: on page http://www.bacula.org/?page=tapedrives , at the 
904 +-  bottom, the link to "Tape Testing Chapter" is broken. It goes to 
905 +-  /html-manual/... while the others point to /rel-manual/...
906 +-- Device resource needs the "name" of the SD.
907 +-- Specify a single directory to restore.
908 +-- Implement MediaType keyword in bsr?   
909 +-- Add a date and time stamp at the beginning of every line in the 
910 +-  Job report (Volker Sauer).
911 +-- Add level to estimate command.
912 +-- Add "limit=n" for "list jobs"
913 +-- Make bootstrap filename unique.
914 +-- Make Dmsg look at global before calling subroutine.
915 +-- From Chris Hull:
916 +-   it seems to be complaining about 12:00pm which should be a valid 12
917 +-   hour time.  I changed the time to 11:59am and everything works fine.
918 +-   Also 12:00am works fine.  0:00pm also works (which I don't think
919 +-   should).  None of the values 12:00pm - 12:59pm work for that matter.
920 +-- Require restore via the restore command or make a restore Job
921 +-  get the bootstrap file.
922 +-- Implement Maximum Job Spool Size
923 +-- Fix 3993 error in SD. It forgets to look at autochanger
924 +-  resource for device command, ...
925 +-- 3. Prevent two drives requesting the same Volume in any given
926 +-     autochanger, by checking if a Volume is mounted on another drive
927 +-     in an Autochanger.
928 +-- Upgrade to MySQL 4.1.12 See:  
929 +-  http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html
930 +-- Add # Job Level date to bsr file
931 +-- Implement "PreferMountedVolumes = yes|no" in Job resource.
932 +-##   Integrate web-bacula into a new Bacula project with
933 +-     bimagemgr.
934 +-- Cleaning tapes should have Status "Cleaning" rather than append.
935 +-- Make sure that Python has access to Client address/port so that
936 +-  it can check if Clients are alive.
937 +-- Review all items in "restore".
938 +-- Fix PostgreSQL GROUP BY problems in restore.
939 +-- Fix PostgreSQL sql problems in bugs.
940 +-- After rename
941 +-  04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume 
942 +-     "DLT-13Feb04".
943 +-  Current Volume "DLT-04Jul05" not acceptable because:
944 +-  1997 Volume "DLT-13Feb04" not in catalog.
945 +-  04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device 
946 +-     "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02
947 +-##   Create a new GUI chapter explaining all the GUI programs.
948 +--    Make "update slots" when pointing to Autochanger, remove
949 +-     all Volumes from other drives.  "update slots all-drives"?
950 +-     No, this is done by modifying mtx-changer to list what is
951 +-     in the drives.
952 +-- Finish TLS implementation.
953 +-- Port limiting -m in iptables to prevent DoS attacks
954 +-  could cause broken pipes on Bacula.
955 +-6. Build and test the Volume Shadow Copy (VSS) for Win32. 
956 +--  Allow cancel of unknown Job
957 +--  State not saved when closing Win32 FD by icon
958 +--  bsr-opt-test fails. bsr deleted. Fix.
959 +--  Move Python daemon variables from Job to Bacula object.
960 +-   WorkingDir, ConfigFile
961 +-- Document that Bootstrap files can be written with cataloging
962 +-  turned off.
963 +-- Document details of ANSI/IBM labels
964 +-- OS linux 2.4
965 +-  1) ADIC, DLT, FastStor 4000, 7*20GB
966 +-- Linux Sony LIB-D81, AIT-3 library works.
967 +-- Doc the following
968 +-  to activate, check or disable the hardware compression feature on my 
969 +-  exb-8900 i use the exabyte "MammothTool" you can get it here:
970 +-  http://www.exabyte.com/support/online/downloads/index.cfm
971 +-  There is a solaris version of this tool. With option -C 0 or 1 you can 
972 +-  disable or activate compression. Start this tool without any options for 
973 +-  a small reference.
974 +-- Document Heartbeat Interval in the dealing with firewalls section.
975 +-- Document new CDROM directory.
976 +-- On Win32 working directory must have drive letter ????
977 +-- On Win32 working directory must be writable by SYSTEM to
978 +-  do restores.
979 +-- Document that ChangerDevice is used for Alert command.
980 +-- Add better documentation on how restores can be done
981 +-8. Take one more try at making DVD writing work (no go)
982 +-7. Write a bacula-web document
983 +-- Why isn't the DEVICE structure defined when doing
984 +-  a reservation?
985 +-- Multi-drive changer seems to only use drive 0
986 +-  Multiple drives don't seem to be opened.
987 +-- My database is growing
988 +-- Call GetLastError() in the berrno constructor rather
989 +-  than delaying until strerror.
990 +-- Tape xxx in drive 0, requested in drive 1
991 +-- The mount command does not work with drives other than 0.
992 +-- A mount should cause the SD to re-examine what Slot is   
993 +-  loaded.
994 +-- The SD locks on to the first available drive then
995 +-  wants a Volume that is released but in another drive --
996 +-  chaos.
997 +-- Run the regression scripts on Solaris and FreeBSD
998 +--  Figure out how to package gui, and rescue programs.
999 +-- Add a .dir command to restore tree code to eliminate the problem
1000 +-- Mount after manually unloading changer causes hang in SD
1001 +-- Fix JobACL with restore by JobId.
1002 ++=== Done -- see kernsdone
1003 +Index: kes-1.38
1004 +===================================================================
1005 +RCS file: /cvsroot/bacula/bacula/kes-1.38,v
1006 +retrieving revision 1.1.2.13
1007 +retrieving revision 1.1.2.14
1008 +diff -u -r1.1.2.13 -r1.1.2.14
1009 +--- kes-1.38   14 Nov 2005 20:20:38 -0000      1.1.2.13
1010 ++++ kes-1.38   22 Nov 2005 10:50:55 -0000      1.1.2.14
1011 +@@ -3,6 +3,20 @@
1012
1013 + General:
1014
1015 ++Changes to 1.38.2:
1016 ++20Oct05
1017 ++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
1018 ++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
1019 ++  says this does not fix *his* bug).
1020 ++- Fix cancel failure bug. Bug #481
1021 ++- Fix failure when Pool name has spaces. Bug #487   
1022 ++- Fix SD crash in autochanger code. Mutex failure. Bug #488
1023 ++- Fix a couple of free()s in src/filed/acl.c
1024 ++- Fix memory overrun in bfile.c in building OS X resource
1025 ++  fork filename. Bug #489 
1026 ++- Add Pool name to SD status output.
1027 ++- Add Python install dir for Solaris to configure. Bug #492
1028 ++
1029 + Changes to 1.38.1:
1030 + 14Oct05
1031 + - Apply SunOS patch for ACLs submitted by David Duchscher.                  
1032 +Index: projects
1033 +===================================================================
1034 +RCS file: /cvsroot/bacula/bacula/projects,v
1035 +retrieving revision 1.12.2.3
1036 +retrieving revision 1.12.2.4
1037 +diff -u -r1.12.2.3 -r1.12.2.4
1038 +--- projects   10 Nov 2005 20:25:27 -0000      1.12.2.3
1039 ++++ projects   22 Nov 2005 10:50:55 -0000      1.12.2.4
1040 +@@ -228,7 +228,175 @@
1041
1042 +   Why:    Performance enhancement.
1043
1044 ++Item 13:  Let Bacula log tape usage and handle drive cleaning cycles.
1045 ++  Date:   November 11, 2005
1046 ++  Origin: Arno Lehmann <al at its-lehmann dot de>
1047 ++  Status:
1048 ++
1049 ++  What:   Make Bacula manage tape life cycle information and drive 
1050 ++          cleaning cycles.
1051 ++
1052 ++  Why:    Both parts of this project are important when operating backups.
1053 ++          We need to know which tapes need replacement, and we need to
1054 ++          make sure the drives are cleaned when necessary.  While many
1055 ++          tape libraries and even autoloaders can handle all this
1056 ++          automatically, support by Bacula can be helpful for smaller
1057 ++          (older) libraries and single drives.  Also, checking drive
1058 ++          status during operation can prevent some failures (as I had to
1059 ++          learn the hard way...)
1060 ++
1061 ++  Notes:  First, Bacula could (and even does, to some limited extent)
1062 ++          record tape and drive usage.  For tapes, the number of mounts,
1063 ++          the amount of data, and the time the tape has actually been
1064 ++          running could be recorded.  Data fields for Read and Write time
1065 ++          and Nmber of mounts already exist in the catalog (I'm not sure
1066 ++          if VolBytes is the sum of all bytes ever written to that volume
1067 ++          by Bacula).  This information can be important when determining
1068 ++          which media to replace.  For the tape drives known to Bacula,
1069 ++          similar information is interesting to determine the device
1070 ++          status and expected life time: Time it's been Reading and
1071 ++          Writing, number of tape Loads / Unloads / Errors.  This
1072 ++          information is not yet recorded as far as I know.
1073 ++
1074 ++          The next step would be implementing drive cleaning setup.
1075 ++          Bacula already has knowledge about cleaning tapes.  Once it has
1076 ++          some information about cleaning cycles (measured in drive run
1077 ++          time, number of tapes used, or calender days, for example) it
1078 ++          can automatically execute tape cleaning (with an autochanger,
1079 ++          obviously) or ask for operator assistence loading a cleaning
1080 ++          tape.
1081 ++
1082 ++          The next step would be to implement TAPEALERT checks not only
1083 ++          when changing tapes and only sending he information to the
1084 ++          administrator, but rather checking after each tape error,
1085 ++          checking on a regular basis (for example after each tape file),
1086 ++          and also before unloading and after loading a new tape.  Then,
1087 ++          depending on the drives TAPEALERT state and the know drive
1088 ++          cleaning state Bacula could automatically schedule later
1089 ++          cleaning, clean immediately, or inform the operator.
1090 ++
1091 ++          Implementing this would perhaps require another catalog change
1092 ++          and perhaps major changes in SD code and the DIR-SD protocoll,
1093 ++          so I'd only consider this worth implementing if it would
1094 ++          actually be used or even needed by many people. 
1095 ++
1096 ++Item 14:  Merging of multiple backups into a single one. (Also called Synthetic
1097 ++          Backup or Consolidation).
1098 ++
1099 ++  Origin: Marc Cousin and Eric Bollengier 
1100 ++  Date:   15 November 2005
1101 ++  Status: Depends on first implementing project Item 1 (Migration).
1102 ++
1103 ++  What:   A merged backup is a backup made without connecting to the Client.
1104 ++          It would be a Merge of existing backups into a single backup.
1105 ++          In effect, it is like a restore but to the backup medium.
1106 ++
1107 ++          For instance, say that last sunday we made a full backup.  Then
1108 ++          all week long, we created incremental backups, in order to do
1109 ++          them fast.  Now comes sunday again, and we need another full.
1110 ++          The merged backup makes it possible to do instead an incremental
1111 ++          backup (during the night for instance), and then create a merged
1112 ++          backup during the day, by using the full and incrementals from
1113 ++          the week.  The merged backup will be exactly like a full made
1114 ++          sunday night on the tape, but the production interruption on the
1115 ++          Client will be minimal, as the Client will only have to send
1116 ++          incrementals.
1117 ++
1118 ++          In fact, if it's done correctly, you could merge all the
1119 ++          Incrementals into single Incremental, or all the Incrementals
1120 ++          and the last Differential into a new Differential, or the Full,
1121 ++          last differential and all the Incrementals into a new Full
1122 ++          backup.  And there is no need to involve the Client.
1123 ++
1124 ++  Why:    The benefit is that :
1125 ++          - the Client just does an incremental ;
1126 ++          - the merged backup on tape is just as a single full backup,
1127 ++            and can be restored very fast.
1128 ++
1129 ++          This is also a way of reducing the backup data since the old
1130 ++          data can then be pruned (or not) from the catalog, possibly
1131 ++          allowing older volumes to be recycled
1132 ++
1133 ++Item 15:  Automatic disabling of devices
1134 ++   Date:   2005-11-11
1135 ++   Origin: Peter Eriksson <peter at ifm.liu dot se>
1136 ++   Status:
1137 ++
1138 ++   What:  After a configurable amount of fatal errors with a tape drive
1139 ++          Bacula should automatically disable further use of a certain
1140 ++          tape drive. There should also be "disable"/"enable" commands in
1141 ++          the "bconsole" tool.
1142 ++
1143 ++   Why:   On a multi-drive jukebox there is a possibility of tape drives
1144 ++          going bad during large backups (needing a cleaning tape run,
1145 ++          tapes getting stuck). It would be advantageous if Bacula would
1146 ++          automatically disable further use of a problematic tape drive
1147 ++          after a configurable amount of errors has occured.
1148 ++
1149 ++          An example: I have a multi-drive jukebox (6 drives, 380+ slots)
1150 ++          where tapes occasionally get stuck inside the drive. Bacula will
1151 ++          notice that the "mtx-changer" command will fail and then fail
1152 ++          any backup jobs trying to use that drive. However, it will still
1153 ++          keep on trying to run new jobs using that drive and fail -
1154 ++          forever, and thus failing lots and lots of jobs... Since we have
1155 ++          many drives Bacula could have just automatically disabled
1156 ++          further use of that drive and used one of the other ones
1157 ++          instead.
1158 ++
1159 ++
1160 ++Item 16:  Directive/mode to backup only file changes, not entire file
1161 ++  Date:   11 November 2005
1162 ++  Origin: Joshua Kugler <joshua dot kugler at uaf dot edu>
1163 ++          Marek Bajon <mbajon at bimsplus dot com dot pl>
1164 ++  Status: RFC
1165 ++
1166 ++  What:   Currently when a file changes, the entire file will be backed up in
1167 ++          the next incremental or full backup.  To save space on the tapes
1168 ++          it would be nice to have a mode whereby only the changes to the
1169 ++          file would be backed up when it is changed.
1170 ++
1171 ++  Why:    This would save lots of space when backing up large files such as 
1172 ++          logs, mbox files, Outlook PST files and the like.
1173 ++
1174 ++  Notes:  This would require the usage of disk-based volumes as comparing 
1175 ++          files would not be feasible using a tape drive.
1176 ++
1177 ++Item 17:  Quick release of FD-SD connection
1178 ++  Origin: Frank Volf (frank at deze dot org)
1179 ++  Date:   17 november 2005
1180 ++  Status:
1181 ++
1182 ++   What:  In the bacula implementation a backup is finished after all data
1183 ++          and attributes are succesfully written to storage.  When using a
1184 ++          tape backup it is very annoying that a backup can take a day,
1185 ++          simply because the current tape (or whatever) is full and the
1186 ++          administrator has not put a new one in.  During that time the
1187 ++          system cannot be taken off-line, because there is still an open
1188 ++          session between the storage daemon and the file daemon on the
1189 ++          client.
1190 ++
1191 ++          Although this is a very good strategey for making "safe backups"
1192 ++          This can be annoying for e.g.  laptops, that must remain
1193 ++          connected until the bacukp is completed.
1194 ++
1195 ++          Using a new feature called "migration" it will be possible to
1196 ++          spool first to harddisk (using a special 'spool' migration
1197 ++          scheme) and then migrate the backup to tape.
1198 ++
1199 ++          There is still the problem of getting the attributes committed.
1200 ++          If it takes a very long time to do, with the current code, the
1201 ++          job has not terminated, and the File daemon is not freed up.  The
1202 ++          Storage daemon should release the File daemon as soon as all the
1203 ++          file data and all the attributes have been sent to it (the SD).
1204 ++          Currently the SD waits until everything is on tape and all the
1205 ++          attributes are transmitted to the Director before signalling
1206 ++          completion to the FD. I don't think I would have any problem
1207 ++          changing this.  The reason is that even if the FD reports back to
1208 ++          the Dir that all is OK, the job will not terminate until the SD
1209 ++          has done the same thing -- so in a way keeping the SD-FD link
1210 ++          open to the very end is not really very productive ...
1211
1212 ++   Why:   Makes backup of laptops much easier.
1213
1214
1215 + ============= Empty RFC form ===========
1216 +@@ -245,33 +413,4 @@
1217 + ============== End RFC form ==============
1218
1219
1220 +-Items completed for release 1.38.0:
1221 +-#4   Embedded Python Scripting (implemented in all Daemons)
1222 +-#5   Events that call a Python program (Implemented in all
1223 +-       daemons, but more cleanup work to be done).
1224 +-#6   Select one from among Multiple Storage Devices for Job.
1225 +-       This is already implemented in 1.37.
1226 +-#7   Single Job Writing to Multiple Storage Devices. This is
1227 +-       currently implemented with a Clone feature.
1228 +-#-   Full multiple drive Autochanger support (done in 1.37)
1229 +-#-   Built in support for communications encryption (TLS) 
1230 +-       done by Landon Fuller.
1231 +-#    Support for Unicode characters
1232 +-       (via UTF-8) on Win32 machines thanks to Thorsten Engel.
1233 +-Item  8:  Break the one-to-one Relationship between a Job and a
1234 +-          Specific Storage Device (or Devices if #10 is implemented).
1235 +-
1236 +-Completed items from last year's list:
1237 +-Item 1:   Multiple simultaneous Jobs. (done)
1238 +-Item 3:   Write the bscan program -- also write a bcopy program (done).
1239 +-Item 5:   Implement Label templates (done).
1240 +-Item 6:   Write a regression script (done)
1241 +-Item 9:   Add SSL to daemon communications (done by Landon Fuller)
1242 +-Item 10:  Define definitive tape format (done)
1243 +-Item 3:   GUI for interactive restore. Partially Implemented in 1.34
1244 +-          Note, there is now a complete Webmin plugin, a partial
1245 +-          GNOME console, and an excellent wx-console GUI.
1246 +-Item 4:   GUI for interactive backup
1247 +-Item 2:   Job Data Spooling.
1248 +-    Done: Regular expression matching.
1249 +-Item 10:  New daemon communication protocol (this has been dropped).
1250 ++Items completed for release 1.38.0 -- see kernsdone
1251 +Index: autoconf/configure.in
1252 +===================================================================
1253 +RCS file: /cvsroot/bacula/bacula/autoconf/configure.in,v
1254 +retrieving revision 1.184.2.4
1255 +retrieving revision 1.184.2.5
1256 +diff -u -r1.184.2.4 -r1.184.2.5
1257 +--- autoconf/configure.in      13 Nov 2005 10:51:17 -0000      1.184.2.4
1258 ++++ autoconf/configure.in      22 Nov 2005 10:50:55 -0000      1.184.2.5
1259 +@@ -604,7 +604,7 @@
1260 +   PYTHON_LIBS=
1261 +   if test "$withval" != "no"; then
1262 +      if test "$withval" = "yes"; then
1263 +-      for python_root in /usr /usr/local; do
1264 ++      for python_root in /usr /usr/local /usr/sfw; do
1265 +         if test -f $python_root/include/python2.2/Python.h; then
1266 +            PYTHON_INCDIR=-I$python_root/include/python2.2
1267 +            PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
1268 +Index: patches/1.38.1-to-1.38.2.patch
1269 +===================================================================
1270 +RCS file: patches/1.38.1-to-1.38.2.patch
1271 +diff -N patches/1.38.1-to-1.38.2.patch
1272 +--- /dev/null  1 Jan 1970 00:00:00 -0000
1273 ++++ patches/1.38.1-to-1.38.2.patch     22 Nov 2005 10:50:55 -0000      1.1.2.2
1274 +@@ -0,0 +1,5704 @@
1275 ++
1276 ++ This patch fixes the following bugs:
1277 ++
1278 ++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
1279 ++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
1280 ++  says that this patch does not fix his problem)
1281 ++- Fix cancel failure bug. Bug #481
1282 ++- Fix failure when Pool name has spaces. Bug #487
1283 ++- Fix SD crash in autochanger code. Mutex failure. Bug #488
1284 ++- Fix a couple of free()s in src/filed/acl.c
1285 ++- Fix memory overrun in bfile.c in building OS X resource
1286 ++  fork filename. Bug #489
1287 ++- Add Pool name to SD status output.
1288 ++- Add Python install dir for Solaris to configure. Bug #492
1289 ++
1290 ++This patch is applied to Bacula source version 1.38.1 and will
1291 ++produce Bacula source version 1.38.2.  Apply it with:
1292 ++
1293 ++   cd <bacula-1.38.1-source>
1294 ++   ./configure (your options) if not already done
1295 ++   patch -p0 <1.38.1-to-1.38.2.patch
1296 ++   make
1297 ++   make install
1298 ++
1299 ++? osx_finder.patch
1300 ++Index: ChangeLog
1301 ++===================================================================
1302 ++RCS file: /cvsroot/bacula/bacula/ChangeLog,v
1303 ++retrieving revision 1.154.2.7
1304 ++diff -u -r1.154.2.7 ChangeLog
1305 ++--- ChangeLog 15 Nov 2005 09:27:19 -0000      1.154.2.7
1306 +++++ ChangeLog 22 Nov 2005 10:42:14 -0000
1307 ++@@ -1,4 +1,14 @@
1308 ++ 
1309 +++Changes to 1.38.2:
1310 +++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
1311 +++- Fix bnet-server bug found on OpenBSD. Bug #486
1312 +++- Fix cancel failure bug. Bug #481
1313 +++- Fix failure when Pool name has spaces. Bug #487   
1314 +++- Fix SD crash in autochanger code. Mutex failure. Bug #488
1315 +++- Fix a couple of free()s in src/filed/acl.c
1316 +++- Fix memory overrun in bfile.c in building OS X resource
1317 +++  fork filename. Bug #489 
1318 +++- Add Pool name to SD status output.
1319 ++ 
1320 ++ Changes to 1.38.1:
1321 ++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
1322 ++Index: ReleaseNotes
1323 ++===================================================================
1324 ++RCS file: /cvsroot/bacula/bacula/ReleaseNotes,v
1325 ++retrieving revision 1.147.2.9
1326 ++diff -u -r1.147.2.9 ReleaseNotes
1327 ++--- ReleaseNotes      15 Nov 2005 09:27:19 -0000      1.147.2.9
1328 +++++ ReleaseNotes      22 Nov 2005 10:42:15 -0000
1329 ++@@ -1,10 +1,21 @@
1330 ++ 
1331 ++-          Release Notes for Bacula 1.38.1
1332 +++          Release Notes for Bacula 1.38.2
1333 ++ 
1334 ++   Bacula code: Total files = 420 Total lines = 138,440 (*.h *.c *.in)
1335 ++       20,440 additional lines of code since version 1.36.3
1336 ++ 
1337 ++-Changes since 1.38.0:
1338 +++Changes to 1.38.2:
1339 +++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
1340 +++- Fix bnet-server bug found on OpenBSD. Bug #486
1341 +++- Fix cancel failure bug. Bug #481
1342 +++- Fix failure when Pool name has spaces. Bug #487   
1343 +++- Fix SD crash in autochanger code. Mutex failure. Bug #488
1344 +++- Fix a couple of free()s in src/filed/acl.c
1345 +++- Fix memory overrun in bfile.c in building OS X resource
1346 +++  fork filename. Bug #489 
1347 +++- Add Pool name to SD status output.
1348 +++
1349 +++Changes to 1.38.1:
1350 ++ - Corrected ACL for Solaris (David Duchscher and Attila Fulop).
1351 ++ - Add bacula_mail_summary.sh to examples directory. It makes
1352 ++   a single email summary of any number of jobs. Submitted
1353 ++Index: configure
1354 ++===================================================================
1355 ++RCS file: /cvsroot/bacula/bacula/configure,v
1356 ++retrieving revision 1.203.2.5
1357 ++diff -u -r1.203.2.5 configure
1358 ++--- configure 13 Nov 2005 10:51:17 -0000      1.203.2.5
1359 +++++ configure 22 Nov 2005 10:42:19 -0000
1360 ++@@ -14948,7 +14948,7 @@
1361 ++   PYTHON_LIBS=
1362 ++   if test "$withval" != "no"; then
1363 ++      if test "$withval" = "yes"; then
1364 ++-     for python_root in /usr /usr/local; do
1365 +++     for python_root in /usr /usr/local /usr/sfw; do
1366 ++        if test -f $python_root/include/python2.2/Python.h; then
1367 ++           PYTHON_INCDIR=-I$python_root/include/python2.2
1368 ++           PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
1369 ++Index: kernstodo
1370 ++===================================================================
1371 ++RCS file: /cvsroot/bacula/bacula/kernstodo,v
1372 ++retrieving revision 1.570.2.6
1373 ++diff -u -r1.570.2.6 kernstodo
1374 ++--- kernstodo 4 Nov 2005 09:16:49 -0000       1.570.2.6
1375 +++++ kernstodo 22 Nov 2005 10:42:20 -0000
1376 ++@@ -1,5 +1,5 @@
1377 ++                     Kern's ToDo List
1378 ++-                     03 November 2005
1379 +++                     21 November 2005
1380 ++ 
1381 ++ Major development:      
1382 ++ Project                     Developer
1383 ++@@ -7,8 +7,6 @@
1384 ++ Version 1.37                Kern (see below)
1385 ++ ========================================================
1386 ++ 
1387 ++-Final items for 1.37 before release:
1388 ++-
1389 ++ Document:
1390 ++ - Does ClientRunAfterJob fail the job on a bad return code?
1391 ++ - Document cleaning up the spool files:
1392 ++@@ -18,6 +16,8 @@
1393 ++ - Does WildFile match against full name?  Doc.
1394 ++ 
1395 ++ For 1.39:
1396 +++- Make sure that all do_prompt() calls in Dir check for
1397 +++  -1 (error) and -2 (cancel) returns.
1398 ++ - Look at -D_FORTIFY_SOURCE=2
1399 ++ - Add Win32 FileSet definition somewhere
1400 ++ - Look at fixing restore status stats in SD.
1401 ++@@ -27,6 +27,12 @@
1402 ++   encountered, read many times (as it currently does), and if the
1403 ++   block cannot be read, skip to the next block, and try again.  If
1404 ++   that fails, skip to the next file and try again, ...
1405 +++- Add level table:
1406 +++  create table LevelType (LevelType binary(1), LevelTypeLong tinyblob);
1407 +++  insert into LevelType (LevelType,LevelTypeLong) values
1408 +++  ("F","Full"),
1409 +++  ("D","Diff"),
1410 +++  ("I","Inc");
1411 ++ - Add ACL to restore only to original location.
1412 ++ - Add a recursive mark command (rmark) to restore.
1413 ++ - "Minimum Job Interval = nnn" sets minimum interval between Jobs
1414 ++@@ -1246,219 +1252,4 @@
1415 ++ ====
1416 ++ 
1417 ++ 
1418 ++-=== Done
1419 ++-- Save mount point for directories not traversed with onefs=yes.
1420 ++-- Add seconds to start and end times in the Job report output.
1421 ++-- if 2 concurrent backups are attempted on the same tape
1422 ++-  drive (autoloader) into different tape pools, one of them will exit
1423 ++-  fatally instead of halting until the drive is idle
1424 ++-- Update StartTime if job held in Job Queue.
1425 ++-- Look at www.nu2.nu/pebuilder as a helper for full windows
1426 ++-  bare metal restore. (done by Scott)
1427 ++-- Fix orphanned buffers:
1428 ++-   Orphaned buffer:      24 bytes allocated at line 808 of rufus-dir job.c
1429 ++-   Orphaned buffer:      40 bytes allocated at line 45 of rufus-dir alist.c
1430 ++-- Implement Preben's suggestion to add
1431 ++-  File System Types = ext2, ext3 
1432 ++-  to FileSets, thus simplifying backup of *all* local partitions.
1433 ++-- Try to open a device on each Job if it was not opened
1434 ++-  when the SD started.
1435 ++-- Add dump of VolSessionId/Time and FileIndex with bls.
1436 ++-- If Bacula does not find the right tape in the Autochanger,
1437 ++-  then mark the tape in error and move on rather than asking
1438 ++-  for operator intervention.
1439 ++-- Cancel command should include JobId in list of Jobs.
1440 ++-- Add performance testing hooks
1441 ++-- Bootstrap from JobMedia records.
1442 ++-- Implement WildFile and WildDir to solve problem of 
1443 ++-  saving only *.doc files.
1444 ++-- Fix
1445 ++-   Please use the "label"  command to create a new Volume for:
1446 ++-       Storage:      DDS-4-changer
1447 ++-       Media type:   
1448 ++-       Pool:         Default
1449 ++-   label
1450 ++-   The defined Storage resources are:
1451 ++-- Copy Changer Device and Changer Command from Autochanger
1452 ++-  to Device resource in SD if none given in Device resource.
1453 ++-- 1. Automatic use of more than one drive in an autochanger (done)
1454 ++-- 2. Automatic selection of the correct drive for each Job (i.e.
1455 ++-     selects a drive with an appropriate Volume for the Job) (done)
1456 ++-- 6. Allow multiple simultaneous Jobs referencing the same pool write
1457 ++-    to several tapes (some new directive(s) are are probably needed for
1458 ++-    this) (done)
1459 ++-- Locking (done)
1460 ++-- Key on Storage rather than Pool (done)
1461 ++-- Allow multiple drives to use same Pool (change jobq.c DIR) (done).
1462 ++-- Synchronize multiple drives so that not more
1463 ++-  than one loads a tape and any time (done)
1464 ++-- 4. Use Changer Device and Changer Command specified in the
1465 ++-     Autochanger resource, if none is found in the Device resource.
1466 ++-    You can continue to specify them in the Device resource if you want
1467 ++-    or need them to be different for each device.
1468 ++-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") 
1469 ++-    that can allow a Device be part of an Autochanger, and hence the changer
1470 ++-    script protected, but if set to no, will prevent the Device from being 
1471 ++-    automatically selected from the changer. This allows the device to
1472 ++-    be directly accessed through its Device name, but not through the
1473 ++-    AutoChanger name.
1474 ++-#6   Select one from among Multiple Storage Devices for Job
1475 ++-#5   Events that call a Python program 
1476 ++-     (Implemented in Dir/SD)
1477 ++-- Make sure the Device name is in the Query packet returned.
1478 ++-- Don't start a second file job if one is already running.
1479 ++-- Implement EOF/EOV labels for ANSI labels
1480 ++-- Implement IBM labels.
1481 ++-- When Python creates a new label, the tape is immediately
1482 ++-  recycled and no label created. This happens when using   
1483 ++-  autolabeling -- even when Python doesn't generate the name.
1484 ++-- Scratch Pool where the volumes can be re-assigned to any Pool.
1485 ++-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) 
1486 ++-  is busy reading. Job 6 canceled.
1487 ++-- Remove separate thread for opening devices in SD.  On the other
1488 ++-  hand, don't block waiting for open() for devices.
1489 ++-- Fix code to either handle updating NumVol or to calculate it in
1490 ++-  Dir next_vol.c
1491 ++-- Ensure that you cannot exclude a directory or a file explicitly
1492 ++-  Included with File.
1493 ++-#4   Embedded Python Scripting 
1494 ++-     (Implemented in Dir/SD/FD)
1495 ++-- Add Python writable variable for changing the Priority,
1496 ++-    Client, Storage, JobStatus (error), ...
1497 ++-- SD Python
1498 ++-  - Solicit Events
1499 ++-- Add disk seeking on restore; turn off seek on tapes.
1500 ++-  stored/match_bsr.c
1501 ++-- Look at dird_conf.c:1000: warning: `int size' 
1502 ++-  might be used uninitialized in this function
1503 ++-- Indicate when a Job is purged/pruned during restore.
1504 ++-- Implement some way to turn off automatic pruning in Jobs.
1505 ++-- Implement a way an Admin Job can prune, possibly multiple
1506 ++-  clients -- Python script?
1507 ++-- Look at Preben's acl.c error handling code.
1508 ++-- SD crashes after a tape restore then doing a backup. 
1509 ++-- If drive is opened read/write, close it and re-open
1510 ++-  read-only if doing a restore, and vice-versa.
1511 ++-- Windows restore:
1512 ++-  data-fd: RestoreFiles.2004-12-07_15.56.42 Error:
1513 ++-  > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der
1514 ++-  > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen
1515 ++-  > Prozess verwendet wird.
1516 ++-  Restore restores all files, but then fails at the end trying
1517 ++-  to set the attributes of e:
1518 ++-  from failed jobs.- Resolve the problem between Device name and Archive name,
1519 ++-  and fix SD messages.
1520 ++-- Tell the "restore" user when browsing is no longer possible.
1521 ++-- Add a restore directory-x
1522 ++-- Write non-optimized bsrs from the JobMedia and Media records,
1523 ++-  even after Files are pruned.
1524 ++-- Delete Stripe and Copy from VolParams to save space.
1525 ++-- Fix option 2 of restore -- list where file is backed up -- require Client,
1526 ++-  then list last 20 backups.
1527 ++-- Finish implementation of passing all Storage and Device needs to
1528 ++-  the SD.
1529 ++-- Move test for max wait time exceeded in job.c up -- Peter's idea.
1530 ++-##   Consider moving docs to their own project.
1531 ++-##   Move rescue to its own project.
1532 ++-- Add client version to the Client name line that prints in
1533 ++-  the Job report.
1534 ++-- Fix the Rescue CDROM.
1535 ++-- By the way: on page http://www.bacula.org/?page=tapedrives , at the 
1536 ++-  bottom, the link to "Tape Testing Chapter" is broken. It goes to 
1537 ++-  /html-manual/... while the others point to /rel-manual/...
1538 ++-- Device resource needs the "name" of the SD.
1539 ++-- Specify a single directory to restore.
1540 ++-- Implement MediaType keyword in bsr?   
1541 ++-- Add a date and time stamp at the beginning of every line in the 
1542 ++-  Job report (Volker Sauer).
1543 ++-- Add level to estimate command.
1544 ++-- Add "limit=n" for "list jobs"
1545 ++-- Make bootstrap filename unique.
1546 ++-- Make Dmsg look at global before calling subroutine.
1547 ++-- From Chris Hull:
1548 ++-   it seems to be complaining about 12:00pm which should be a valid 12
1549 ++-   hour time.  I changed the time to 11:59am and everything works fine.
1550 ++-   Also 12:00am works fine.  0:00pm also works (which I don't think
1551 ++-   should).  None of the values 12:00pm - 12:59pm work for that matter.
1552 ++-- Require restore via the restore command or make a restore Job
1553 ++-  get the bootstrap file.
1554 ++-- Implement Maximum Job Spool Size
1555 ++-- Fix 3993 error in SD. It forgets to look at autochanger
1556 ++-  resource for device command, ...
1557 ++-- 3. Prevent two drives requesting the same Volume in any given
1558 ++-     autochanger, by checking if a Volume is mounted on another drive
1559 ++-     in an Autochanger.
1560 ++-- Upgrade to MySQL 4.1.12 See:  
1561 ++-  http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html
1562 ++-- Add # Job Level date to bsr file
1563 ++-- Implement "PreferMountedVolumes = yes|no" in Job resource.
1564 ++-##   Integrate web-bacula into a new Bacula project with
1565 ++-     bimagemgr.
1566 ++-- Cleaning tapes should have Status "Cleaning" rather than append.
1567 ++-- Make sure that Python has access to Client address/port so that
1568 ++-  it can check if Clients are alive.
1569 ++-- Review all items in "restore".
1570 ++-- Fix PostgreSQL GROUP BY problems in restore.
1571 ++-- Fix PostgreSQL sql problems in bugs.
1572 ++-- After rename
1573 ++-  04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume 
1574 ++-     "DLT-13Feb04".
1575 ++-  Current Volume "DLT-04Jul05" not acceptable because:
1576 ++-  1997 Volume "DLT-13Feb04" not in catalog.
1577 ++-  04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device 
1578 ++-     "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02
1579 ++-##   Create a new GUI chapter explaining all the GUI programs.
1580 ++--    Make "update slots" when pointing to Autochanger, remove
1581 ++-     all Volumes from other drives.  "update slots all-drives"?
1582 ++-     No, this is done by modifying mtx-changer to list what is
1583 ++-     in the drives.
1584 ++-- Finish TLS implementation.
1585 ++-- Port limiting -m in iptables to prevent DoS attacks
1586 ++-  could cause broken pipes on Bacula.
1587 ++-6. Build and test the Volume Shadow Copy (VSS) for Win32. 
1588 ++--  Allow cancel of unknown Job
1589 ++--  State not saved when closing Win32 FD by icon
1590 ++--  bsr-opt-test fails. bsr deleted. Fix.
1591 ++--  Move Python daemon variables from Job to Bacula object.
1592 ++-   WorkingDir, ConfigFile
1593 ++-- Document that Bootstrap files can be written with cataloging
1594 ++-  turned off.
1595 ++-- Document details of ANSI/IBM labels
1596 ++-- OS linux 2.4
1597 ++-  1) ADIC, DLT, FastStor 4000, 7*20GB
1598 ++-- Linux Sony LIB-D81, AIT-3 library works.
1599 ++-- Doc the following
1600 ++-  to activate, check or disable the hardware compression feature on my 
1601 ++-  exb-8900 i use the exabyte "MammothTool" you can get it here:
1602 ++-  http://www.exabyte.com/support/online/downloads/index.cfm
1603 ++-  There is a solaris version of this tool. With option -C 0 or 1 you can 
1604 ++-  disable or activate compression. Start this tool without any options for 
1605 ++-  a small reference.
1606 ++-- Document Heartbeat Interval in the dealing with firewalls section.
1607 ++-- Document new CDROM directory.
1608 ++-- On Win32 working directory must have drive letter ????
1609 ++-- On Win32 working directory must be writable by SYSTEM to
1610 ++-  do restores.
1611 ++-- Document that ChangerDevice is used for Alert command.
1612 ++-- Add better documentation on how restores can be done
1613 ++-8. Take one more try at making DVD writing work (no go)
1614 ++-7. Write a bacula-web document
1615 ++-- Why isn't the DEVICE structure defined when doing
1616 ++-  a reservation?
1617 ++-- Multi-drive changer seems to only use drive 0
1618 ++-  Multiple drives don't seem to be opened.
1619 ++-- My database is growing
1620 ++-- Call GetLastError() in the berrno constructor rather
1621 ++-  than delaying until strerror.
1622 ++-- Tape xxx in drive 0, requested in drive 1
1623 ++-- The mount command does not work with drives other than 0.
1624 ++-- A mount should cause the SD to re-examine what Slot is   
1625 ++-  loaded.
1626 ++-- The SD locks on to the first available drive then
1627 ++-  wants a Volume that is released but in another drive --
1628 ++-  chaos.
1629 ++-- Run the regression scripts on Solaris and FreeBSD
1630 ++--  Figure out how to package gui, and rescue programs.
1631 ++-- Add a .dir command to restore tree code to eliminate the problem
1632 ++-- Mount after manually unloading changer causes hang in SD
1633 ++-- Fix JobACL with restore by JobId.
1634 +++=== Done -- see kernsdone
1635 ++Index: kes-1.38
1636 ++===================================================================
1637 ++RCS file: /cvsroot/bacula/bacula/kes-1.38,v
1638 ++retrieving revision 1.1.2.13
1639 ++diff -u -r1.1.2.13 kes-1.38
1640 ++--- kes-1.38  14 Nov 2005 20:20:38 -0000      1.1.2.13
1641 +++++ kes-1.38  22 Nov 2005 10:42:20 -0000
1642 ++@@ -3,6 +3,19 @@
1643 ++ 
1644 ++ General:
1645 ++ 
1646 +++Changes to 1.38.2:
1647 +++20Oct05
1648 +++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
1649 +++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
1650 +++  says this does not fix *his* bug).
1651 +++- Fix cancel failure bug. Bug #481
1652 +++- Fix failure when Pool name has spaces. Bug #487   
1653 +++- Fix SD crash in autochanger code. Mutex failure. Bug #488
1654 +++- Fix a couple of free()s in src/filed/acl.c
1655 +++- Fix memory overrun in bfile.c in building OS X resource
1656 +++  fork filename. Bug #489 
1657 +++- Add Pool name to SD status output.
1658 +++
1659 ++ Changes to 1.38.1:
1660 ++ 14Oct05
1661 ++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
1662 ++Index: projects
1663 ++===================================================================
1664 ++RCS file: /cvsroot/bacula/bacula/projects,v
1665 ++retrieving revision 1.12.2.3
1666 ++diff -u -r1.12.2.3 projects
1667 ++--- projects  10 Nov 2005 20:25:27 -0000      1.12.2.3
1668 +++++ projects  22 Nov 2005 10:42:20 -0000
1669 ++@@ -228,7 +228,175 @@
1670 ++ 
1671 ++   Why:    Performance enhancement.
1672 ++ 
1673 +++Item 13:  Let Bacula log tape usage and handle drive cleaning cycles.
1674 +++  Date:   November 11, 2005
1675 +++  Origin: Arno Lehmann <al at its-lehmann dot de>
1676 +++  Status:
1677 +++
1678 +++  What:   Make Bacula manage tape life cycle information and drive 
1679 +++          cleaning cycles.
1680 +++
1681 +++  Why:    Both parts of this project are important when operating backups.
1682 +++          We need to know which tapes need replacement, and we need to
1683 +++          make sure the drives are cleaned when necessary.  While many
1684 +++          tape libraries and even autoloaders can handle all this
1685 +++          automatically, support by Bacula can be helpful for smaller
1686 +++          (older) libraries and single drives.  Also, checking drive
1687 +++          status during operation can prevent some failures (as I had to
1688 +++          learn the hard way...)
1689 +++
1690 +++  Notes:  First, Bacula could (and even does, to some limited extent)
1691 +++          record tape and drive usage.  For tapes, the number of mounts,
1692 +++          the amount of data, and the time the tape has actually been
1693 +++          running could be recorded.  Data fields for Read and Write time
1694 +++          and Nmber of mounts already exist in the catalog (I'm not sure
1695 +++          if VolBytes is the sum of all bytes ever written to that volume
1696 +++          by Bacula).  This information can be important when determining
1697 +++          which media to replace.  For the tape drives known to Bacula,
1698 +++          similar information is interesting to determine the device
1699 +++          status and expected life time: Time it's been Reading and
1700 +++          Writing, number of tape Loads / Unloads / Errors.  This
1701 +++          information is not yet recorded as far as I know.
1702 +++
1703 +++          The next step would be implementing drive cleaning setup.
1704 +++          Bacula already has knowledge about cleaning tapes.  Once it has
1705 +++          some information about cleaning cycles (measured in drive run
1706 +++          time, number of tapes used, or calender days, for example) it
1707 +++          can automatically execute tape cleaning (with an autochanger,
1708 +++          obviously) or ask for operator assistence loading a cleaning
1709 +++          tape.
1710 +++
1711 +++          The next step would be to implement TAPEALERT checks not only
1712 +++          when changing tapes and only sending he information to the
1713 +++          administrator, but rather checking after each tape error,
1714 +++          checking on a regular basis (for example after each tape file),
1715 +++          and also before unloading and after loading a new tape.  Then,
1716 +++          depending on the drives TAPEALERT state and the know drive
1717 +++          cleaning state Bacula could automatically schedule later
1718 +++          cleaning, clean immediately, or inform the operator.
1719 +++
1720 +++          Implementing this would perhaps require another catalog change
1721 +++          and perhaps major changes in SD code and the DIR-SD protocoll,
1722 +++          so I'd only consider this worth implementing if it would
1723 +++          actually be used or even needed by many people. 
1724 +++
1725 +++Item 14:  Merging of multiple backups into a single one. (Also called Synthetic
1726 +++          Backup or Consolidation).
1727 +++
1728 +++  Origin: Marc Cousin and Eric Bollengier 
1729 +++  Date:   15 November 2005
1730 +++  Status: Depends on first implementing project Item 1 (Migration).
1731 +++
1732 +++  What:   A merged backup is a backup made without connecting to the Client.
1733 +++          It would be a Merge of existing backups into a single backup.
1734 +++          In effect, it is like a restore but to the backup medium.
1735 +++
1736 +++          For instance, say that last sunday we made a full backup.  Then
1737 +++          all week long, we created incremental backups, in order to do
1738 +++          them fast.  Now comes sunday again, and we need another full.
1739 +++          The merged backup makes it possible to do instead an incremental
1740 +++          backup (during the night for instance), and then create a merged
1741 +++          backup during the day, by using the full and incrementals from
1742 +++          the week.  The merged backup will be exactly like a full made
1743 +++          sunday night on the tape, but the production interruption on the
1744 +++          Client will be minimal, as the Client will only have to send
1745 +++          incrementals.
1746 +++
1747 +++          In fact, if it's done correctly, you could merge all the
1748 +++          Incrementals into single Incremental, or all the Incrementals
1749 +++          and the last Differential into a new Differential, or the Full,
1750 +++          last differential and all the Incrementals into a new Full
1751 +++          backup.  And there is no need to involve the Client.
1752 +++
1753 +++  Why:    The benefit is that :
1754 +++          - the Client just does an incremental ;
1755 +++          - the merged backup on tape is just as a single full backup,
1756 +++            and can be restored very fast.
1757 +++
1758 +++          This is also a way of reducing the backup data since the old
1759 +++          data can then be pruned (or not) from the catalog, possibly
1760 +++          allowing older volumes to be recycled
1761 +++
1762 +++Item 15:  Automatic disabling of devices
1763 +++   Date:   2005-11-11
1764 +++   Origin: Peter Eriksson <peter at ifm.liu dot se>
1765 +++   Status:
1766 +++
1767 +++   What:  After a configurable amount of fatal errors with a tape drive
1768 +++          Bacula should automatically disable further use of a certain
1769 +++          tape drive. There should also be "disable"/"enable" commands in
1770 +++          the "bconsole" tool.
1771 +++
1772 +++   Why:   On a multi-drive jukebox there is a possibility of tape drives
1773 +++          going bad during large backups (needing a cleaning tape run,
1774 +++          tapes getting stuck). It would be advantageous if Bacula would
1775 +++          automatically disable further use of a problematic tape drive
1776 +++          after a configurable amount of errors has occured.
1777 +++
1778 +++          An example: I have a multi-drive jukebox (6 drives, 380+ slots)
1779 +++          where tapes occasionally get stuck inside the drive. Bacula will
1780 +++          notice that the "mtx-changer" command will fail and then fail
1781 +++          any backup jobs trying to use that drive. However, it will still
1782 +++          keep on trying to run new jobs using that drive and fail -
1783 +++          forever, and thus failing lots and lots of jobs... Since we have
1784 +++          many drives Bacula could have just automatically disabled
1785 +++          further use of that drive and used one of the other ones
1786 +++          instead.
1787 +++
1788 +++
1789 +++Item 16:  Directive/mode to backup only file changes, not entire file
1790 +++  Date:   11 November 2005
1791 +++  Origin: Joshua Kugler <joshua dot kugler at uaf dot edu>
1792 +++          Marek Bajon <mbajon at bimsplus dot com dot pl>
1793 +++  Status: RFC
1794 +++
1795 +++  What:   Currently when a file changes, the entire file will be backed up in
1796 +++          the next incremental or full backup.  To save space on the tapes
1797 +++          it would be nice to have a mode whereby only the changes to the
1798 +++          file would be backed up when it is changed.
1799 +++
1800 +++  Why:    This would save lots of space when backing up large files such as 
1801 +++          logs, mbox files, Outlook PST files and the like.
1802 +++
1803 +++  Notes:  This would require the usage of disk-based volumes as comparing 
1804 +++          files would not be feasible using a tape drive.
1805 +++
1806 +++Item 17:  Quick release of FD-SD connection
1807 +++  Origin: Frank Volf (frank at deze dot org)
1808 +++  Date:   17 november 2005
1809 +++  Status:
1810 +++
1811 +++   What:  In the bacula implementation a backup is finished after all data
1812 +++          and attributes are succesfully written to storage.  When using a
1813 +++          tape backup it is very annoying that a backup can take a day,
1814 +++          simply because the current tape (or whatever) is full and the
1815 +++          administrator has not put a new one in.  During that time the
1816 +++          system cannot be taken off-line, because there is still an open
1817 +++          session between the storage daemon and the file daemon on the
1818 +++          client.
1819 +++
1820 +++          Although this is a very good strategey for making "safe backups"
1821 +++          This can be annoying for e.g.  laptops, that must remain
1822 +++          connected until the bacukp is completed.
1823 +++
1824 +++          Using a new feature called "migration" it will be possible to
1825 +++          spool first to harddisk (using a special 'spool' migration
1826 +++          scheme) and then migrate the backup to tape.
1827 +++
1828 +++          There is still the problem of getting the attributes committed.
1829 +++          If it takes a very long time to do, with the current code, the
1830 +++          job has not terminated, and the File daemon is not freed up.  The
1831 +++          Storage daemon should release the File daemon as soon as all the
1832 +++          file data and all the attributes have been sent to it (the SD).
1833 +++          Currently the SD waits until everything is on tape and all the
1834 +++          attributes are transmitted to the Director before signalling
1835 +++          completion to the FD. I don't think I would have any problem
1836 +++          changing this.  The reason is that even if the FD reports back to
1837 +++          the Dir that all is OK, the job will not terminate until the SD
1838 +++          has done the same thing -- so in a way keeping the SD-FD link
1839 +++          open to the very end is not really very productive ...
1840 ++ 
1841 +++   Why:   Makes backup of laptops much easier.
1842 ++ 
1843 ++ 
1844 ++ ============= Empty RFC form ===========
1845 ++@@ -245,33 +413,4 @@
1846 ++ ============== End RFC form ==============
1847 ++ 
1848 ++ 
1849 ++-Items completed for release 1.38.0:
1850 ++-#4   Embedded Python Scripting (implemented in all Daemons)
1851 ++-#5   Events that call a Python program (Implemented in all
1852 ++-       daemons, but more cleanup work to be done).
1853 ++-#6   Select one from among Multiple Storage Devices for Job.
1854 ++-       This is already implemented in 1.37.
1855 ++-#7   Single Job Writing to Multiple Storage Devices. This is
1856 ++-       currently implemented with a Clone feature.
1857 ++-#-   Full multiple drive Autochanger support (done in 1.37)
1858 ++-#-   Built in support for communications encryption (TLS) 
1859 ++-       done by Landon Fuller.
1860 ++-#    Support for Unicode characters
1861 ++-       (via UTF-8) on Win32 machines thanks to Thorsten Engel.
1862 ++-Item  8:  Break the one-to-one Relationship between a Job and a
1863 ++-          Specific Storage Device (or Devices if #10 is implemented).
1864 ++-
1865 ++-Completed items from last year's list:
1866 ++-Item 1:   Multiple simultaneous Jobs. (done)
1867 ++-Item 3:   Write the bscan program -- also write a bcopy program (done).
1868 ++-Item 5:   Implement Label templates (done).
1869 ++-Item 6:   Write a regression script (done)
1870 ++-Item 9:   Add SSL to daemon communications (done by Landon Fuller)
1871 ++-Item 10:  Define definitive tape format (done)
1872 ++-Item 3:   GUI for interactive restore. Partially Implemented in 1.34
1873 ++-          Note, there is now a complete Webmin plugin, a partial
1874 ++-          GNOME console, and an excellent wx-console GUI.
1875 ++-Item 4:   GUI for interactive backup
1876 ++-Item 2:   Job Data Spooling.
1877 ++-    Done: Regular expression matching.
1878 ++-Item 10:  New daemon communication protocol (this has been dropped).
1879 +++Items completed for release 1.38.0 -- see kernsdone
1880 ++Index: autoconf/configure.in
1881 ++===================================================================
1882 ++RCS file: /cvsroot/bacula/bacula/autoconf/configure.in,v
1883 ++retrieving revision 1.184.2.4
1884 ++diff -u -r1.184.2.4 configure.in
1885 ++--- autoconf/configure.in     13 Nov 2005 10:51:17 -0000      1.184.2.4
1886 +++++ autoconf/configure.in     22 Nov 2005 10:42:21 -0000
1887 ++@@ -604,7 +604,7 @@
1888 ++   PYTHON_LIBS=
1889 ++   if test "$withval" != "no"; then
1890 ++      if test "$withval" = "yes"; then
1891 ++-     for python_root in /usr /usr/local; do
1892 +++     for python_root in /usr /usr/local /usr/sfw; do
1893 ++        if test -f $python_root/include/python2.2/Python.h; then
1894 ++           PYTHON_INCDIR=-I$python_root/include/python2.2
1895 ++           PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
1896 ++Index: patches/1.38.1-to-1.38.2.patch
1897 ++===================================================================
1898 ++RCS file: patches/1.38.1-to-1.38.2.patch
1899 ++diff -N patches/1.38.1-to-1.38.2.patch
1900 ++--- /dev/null 1 Jan 1970 00:00:00 -0000
1901 +++++ patches/1.38.1-to-1.38.2.patch    22 Nov 2005 10:42:22 -0000
1902 ++@@ -0,0 +1,4586 @@
1903 +++
1904 +++ This patch fixes the following bugs:
1905 +++
1906 +++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
1907 +++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
1908 +++  says that this patch does not fix his problem)
1909 +++- Fix cancel failure bug. Bug #481
1910 +++- Fix failure when Pool name has spaces. Bug #487
1911 +++- Fix SD crash in autochanger code. Mutex failure. Bug #488
1912 +++- Fix a couple of free()s in src/filed/acl.c
1913 +++- Fix memory overrun in bfile.c in building OS X resource
1914 +++  fork filename. Bug #489
1915 +++
1916 +++This patch is applied to Bacula source version 1.38.1 and will
1917 +++produce Bacula source version 1.38.2.  Apply it with:
1918 +++
1919 +++   cd <bacula-1.38.1-source>
1920 +++   ./configure (your options) if not already done
1921 +++   patch -p0 <1.38.1-to-1.38.2.patch
1922 +++   make
1923 +++   make install
1924 +++
1925 +++? osx_finder.patch
1926 +++Index: ChangeLog
1927 +++===================================================================
1928 +++RCS file: /cvsroot/bacula/bacula/ChangeLog,v
1929 +++retrieving revision 1.154.2.7
1930 +++diff -u -r1.154.2.7 ChangeLog
1931 +++--- ChangeLog        15 Nov 2005 09:27:19 -0000      1.154.2.7
1932 ++++++ ChangeLog        21 Nov 2005 18:19:03 -0000
1933 +++@@ -1,4 +1,14 @@
1934 +++ 
1935 ++++Changes to 1.38.2:
1936 ++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
1937 ++++- Fix bnet-server bug found on OpenBSD. Bug #486
1938 ++++- Fix cancel failure bug. Bug #481
1939 ++++- Fix failure when Pool name has spaces. Bug #487   
1940 ++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
1941 ++++- Fix a couple of free()s in src/filed/acl.c
1942 ++++- Fix memory overrun in bfile.c in building OS X resource
1943 ++++  fork filename. Bug #489 
1944 ++++- Add Pool name to SD status output.
1945 +++ 
1946 +++ Changes to 1.38.1:
1947 +++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
1948 +++Index: ReleaseNotes
1949 +++===================================================================
1950 +++RCS file: /cvsroot/bacula/bacula/ReleaseNotes,v
1951 +++retrieving revision 1.147.2.9
1952 +++diff -u -r1.147.2.9 ReleaseNotes
1953 +++--- ReleaseNotes     15 Nov 2005 09:27:19 -0000      1.147.2.9
1954 ++++++ ReleaseNotes     21 Nov 2005 18:19:04 -0000
1955 +++@@ -1,10 +1,21 @@
1956 +++ 
1957 +++-          Release Notes for Bacula 1.38.1
1958 ++++          Release Notes for Bacula 1.38.2
1959 +++ 
1960 +++   Bacula code: Total files = 420 Total lines = 138,440 (*.h *.c *.in)
1961 +++       20,440 additional lines of code since version 1.36.3
1962 +++ 
1963 +++-Changes since 1.38.0:
1964 ++++Changes to 1.38.2:
1965 ++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
1966 ++++- Fix bnet-server bug found on OpenBSD. Bug #486
1967 ++++- Fix cancel failure bug. Bug #481
1968 ++++- Fix failure when Pool name has spaces. Bug #487   
1969 ++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
1970 ++++- Fix a couple of free()s in src/filed/acl.c
1971 ++++- Fix memory overrun in bfile.c in building OS X resource
1972 ++++  fork filename. Bug #489 
1973 ++++- Add Pool name to SD status output.
1974 ++++
1975 ++++Changes to 1.38.1:
1976 +++ - Corrected ACL for Solaris (David Duchscher and Attila Fulop).
1977 +++ - Add bacula_mail_summary.sh to examples directory. It makes
1978 +++   a single email summary of any number of jobs. Submitted
1979 +++Index: kernstodo
1980 +++===================================================================
1981 +++RCS file: /cvsroot/bacula/bacula/kernstodo,v
1982 +++retrieving revision 1.570.2.6
1983 +++diff -u -r1.570.2.6 kernstodo
1984 +++--- kernstodo        4 Nov 2005 09:16:49 -0000       1.570.2.6
1985 ++++++ kernstodo        21 Nov 2005 18:19:04 -0000
1986 +++@@ -1,5 +1,5 @@
1987 +++                     Kern's ToDo List
1988 +++-                     03 November 2005
1989 ++++                     21 November 2005
1990 +++ 
1991 +++ Major development:      
1992 +++ Project                     Developer
1993 +++@@ -7,8 +7,6 @@
1994 +++ Version 1.37                Kern (see below)
1995 +++ ========================================================
1996 +++ 
1997 +++-Final items for 1.37 before release:
1998 +++-
1999 +++ Document:
2000 +++ - Does ClientRunAfterJob fail the job on a bad return code?
2001 +++ - Document cleaning up the spool files:
2002 +++@@ -18,6 +16,8 @@
2003 +++ - Does WildFile match against full name?  Doc.
2004 +++ 
2005 +++ For 1.39:
2006 ++++- Make sure that all do_prompt() calls in Dir check for
2007 ++++  -1 (error) and -2 (cancel) returns.
2008 +++ - Look at -D_FORTIFY_SOURCE=2
2009 +++ - Add Win32 FileSet definition somewhere
2010 +++ - Look at fixing restore status stats in SD.
2011 +++@@ -27,6 +27,12 @@
2012 +++   encountered, read many times (as it currently does), and if the
2013 +++   block cannot be read, skip to the next block, and try again.  If
2014 +++   that fails, skip to the next file and try again, ...
2015 ++++- Add level table:
2016 ++++  create table LevelType (LevelType binary(1), LevelTypeLong tinyblob);
2017 ++++  insert into LevelType (LevelType,LevelTypeLong) values
2018 ++++  ("F","Full"),
2019 ++++  ("D","Diff"),
2020 ++++  ("I","Inc");
2021 +++ - Add ACL to restore only to original location.
2022 +++ - Add a recursive mark command (rmark) to restore.
2023 +++ - "Minimum Job Interval = nnn" sets minimum interval between Jobs
2024 +++@@ -1246,219 +1252,4 @@
2025 +++ ====
2026 +++ 
2027 +++ 
2028 +++-=== Done
2029 +++-- Save mount point for directories not traversed with onefs=yes.
2030 +++-- Add seconds to start and end times in the Job report output.
2031 +++-- if 2 concurrent backups are attempted on the same tape
2032 +++-  drive (autoloader) into different tape pools, one of them will exit
2033 +++-  fatally instead of halting until the drive is idle
2034 +++-- Update StartTime if job held in Job Queue.
2035 +++-- Look at www.nu2.nu/pebuilder as a helper for full windows
2036 +++-  bare metal restore. (done by Scott)
2037 +++-- Fix orphanned buffers:
2038 +++-   Orphaned buffer:      24 bytes allocated at line 808 of rufus-dir job.c
2039 +++-   Orphaned buffer:      40 bytes allocated at line 45 of rufus-dir alist.c
2040 +++-- Implement Preben's suggestion to add
2041 +++-  File System Types = ext2, ext3 
2042 +++-  to FileSets, thus simplifying backup of *all* local partitions.
2043 +++-- Try to open a device on each Job if it was not opened
2044 +++-  when the SD started.
2045 +++-- Add dump of VolSessionId/Time and FileIndex with bls.
2046 +++-- If Bacula does not find the right tape in the Autochanger,
2047 +++-  then mark the tape in error and move on rather than asking
2048 +++-  for operator intervention.
2049 +++-- Cancel command should include JobId in list of Jobs.
2050 +++-- Add performance testing hooks
2051 +++-- Bootstrap from JobMedia records.
2052 +++-- Implement WildFile and WildDir to solve problem of 
2053 +++-  saving only *.doc files.
2054 +++-- Fix
2055 +++-   Please use the "label"  command to create a new Volume for:
2056 +++-       Storage:      DDS-4-changer
2057 +++-       Media type:   
2058 +++-       Pool:         Default
2059 +++-   label
2060 +++-   The defined Storage resources are:
2061 +++-- Copy Changer Device and Changer Command from Autochanger
2062 +++-  to Device resource in SD if none given in Device resource.
2063 +++-- 1. Automatic use of more than one drive in an autochanger (done)
2064 +++-- 2. Automatic selection of the correct drive for each Job (i.e.
2065 +++-     selects a drive with an appropriate Volume for the Job) (done)
2066 +++-- 6. Allow multiple simultaneous Jobs referencing the same pool write
2067 +++-    to several tapes (some new directive(s) are are probably needed for
2068 +++-    this) (done)
2069 +++-- Locking (done)
2070 +++-- Key on Storage rather than Pool (done)
2071 +++-- Allow multiple drives to use same Pool (change jobq.c DIR) (done).
2072 +++-- Synchronize multiple drives so that not more
2073 +++-  than one loads a tape and any time (done)
2074 +++-- 4. Use Changer Device and Changer Command specified in the
2075 +++-     Autochanger resource, if none is found in the Device resource.
2076 +++-    You can continue to specify them in the Device resource if you want
2077 +++-    or need them to be different for each device.
2078 +++-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") 
2079 +++-    that can allow a Device be part of an Autochanger, and hence the changer
2080 +++-    script protected, but if set to no, will prevent the Device from being 
2081 +++-    automatically selected from the changer. This allows the device to
2082 +++-    be directly accessed through its Device name, but not through the
2083 +++-    AutoChanger name.
2084 +++-#6   Select one from among Multiple Storage Devices for Job
2085 +++-#5   Events that call a Python program 
2086 +++-     (Implemented in Dir/SD)
2087 +++-- Make sure the Device name is in the Query packet returned.
2088 +++-- Don't start a second file job if one is already running.
2089 +++-- Implement EOF/EOV labels for ANSI labels
2090 +++-- Implement IBM labels.
2091 +++-- When Python creates a new label, the tape is immediately
2092 +++-  recycled and no label created. This happens when using   
2093 +++-  autolabeling -- even when Python doesn't generate the name.
2094 +++-- Scratch Pool where the volumes can be re-assigned to any Pool.
2095 +++-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) 
2096 +++-  is busy reading. Job 6 canceled.
2097 +++-- Remove separate thread for opening devices in SD.  On the other
2098 +++-  hand, don't block waiting for open() for devices.
2099 +++-- Fix code to either handle updating NumVol or to calculate it in
2100 +++-  Dir next_vol.c
2101 +++-- Ensure that you cannot exclude a directory or a file explicitly
2102 +++-  Included with File.
2103 +++-#4   Embedded Python Scripting 
2104 +++-     (Implemented in Dir/SD/FD)
2105 +++-- Add Python writable variable for changing the Priority,
2106 +++-    Client, Storage, JobStatus (error), ...
2107 +++-- SD Python
2108 +++-  - Solicit Events
2109 +++-- Add disk seeking on restore; turn off seek on tapes.
2110 +++-  stored/match_bsr.c
2111 +++-- Look at dird_conf.c:1000: warning: `int size' 
2112 +++-  might be used uninitialized in this function
2113 +++-- Indicate when a Job is purged/pruned during restore.
2114 +++-- Implement some way to turn off automatic pruning in Jobs.
2115 +++-- Implement a way an Admin Job can prune, possibly multiple
2116 +++-  clients -- Python script?
2117 +++-- Look at Preben's acl.c error handling code.
2118 +++-- SD crashes after a tape restore then doing a backup. 
2119 +++-- If drive is opened read/write, close it and re-open
2120 +++-  read-only if doing a restore, and vice-versa.
2121 +++-- Windows restore:
2122 +++-  data-fd: RestoreFiles.2004-12-07_15.56.42 Error:
2123 +++-  > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der
2124 +++-  > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen
2125 +++-  > Prozess verwendet wird.
2126 +++-  Restore restores all files, but then fails at the end trying
2127 +++-  to set the attributes of e:
2128 +++-  from failed jobs.- Resolve the problem between Device name and Archive name,
2129 +++-  and fix SD messages.
2130 +++-- Tell the "restore" user when browsing is no longer possible.
2131 +++-- Add a restore directory-x
2132 +++-- Write non-optimized bsrs from the JobMedia and Media records,
2133 +++-  even after Files are pruned.
2134 +++-- Delete Stripe and Copy from VolParams to save space.
2135 +++-- Fix option 2 of restore -- list where file is backed up -- require Client,
2136 +++-  then list last 20 backups.
2137 +++-- Finish implementation of passing all Storage and Device needs to
2138 +++-  the SD.
2139 +++-- Move test for max wait time exceeded in job.c up -- Peter's idea.
2140 +++-##   Consider moving docs to their own project.
2141 +++-##   Move rescue to its own project.
2142 +++-- Add client version to the Client name line that prints in
2143 +++-  the Job report.
2144 +++-- Fix the Rescue CDROM.
2145 +++-- By the way: on page http://www.bacula.org/?page=tapedrives , at the 
2146 +++-  bottom, the link to "Tape Testing Chapter" is broken. It goes to 
2147 +++-  /html-manual/... while the others point to /rel-manual/...
2148 +++-- Device resource needs the "name" of the SD.
2149 +++-- Specify a single directory to restore.
2150 +++-- Implement MediaType keyword in bsr?   
2151 +++-- Add a date and time stamp at the beginning of every line in the 
2152 +++-  Job report (Volker Sauer).
2153 +++-- Add level to estimate command.
2154 +++-- Add "limit=n" for "list jobs"
2155 +++-- Make bootstrap filename unique.
2156 +++-- Make Dmsg look at global before calling subroutine.
2157 +++-- From Chris Hull:
2158 +++-   it seems to be complaining about 12:00pm which should be a valid 12
2159 +++-   hour time.  I changed the time to 11:59am and everything works fine.
2160 +++-   Also 12:00am works fine.  0:00pm also works (which I don't think
2161 +++-   should).  None of the values 12:00pm - 12:59pm work for that matter.
2162 +++-- Require restore via the restore command or make a restore Job
2163 +++-  get the bootstrap file.
2164 +++-- Implement Maximum Job Spool Size
2165 +++-- Fix 3993 error in SD. It forgets to look at autochanger
2166 +++-  resource for device command, ...
2167 +++-- 3. Prevent two drives requesting the same Volume in any given
2168 +++-     autochanger, by checking if a Volume is mounted on another drive
2169 +++-     in an Autochanger.
2170 +++-- Upgrade to MySQL 4.1.12 See:  
2171 +++-  http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html
2172 +++-- Add # Job Level date to bsr file
2173 +++-- Implement "PreferMountedVolumes = yes|no" in Job resource.
2174 +++-##   Integrate web-bacula into a new Bacula project with
2175 +++-     bimagemgr.
2176 +++-- Cleaning tapes should have Status "Cleaning" rather than append.
2177 +++-- Make sure that Python has access to Client address/port so that
2178 +++-  it can check if Clients are alive.
2179 +++-- Review all items in "restore".
2180 +++-- Fix PostgreSQL GROUP BY problems in restore.
2181 +++-- Fix PostgreSQL sql problems in bugs.
2182 +++-- After rename
2183 +++-  04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume 
2184 +++-     "DLT-13Feb04".
2185 +++-  Current Volume "DLT-04Jul05" not acceptable because:
2186 +++-  1997 Volume "DLT-13Feb04" not in catalog.
2187 +++-  04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device 
2188 +++-     "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02
2189 +++-##   Create a new GUI chapter explaining all the GUI programs.
2190 +++--    Make "update slots" when pointing to Autochanger, remove
2191 +++-     all Volumes from other drives.  "update slots all-drives"?
2192 +++-     No, this is done by modifying mtx-changer to list what is
2193 +++-     in the drives.
2194 +++-- Finish TLS implementation.
2195 +++-- Port limiting -m in iptables to prevent DoS attacks
2196 +++-  could cause broken pipes on Bacula.
2197 +++-6. Build and test the Volume Shadow Copy (VSS) for Win32. 
2198 +++--  Allow cancel of unknown Job
2199 +++--  State not saved when closing Win32 FD by icon
2200 +++--  bsr-opt-test fails. bsr deleted. Fix.
2201 +++--  Move Python daemon variables from Job to Bacula object.
2202 +++-   WorkingDir, ConfigFile
2203 +++-- Document that Bootstrap files can be written with cataloging
2204 +++-  turned off.
2205 +++-- Document details of ANSI/IBM labels
2206 +++-- OS linux 2.4
2207 +++-  1) ADIC, DLT, FastStor 4000, 7*20GB
2208 +++-- Linux Sony LIB-D81, AIT-3 library works.
2209 +++-- Doc the following
2210 +++-  to activate, check or disable the hardware compression feature on my 
2211 +++-  exb-8900 i use the exabyte "MammothTool" you can get it here:
2212 +++-  http://www.exabyte.com/support/online/downloads/index.cfm
2213 +++-  There is a solaris version of this tool. With option -C 0 or 1 you can 
2214 +++-  disable or activate compression. Start this tool without any options for 
2215 +++-  a small reference.
2216 +++-- Document Heartbeat Interval in the dealing with firewalls section.
2217 +++-- Document new CDROM directory.
2218 +++-- On Win32 working directory must have drive letter ????
2219 +++-- On Win32 working directory must be writable by SYSTEM to
2220 +++-  do restores.
2221 +++-- Document that ChangerDevice is used for Alert command.
2222 +++-- Add better documentation on how restores can be done
2223 +++-8. Take one more try at making DVD writing work (no go)
2224 +++-7. Write a bacula-web document
2225 +++-- Why isn't the DEVICE structure defined when doing
2226 +++-  a reservation?
2227 +++-- Multi-drive changer seems to only use drive 0
2228 +++-  Multiple drives don't seem to be opened.
2229 +++-- My database is growing
2230 +++-- Call GetLastError() in the berrno constructor rather
2231 +++-  than delaying until strerror.
2232 +++-- Tape xxx in drive 0, requested in drive 1
2233 +++-- The mount command does not work with drives other than 0.
2234 +++-- A mount should cause the SD to re-examine what Slot is   
2235 +++-  loaded.
2236 +++-- The SD locks on to the first available drive then
2237 +++-  wants a Volume that is released but in another drive --
2238 +++-  chaos.
2239 +++-- Run the regression scripts on Solaris and FreeBSD
2240 +++--  Figure out how to package gui, and rescue programs.
2241 +++-- Add a .dir command to restore tree code to eliminate the problem
2242 +++-- Mount after manually unloading changer causes hang in SD
2243 +++-- Fix JobACL with restore by JobId.
2244 ++++=== Done -- see kernsdone
2245 +++Index: kes-1.38
2246 +++===================================================================
2247 +++RCS file: /cvsroot/bacula/bacula/kes-1.38,v
2248 +++retrieving revision 1.1.2.13
2249 +++diff -u -r1.1.2.13 kes-1.38
2250 +++--- kes-1.38 14 Nov 2005 20:20:38 -0000      1.1.2.13
2251 ++++++ kes-1.38 21 Nov 2005 18:19:04 -0000
2252 +++@@ -3,6 +3,19 @@
2253 +++ 
2254 +++ General:
2255 +++ 
2256 ++++Changes to 1.38.2:
2257 ++++20Oct05
2258 ++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
2259 ++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
2260 ++++  says this does not fix *his* bug).
2261 ++++- Fix cancel failure bug. Bug #481
2262 ++++- Fix failure when Pool name has spaces. Bug #487   
2263 ++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
2264 ++++- Fix a couple of free()s in src/filed/acl.c
2265 ++++- Fix memory overrun in bfile.c in building OS X resource
2266 ++++  fork filename. Bug #489 
2267 ++++- Add Pool name to SD status output.
2268 ++++
2269 +++ Changes to 1.38.1:
2270 +++ 14Oct05
2271 +++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
2272 +++Index: projects
2273 +++===================================================================
2274 +++RCS file: /cvsroot/bacula/bacula/projects,v
2275 +++retrieving revision 1.12.2.3
2276 +++diff -u -r1.12.2.3 projects
2277 +++--- projects 10 Nov 2005 20:25:27 -0000      1.12.2.3
2278 ++++++ projects 21 Nov 2005 18:19:05 -0000
2279 +++@@ -228,7 +228,175 @@
2280 +++ 
2281 +++   Why:    Performance enhancement.
2282 +++ 
2283 ++++Item 13:  Let Bacula log tape usage and handle drive cleaning cycles.
2284 ++++  Date:   November 11, 2005
2285 ++++  Origin: Arno Lehmann <al at its-lehmann dot de>
2286 ++++  Status:
2287 ++++
2288 ++++  What:   Make Bacula manage tape life cycle information and drive 
2289 ++++          cleaning cycles.
2290 ++++
2291 ++++  Why:    Both parts of this project are important when operating backups.
2292 ++++          We need to know which tapes need replacement, and we need to
2293 ++++          make sure the drives are cleaned when necessary.  While many
2294 ++++          tape libraries and even autoloaders can handle all this
2295 ++++          automatically, support by Bacula can be helpful for smaller
2296 ++++          (older) libraries and single drives.  Also, checking drive
2297 ++++          status during operation can prevent some failures (as I had to
2298 ++++          learn the hard way...)
2299 ++++
2300 ++++  Notes:  First, Bacula could (and even does, to some limited extent)
2301 ++++          record tape and drive usage.  For tapes, the number of mounts,
2302 ++++          the amount of data, and the time the tape has actually been
2303 ++++          running could be recorded.  Data fields for Read and Write time
2304 ++++          and Nmber of mounts already exist in the catalog (I'm not sure
2305 ++++          if VolBytes is the sum of all bytes ever written to that volume
2306 ++++          by Bacula).  This information can be important when determining
2307 ++++          which media to replace.  For the tape drives known to Bacula,
2308 ++++          similar information is interesting to determine the device
2309 ++++          status and expected life time: Time it's been Reading and
2310 ++++          Writing, number of tape Loads / Unloads / Errors.  This
2311 ++++          information is not yet recorded as far as I know.
2312 ++++
2313 ++++          The next step would be implementing drive cleaning setup.
2314 ++++          Bacula already has knowledge about cleaning tapes.  Once it has
2315 ++++          some information about cleaning cycles (measured in drive run
2316 ++++          time, number of tapes used, or calender days, for example) it
2317 ++++          can automatically execute tape cleaning (with an autochanger,
2318 ++++          obviously) or ask for operator assistence loading a cleaning
2319 ++++          tape.
2320 ++++
2321 ++++          The next step would be to implement TAPEALERT checks not only
2322 ++++          when changing tapes and only sending he information to the
2323 ++++          administrator, but rather checking after each tape error,
2324 ++++          checking on a regular basis (for example after each tape file),
2325 ++++          and also before unloading and after loading a new tape.  Then,
2326 ++++          depending on the drives TAPEALERT state and the know drive
2327 ++++          cleaning state Bacula could automatically schedule later
2328 ++++          cleaning, clean immediately, or inform the operator.
2329 ++++
2330 ++++          Implementing this would perhaps require another catalog change
2331 ++++          and perhaps major changes in SD code and the DIR-SD protocoll,
2332 ++++          so I'd only consider this worth implementing if it would
2333 ++++          actually be used or even needed by many people. 
2334 ++++
2335 ++++Item 14:  Merging of multiple backups into a single one. (Also called Synthetic
2336 ++++          Backup or Consolidation).
2337 ++++
2338 ++++  Origin: Marc Cousin and Eric Bollengier 
2339 ++++  Date:   15 November 2005
2340 ++++  Status: Depends on first implementing project Item 1 (Migration).
2341 ++++
2342 ++++  What:   A merged backup is a backup made without connecting to the Client.
2343 ++++          It would be a Merge of existing backups into a single backup.
2344 ++++          In effect, it is like a restore but to the backup medium.
2345 ++++
2346 ++++          For instance, say that last sunday we made a full backup.  Then
2347 ++++          all week long, we created incremental backups, in order to do
2348 ++++          them fast.  Now comes sunday again, and we need another full.
2349 ++++          The merged backup makes it possible to do instead an incremental
2350 ++++          backup (during the night for instance), and then create a merged
2351 ++++          backup during the day, by using the full and incrementals from
2352 ++++          the week.  The merged backup will be exactly like a full made
2353 ++++          sunday night on the tape, but the production interruption on the
2354 ++++          Client will be minimal, as the Client will only have to send
2355 ++++          incrementals.
2356 ++++
2357 ++++          In fact, if it's done correctly, you could merge all the
2358 ++++          Incrementals into single Incremental, or all the Incrementals
2359 ++++          and the last Differential into a new Differential, or the Full,
2360 ++++          last differential and all the Incrementals into a new Full
2361 ++++          backup.  And there is no need to involve the Client.
2362 ++++
2363 ++++  Why:    The benefit is that :
2364 ++++          - the Client just does an incremental ;
2365 ++++          - the merged backup on tape is just as a single full backup,
2366 ++++            and can be restored very fast.
2367 ++++
2368 ++++          This is also a way of reducing the backup data since the old
2369 ++++          data can then be pruned (or not) from the catalog, possibly
2370 ++++          allowing older volumes to be recycled
2371 ++++
2372 ++++Item 15:  Automatic disabling of devices
2373 ++++   Date:   2005-11-11
2374 ++++   Origin: Peter Eriksson <peter at ifm.liu dot se>
2375 ++++   Status:
2376 ++++
2377 ++++   What:  After a configurable amount of fatal errors with a tape drive
2378 ++++          Bacula should automatically disable further use of a certain
2379 ++++          tape drive. There should also be "disable"/"enable" commands in
2380 ++++          the "bconsole" tool.
2381 ++++
2382 ++++   Why:   On a multi-drive jukebox there is a possibility of tape drives
2383 ++++          going bad during large backups (needing a cleaning tape run,
2384 ++++          tapes getting stuck). It would be advantageous if Bacula would
2385 ++++          automatically disable further use of a problematic tape drive
2386 ++++          after a configurable amount of errors has occured.
2387 ++++
2388 ++++          An example: I have a multi-drive jukebox (6 drives, 380+ slots)
2389 ++++          where tapes occasionally get stuck inside the drive. Bacula will
2390 ++++          notice that the "mtx-changer" command will fail and then fail
2391 ++++          any backup jobs trying to use that drive. However, it will still
2392 ++++          keep on trying to run new jobs using that drive and fail -
2393 ++++          forever, and thus failing lots and lots of jobs... Since we have
2394 ++++          many drives Bacula could have just automatically disabled
2395 ++++          further use of that drive and used one of the other ones
2396 ++++          instead.
2397 ++++
2398 ++++
2399 ++++Item 16:  Directive/mode to backup only file changes, not entire file
2400 ++++  Date:   11 November 2005
2401 ++++  Origin: Joshua Kugler <joshua dot kugler at uaf dot edu>
2402 ++++          Marek Bajon <mbajon at bimsplus dot com dot pl>
2403 ++++  Status: RFC
2404 ++++
2405 ++++  What:   Currently when a file changes, the entire file will be backed up in
2406 ++++          the next incremental or full backup.  To save space on the tapes
2407 ++++          it would be nice to have a mode whereby only the changes to the
2408 ++++          file would be backed up when it is changed.
2409 ++++
2410 ++++  Why:    This would save lots of space when backing up large files such as 
2411 ++++          logs, mbox files, Outlook PST files and the like.
2412 ++++
2413 ++++  Notes:  This would require the usage of disk-based volumes as comparing 
2414 ++++          files would not be feasible using a tape drive.
2415 ++++
2416 ++++Item 17:  Quick release of FD-SD connection
2417 ++++  Origin: Frank Volf (frank at deze dot org)
2418 ++++  Date:   17 november 2005
2419 ++++  Status:
2420 ++++
2421 ++++   What:  In the bacula implementation a backup is finished after all data
2422 ++++          and attributes are succesfully written to storage.  When using a
2423 ++++          tape backup it is very annoying that a backup can take a day,
2424 ++++          simply because the current tape (or whatever) is full and the
2425 ++++          administrator has not put a new one in.  During that time the
2426 ++++          system cannot be taken off-line, because there is still an open
2427 ++++          session between the storage daemon and the file daemon on the
2428 ++++          client.
2429 ++++
2430 ++++          Although this is a very good strategey for making "safe backups"
2431 ++++          This can be annoying for e.g.  laptops, that must remain
2432 ++++          connected until the bacukp is completed.
2433 ++++
2434 ++++          Using a new feature called "migration" it will be possible to
2435 ++++          spool first to harddisk (using a special 'spool' migration
2436 ++++          scheme) and then migrate the backup to tape.
2437 ++++
2438 ++++          There is still the problem of getting the attributes committed.
2439 ++++          If it takes a very long time to do, with the current code, the
2440 ++++          job has not terminated, and the File daemon is not freed up.  The
2441 ++++          Storage daemon should release the File daemon as soon as all the
2442 ++++          file data and all the attributes have been sent to it (the SD).
2443 ++++          Currently the SD waits until everything is on tape and all the
2444 ++++          attributes are transmitted to the Director before signalling
2445 ++++          completion to the FD. I don't think I would have any problem
2446 ++++          changing this.  The reason is that even if the FD reports back to
2447 ++++          the Dir that all is OK, the job will not terminate until the SD
2448 ++++          has done the same thing -- so in a way keeping the SD-FD link
2449 ++++          open to the very end is not really very productive ...
2450 +++ 
2451 ++++   Why:   Makes backup of laptops much easier.
2452 +++ 
2453 +++ 
2454 +++ ============= Empty RFC form ===========
2455 +++@@ -245,33 +413,4 @@
2456 +++ ============== End RFC form ==============
2457 +++ 
2458 +++ 
2459 +++-Items completed for release 1.38.0:
2460 +++-#4   Embedded Python Scripting (implemented in all Daemons)
2461 +++-#5   Events that call a Python program (Implemented in all
2462 +++-       daemons, but more cleanup work to be done).
2463 +++-#6   Select one from among Multiple Storage Devices for Job.
2464 +++-       This is already implemented in 1.37.
2465 +++-#7   Single Job Writing to Multiple Storage Devices. This is
2466 +++-       currently implemented with a Clone feature.
2467 +++-#-   Full multiple drive Autochanger support (done in 1.37)
2468 +++-#-   Built in support for communications encryption (TLS) 
2469 +++-       done by Landon Fuller.
2470 +++-#    Support for Unicode characters
2471 +++-       (via UTF-8) on Win32 machines thanks to Thorsten Engel.
2472 +++-Item  8:  Break the one-to-one Relationship between a Job and a
2473 +++-          Specific Storage Device (or Devices if #10 is implemented).
2474 +++-
2475 +++-Completed items from last year's list:
2476 +++-Item 1:   Multiple simultaneous Jobs. (done)
2477 +++-Item 3:   Write the bscan program -- also write a bcopy program (done).
2478 +++-Item 5:   Implement Label templates (done).
2479 +++-Item 6:   Write a regression script (done)
2480 +++-Item 9:   Add SSL to daemon communications (done by Landon Fuller)
2481 +++-Item 10:  Define definitive tape format (done)
2482 +++-Item 3:   GUI for interactive restore. Partially Implemented in 1.34
2483 +++-          Note, there is now a complete Webmin plugin, a partial
2484 +++-          GNOME console, and an excellent wx-console GUI.
2485 +++-Item 4:   GUI for interactive backup
2486 +++-Item 2:   Job Data Spooling.
2487 +++-    Done: Regular expression matching.
2488 +++-Item 10:  New daemon communication protocol (this has been dropped).
2489 ++++Items completed for release 1.38.0 -- see kernsdone
2490 +++Index: patches/1.38.1-to-1.38.2.patch
2491 +++===================================================================
2492 +++RCS file: patches/1.38.1-to-1.38.2.patch
2493 +++diff -N patches/1.38.1-to-1.38.2.patch
2494 +++--- /dev/null        1 Jan 1970 00:00:00 -0000
2495 ++++++ patches/1.38.1-to-1.38.2.patch   21 Nov 2005 18:19:05 -0000
2496 +++@@ -0,0 +1,3528 @@
2497 ++++
2498 ++++ This patch fixes the following bugs:
2499 ++++
2500 ++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
2501 ++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
2502 ++++  says that this patch does not fix his problem)
2503 ++++- Fix cancel failure bug. Bug #481
2504 ++++- Fix failure when Pool name has spaces. Bug #487
2505 ++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
2506 ++++- Fix a couple of free()s in src/filed/acl.c
2507 ++++- Fix memory overrun in bfile.c in building OS X resource
2508 ++++  fork filename. Bug #489
2509 ++++
2510 ++++This patch is applied to Bacula source version 1.38.1 and will
2511 ++++produce Bacula source version 1.38.2.  Apply it with:
2512 ++++
2513 ++++   cd <bacula-1.38.1-source>
2514 ++++   ./configure (your options) if not already done
2515 ++++   patch -p0 <1.38.1-to-1.38.2.patch
2516 ++++   make
2517 ++++   make install
2518 ++++
2519 ++++? osx_finder.patch
2520 ++++Index: ChangeLog
2521 ++++===================================================================
2522 ++++RCS file: /cvsroot/bacula/bacula/ChangeLog,v
2523 ++++retrieving revision 1.154.2.7
2524 ++++diff -u -r1.154.2.7 ChangeLog
2525 ++++--- ChangeLog       15 Nov 2005 09:27:19 -0000      1.154.2.7
2526 +++++++ ChangeLog       21 Nov 2005 13:17:56 -0000
2527 ++++@@ -1,4 +1,14 @@
2528 ++++ 
2529 +++++Changes to 1.38.2:
2530 +++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
2531 +++++- Fix bnet-server bug found on OpenBSD. Bug #486
2532 +++++- Fix cancel failure bug. Bug #481
2533 +++++- Fix failure when Pool name has spaces. Bug #487   
2534 +++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
2535 +++++- Fix a couple of free()s in src/filed/acl.c
2536 +++++- Fix memory overrun in bfile.c in building OS X resource
2537 +++++  fork filename. Bug #489 
2538 +++++- Add Pool name to SD status output.
2539 ++++ 
2540 ++++ Changes to 1.38.1:
2541 ++++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
2542 ++++Index: ReleaseNotes
2543 ++++===================================================================
2544 ++++RCS file: /cvsroot/bacula/bacula/ReleaseNotes,v
2545 ++++retrieving revision 1.147.2.9
2546 ++++diff -u -r1.147.2.9 ReleaseNotes
2547 ++++--- ReleaseNotes    15 Nov 2005 09:27:19 -0000      1.147.2.9
2548 +++++++ ReleaseNotes    21 Nov 2005 13:17:57 -0000
2549 ++++@@ -1,10 +1,21 @@
2550 ++++ 
2551 ++++-          Release Notes for Bacula 1.38.1
2552 +++++          Release Notes for Bacula 1.38.2
2553 ++++ 
2554 ++++   Bacula code: Total files = 420 Total lines = 138,440 (*.h *.c *.in)
2555 ++++       20,440 additional lines of code since version 1.36.3
2556 ++++ 
2557 ++++-Changes since 1.38.0:
2558 +++++Changes to 1.38.2:
2559 +++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
2560 +++++- Fix bnet-server bug found on OpenBSD. Bug #486
2561 +++++- Fix cancel failure bug. Bug #481
2562 +++++- Fix failure when Pool name has spaces. Bug #487   
2563 +++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
2564 +++++- Fix a couple of free()s in src/filed/acl.c
2565 +++++- Fix memory overrun in bfile.c in building OS X resource
2566 +++++  fork filename. Bug #489 
2567 +++++- Add Pool name to SD status output.
2568 +++++
2569 +++++Changes to 1.38.1:
2570 ++++ - Corrected ACL for Solaris (David Duchscher and Attila Fulop).
2571 ++++ - Add bacula_mail_summary.sh to examples directory. It makes
2572 ++++   a single email summary of any number of jobs. Submitted
2573 ++++Index: kernstodo
2574 ++++===================================================================
2575 ++++RCS file: /cvsroot/bacula/bacula/kernstodo,v
2576 ++++retrieving revision 1.570.2.6
2577 ++++diff -u -r1.570.2.6 kernstodo
2578 ++++--- kernstodo       4 Nov 2005 09:16:49 -0000       1.570.2.6
2579 +++++++ kernstodo       21 Nov 2005 13:17:57 -0000
2580 ++++@@ -1,5 +1,5 @@
2581 ++++                     Kern's ToDo List
2582 ++++-                     03 November 2005
2583 +++++                     21 November 2005
2584 ++++ 
2585 ++++ Major development:      
2586 ++++ Project                     Developer
2587 ++++@@ -7,8 +7,6 @@
2588 ++++ Version 1.37                Kern (see below)
2589 ++++ ========================================================
2590 ++++ 
2591 ++++-Final items for 1.37 before release:
2592 ++++-
2593 ++++ Document:
2594 ++++ - Does ClientRunAfterJob fail the job on a bad return code?
2595 ++++ - Document cleaning up the spool files:
2596 ++++@@ -18,6 +16,8 @@
2597 ++++ - Does WildFile match against full name?  Doc.
2598 ++++ 
2599 ++++ For 1.39:
2600 +++++- Make sure that all do_prompt() calls in Dir check for
2601 +++++  -1 (error) and -2 (cancel) returns.
2602 ++++ - Look at -D_FORTIFY_SOURCE=2
2603 ++++ - Add Win32 FileSet definition somewhere
2604 ++++ - Look at fixing restore status stats in SD.
2605 ++++@@ -27,6 +27,12 @@
2606 ++++   encountered, read many times (as it currently does), and if the
2607 ++++   block cannot be read, skip to the next block, and try again.  If
2608 ++++   that fails, skip to the next file and try again, ...
2609 +++++- Add level table:
2610 +++++  create table LevelType (LevelType binary(1), LevelTypeLong tinyblob);
2611 +++++  insert into LevelType (LevelType,LevelTypeLong) values
2612 +++++  ("F","Full"),
2613 +++++  ("D","Diff"),
2614 +++++  ("I","Inc");
2615 ++++ - Add ACL to restore only to original location.
2616 ++++ - Add a recursive mark command (rmark) to restore.
2617 ++++ - "Minimum Job Interval = nnn" sets minimum interval between Jobs
2618 ++++@@ -1246,219 +1252,4 @@
2619 ++++ ====
2620 ++++ 
2621 ++++ 
2622 ++++-=== Done
2623 ++++-- Save mount point for directories not traversed with onefs=yes.
2624 ++++-- Add seconds to start and end times in the Job report output.
2625 ++++-- if 2 concurrent backups are attempted on the same tape
2626 ++++-  drive (autoloader) into different tape pools, one of them will exit
2627 ++++-  fatally instead of halting until the drive is idle
2628 ++++-- Update StartTime if job held in Job Queue.
2629 ++++-- Look at www.nu2.nu/pebuilder as a helper for full windows
2630 ++++-  bare metal restore. (done by Scott)
2631 ++++-- Fix orphanned buffers:
2632 ++++-   Orphaned buffer:      24 bytes allocated at line 808 of rufus-dir job.c
2633 ++++-   Orphaned buffer:      40 bytes allocated at line 45 of rufus-dir alist.c
2634 ++++-- Implement Preben's suggestion to add
2635 ++++-  File System Types = ext2, ext3 
2636 ++++-  to FileSets, thus simplifying backup of *all* local partitions.
2637 ++++-- Try to open a device on each Job if it was not opened
2638 ++++-  when the SD started.
2639 ++++-- Add dump of VolSessionId/Time and FileIndex with bls.
2640 ++++-- If Bacula does not find the right tape in the Autochanger,
2641 ++++-  then mark the tape in error and move on rather than asking
2642 ++++-  for operator intervention.
2643 ++++-- Cancel command should include JobId in list of Jobs.
2644 ++++-- Add performance testing hooks
2645 ++++-- Bootstrap from JobMedia records.
2646 ++++-- Implement WildFile and WildDir to solve problem of 
2647 ++++-  saving only *.doc files.
2648 ++++-- Fix
2649 ++++-   Please use the "label"  command to create a new Volume for:
2650 ++++-       Storage:      DDS-4-changer
2651 ++++-       Media type:   
2652 ++++-       Pool:         Default
2653 ++++-   label
2654 ++++-   The defined Storage resources are:
2655 ++++-- Copy Changer Device and Changer Command from Autochanger
2656 ++++-  to Device resource in SD if none given in Device resource.
2657 ++++-- 1. Automatic use of more than one drive in an autochanger (done)
2658 ++++-- 2. Automatic selection of the correct drive for each Job (i.e.
2659 ++++-     selects a drive with an appropriate Volume for the Job) (done)
2660 ++++-- 6. Allow multiple simultaneous Jobs referencing the same pool write
2661 ++++-    to several tapes (some new directive(s) are are probably needed for
2662 ++++-    this) (done)
2663 ++++-- Locking (done)
2664 ++++-- Key on Storage rather than Pool (done)
2665 ++++-- Allow multiple drives to use same Pool (change jobq.c DIR) (done).
2666 ++++-- Synchronize multiple drives so that not more
2667 ++++-  than one loads a tape and any time (done)
2668 ++++-- 4. Use Changer Device and Changer Command specified in the
2669 ++++-     Autochanger resource, if none is found in the Device resource.
2670 ++++-    You can continue to specify them in the Device resource if you want
2671 ++++-    or need them to be different for each device.
2672 ++++-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") 
2673 ++++-    that can allow a Device be part of an Autochanger, and hence the changer
2674 ++++-    script protected, but if set to no, will prevent the Device from being 
2675 ++++-    automatically selected from the changer. This allows the device to
2676 ++++-    be directly accessed through its Device name, but not through the
2677 ++++-    AutoChanger name.
2678 ++++-#6   Select one from among Multiple Storage Devices for Job
2679 ++++-#5   Events that call a Python program 
2680 ++++-     (Implemented in Dir/SD)
2681 ++++-- Make sure the Device name is in the Query packet returned.
2682 ++++-- Don't start a second file job if one is already running.
2683 ++++-- Implement EOF/EOV labels for ANSI labels
2684 ++++-- Implement IBM labels.
2685 ++++-- When Python creates a new label, the tape is immediately
2686 ++++-  recycled and no label created. This happens when using   
2687 ++++-  autolabeling -- even when Python doesn't generate the name.
2688 ++++-- Scratch Pool where the volumes can be re-assigned to any Pool.
2689 ++++-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) 
2690 ++++-  is busy reading. Job 6 canceled.
2691 ++++-- Remove separate thread for opening devices in SD.  On the other
2692 ++++-  hand, don't block waiting for open() for devices.
2693 ++++-- Fix code to either handle updating NumVol or to calculate it in
2694 ++++-  Dir next_vol.c
2695 ++++-- Ensure that you cannot exclude a directory or a file explicitly
2696 ++++-  Included with File.
2697 ++++-#4   Embedded Python Scripting 
2698 ++++-     (Implemented in Dir/SD/FD)
2699 ++++-- Add Python writable variable for changing the Priority,
2700 ++++-    Client, Storage, JobStatus (error), ...
2701 ++++-- SD Python
2702 ++++-  - Solicit Events
2703 ++++-- Add disk seeking on restore; turn off seek on tapes.
2704 ++++-  stored/match_bsr.c
2705 ++++-- Look at dird_conf.c:1000: warning: `int size' 
2706 ++++-  might be used uninitialized in this function
2707 ++++-- Indicate when a Job is purged/pruned during restore.
2708 ++++-- Implement some way to turn off automatic pruning in Jobs.
2709 ++++-- Implement a way an Admin Job can prune, possibly multiple
2710 ++++-  clients -- Python script?
2711 ++++-- Look at Preben's acl.c error handling code.
2712 ++++-- SD crashes after a tape restore then doing a backup. 
2713 ++++-- If drive is opened read/write, close it and re-open
2714 ++++-  read-only if doing a restore, and vice-versa.
2715 ++++-- Windows restore:
2716 ++++-  data-fd: RestoreFiles.2004-12-07_15.56.42 Error:
2717 ++++-  > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der
2718 ++++-  > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen
2719 ++++-  > Prozess verwendet wird.
2720 ++++-  Restore restores all files, but then fails at the end trying
2721 ++++-  to set the attributes of e:
2722 ++++-  from failed jobs.- Resolve the problem between Device name and Archive name,
2723 ++++-  and fix SD messages.
2724 ++++-- Tell the "restore" user when browsing is no longer possible.
2725 ++++-- Add a restore directory-x
2726 ++++-- Write non-optimized bsrs from the JobMedia and Media records,
2727 ++++-  even after Files are pruned.
2728 ++++-- Delete Stripe and Copy from VolParams to save space.
2729 ++++-- Fix option 2 of restore -- list where file is backed up -- require Client,
2730 ++++-  then list last 20 backups.
2731 ++++-- Finish implementation of passing all Storage and Device needs to
2732 ++++-  the SD.
2733 ++++-- Move test for max wait time exceeded in job.c up -- Peter's idea.
2734 ++++-##   Consider moving docs to their own project.
2735 ++++-##   Move rescue to its own project.
2736 ++++-- Add client version to the Client name line that prints in
2737 ++++-  the Job report.
2738 ++++-- Fix the Rescue CDROM.
2739 ++++-- By the way: on page http://www.bacula.org/?page=tapedrives , at the 
2740 ++++-  bottom, the link to "Tape Testing Chapter" is broken. It goes to 
2741 ++++-  /html-manual/... while the others point to /rel-manual/...
2742 ++++-- Device resource needs the "name" of the SD.
2743 ++++-- Specify a single directory to restore.
2744 ++++-- Implement MediaType keyword in bsr?   
2745 ++++-- Add a date and time stamp at the beginning of every line in the 
2746 ++++-  Job report (Volker Sauer).
2747 ++++-- Add level to estimate command.
2748 ++++-- Add "limit=n" for "list jobs"
2749 ++++-- Make bootstrap filename unique.
2750 ++++-- Make Dmsg look at global before calling subroutine.
2751 ++++-- From Chris Hull:
2752 ++++-   it seems to be complaining about 12:00pm which should be a valid 12
2753 ++++-   hour time.  I changed the time to 11:59am and everything works fine.
2754 ++++-   Also 12:00am works fine.  0:00pm also works (which I don't think
2755 ++++-   should).  None of the values 12:00pm - 12:59pm work for that matter.
2756 ++++-- Require restore via the restore command or make a restore Job
2757 ++++-  get the bootstrap file.
2758 ++++-- Implement Maximum Job Spool Size
2759 ++++-- Fix 3993 error in SD. It forgets to look at autochanger
2760 ++++-  resource for device command, ...
2761 ++++-- 3. Prevent two drives requesting the same Volume in any given
2762 ++++-     autochanger, by checking if a Volume is mounted on another drive
2763 ++++-     in an Autochanger.
2764 ++++-- Upgrade to MySQL 4.1.12 See:  
2765 ++++-  http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html
2766 ++++-- Add # Job Level date to bsr file
2767 ++++-- Implement "PreferMountedVolumes = yes|no" in Job resource.
2768 ++++-##   Integrate web-bacula into a new Bacula project with
2769 ++++-     bimagemgr.
2770 ++++-- Cleaning tapes should have Status "Cleaning" rather than append.
2771 ++++-- Make sure that Python has access to Client address/port so that
2772 ++++-  it can check if Clients are alive.
2773 ++++-- Review all items in "restore".
2774 ++++-- Fix PostgreSQL GROUP BY problems in restore.
2775 ++++-- Fix PostgreSQL sql problems in bugs.
2776 ++++-- After rename
2777 ++++-  04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume 
2778 ++++-     "DLT-13Feb04".
2779 ++++-  Current Volume "DLT-04Jul05" not acceptable because:
2780 ++++-  1997 Volume "DLT-13Feb04" not in catalog.
2781 ++++-  04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device 
2782 ++++-     "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02
2783 ++++-##   Create a new GUI chapter explaining all the GUI programs.
2784 ++++--    Make "update slots" when pointing to Autochanger, remove
2785 ++++-     all Volumes from other drives.  "update slots all-drives"?
2786 ++++-     No, this is done by modifying mtx-changer to list what is
2787 ++++-     in the drives.
2788 ++++-- Finish TLS implementation.
2789 ++++-- Port limiting -m in iptables to prevent DoS attacks
2790 ++++-  could cause broken pipes on Bacula.
2791 ++++-6. Build and test the Volume Shadow Copy (VSS) for Win32. 
2792 ++++--  Allow cancel of unknown Job
2793 ++++--  State not saved when closing Win32 FD by icon
2794 ++++--  bsr-opt-test fails. bsr deleted. Fix.
2795 ++++--  Move Python daemon variables from Job to Bacula object.
2796 ++++-   WorkingDir, ConfigFile
2797 ++++-- Document that Bootstrap files can be written with cataloging
2798 ++++-  turned off.
2799 ++++-- Document details of ANSI/IBM labels
2800 ++++-- OS linux 2.4
2801 ++++-  1) ADIC, DLT, FastStor 4000, 7*20GB
2802 ++++-- Linux Sony LIB-D81, AIT-3 library works.
2803 ++++-- Doc the following
2804 ++++-  to activate, check or disable the hardware compression feature on my 
2805 ++++-  exb-8900 i use the exabyte "MammothTool" you can get it here:
2806 ++++-  http://www.exabyte.com/support/online/downloads/index.cfm
2807 ++++-  There is a solaris version of this tool. With option -C 0 or 1 you can 
2808 ++++-  disable or activate compression. Start this tool without any options for 
2809 ++++-  a small reference.
2810 ++++-- Document Heartbeat Interval in the dealing with firewalls section.
2811 ++++-- Document new CDROM directory.
2812 ++++-- On Win32 working directory must have drive letter ????
2813 ++++-- On Win32 working directory must be writable by SYSTEM to
2814 ++++-  do restores.
2815 ++++-- Document that ChangerDevice is used for Alert command.
2816 ++++-- Add better documentation on how restores can be done
2817 ++++-8. Take one more try at making DVD writing work (no go)
2818 ++++-7. Write a bacula-web document
2819 ++++-- Why isn't the DEVICE structure defined when doing
2820 ++++-  a reservation?
2821 ++++-- Multi-drive changer seems to only use drive 0
2822 ++++-  Multiple drives don't seem to be opened.
2823 ++++-- My database is growing
2824 ++++-- Call GetLastError() in the berrno constructor rather
2825 ++++-  than delaying until strerror.
2826 ++++-- Tape xxx in drive 0, requested in drive 1
2827 ++++-- The mount command does not work with drives other than 0.
2828 ++++-- A mount should cause the SD to re-examine what Slot is   
2829 ++++-  loaded.
2830 ++++-- The SD locks on to the first available drive then
2831 ++++-  wants a Volume that is released but in another drive --
2832 ++++-  chaos.
2833 ++++-- Run the regression scripts on Solaris and FreeBSD
2834 ++++--  Figure out how to package gui, and rescue programs.
2835 ++++-- Add a .dir command to restore tree code to eliminate the problem
2836 ++++-- Mount after manually unloading changer causes hang in SD
2837 ++++-- Fix JobACL with restore by JobId.
2838 +++++=== Done -- see kernsdone
2839 ++++Index: kes-1.38
2840 ++++===================================================================
2841 ++++RCS file: /cvsroot/bacula/bacula/kes-1.38,v
2842 ++++retrieving revision 1.1.2.13
2843 ++++diff -u -r1.1.2.13 kes-1.38
2844 ++++--- kes-1.38        14 Nov 2005 20:20:38 -0000      1.1.2.13
2845 +++++++ kes-1.38        21 Nov 2005 13:17:57 -0000
2846 ++++@@ -3,6 +3,18 @@
2847 ++++ 
2848 ++++ General:
2849 ++++ 
2850 +++++Changes to 1.38.2:
2851 +++++20Oct05
2852 +++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
2853 +++++- Fix bnet-server bug found on OpenBSD. Bug #486
2854 +++++- Fix cancel failure bug. Bug #481
2855 +++++- Fix failure when Pool name has spaces. Bug #487   
2856 +++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
2857 +++++- Fix a couple of free()s in src/filed/acl.c
2858 +++++- Fix memory overrun in bfile.c in building OS X resource
2859 +++++  fork filename. Bug #489 
2860 +++++- Add Pool name to SD status output.
2861 +++++
2862 ++++ Changes to 1.38.1:
2863 ++++ 14Oct05
2864 ++++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
2865 ++++Index: projects
2866 ++++===================================================================
2867 ++++RCS file: /cvsroot/bacula/bacula/projects,v
2868 ++++retrieving revision 1.12.2.3
2869 ++++diff -u -r1.12.2.3 projects
2870 ++++--- projects        10 Nov 2005 20:25:27 -0000      1.12.2.3
2871 +++++++ projects        21 Nov 2005 13:17:58 -0000
2872 ++++@@ -228,7 +228,175 @@
2873 ++++ 
2874 ++++   Why:    Performance enhancement.
2875 ++++ 
2876 +++++Item 13:  Let Bacula log tape usage and handle drive cleaning cycles.
2877 +++++  Date:   November 11, 2005
2878 +++++  Origin: Arno Lehmann <al at its-lehmann dot de>
2879 +++++  Status:
2880 +++++
2881 +++++  What:   Make Bacula manage tape life cycle information and drive 
2882 +++++          cleaning cycles.
2883 +++++
2884 +++++  Why:    Both parts of this project are important when operating backups.
2885 +++++          We need to know which tapes need replacement, and we need to
2886 +++++          make sure the drives are cleaned when necessary.  While many
2887 +++++          tape libraries and even autoloaders can handle all this
2888 +++++          automatically, support by Bacula can be helpful for smaller
2889 +++++          (older) libraries and single drives.  Also, checking drive
2890 +++++          status during operation can prevent some failures (as I had to
2891 +++++          learn the hard way...)
2892 +++++
2893 +++++  Notes:  First, Bacula could (and even does, to some limited extent)
2894 +++++          record tape and drive usage.  For tapes, the number of mounts,
2895 +++++          the amount of data, and the time the tape has actually been
2896 +++++          running could be recorded.  Data fields for Read and Write time
2897 +++++          and Nmber of mounts already exist in the catalog (I'm not sure
2898 +++++          if VolBytes is the sum of all bytes ever written to that volume
2899 +++++          by Bacula).  This information can be important when determining
2900 +++++          which media to replace.  For the tape drives known to Bacula,
2901 +++++          similar information is interesting to determine the device
2902 +++++          status and expected life time: Time it's been Reading and
2903 +++++          Writing, number of tape Loads / Unloads / Errors.  This
2904 +++++          information is not yet recorded as far as I know.
2905 +++++
2906 +++++          The next step would be implementing drive cleaning setup.
2907 +++++          Bacula already has knowledge about cleaning tapes.  Once it has
2908 +++++          some information about cleaning cycles (measured in drive run
2909 +++++          time, number of tapes used, or calender days, for example) it
2910 +++++          can automatically execute tape cleaning (with an autochanger,
2911 +++++          obviously) or ask for operator assistence loading a cleaning
2912 +++++          tape.
2913 +++++
2914 +++++          The next step would be to implement TAPEALERT checks not only
2915 +++++          when changing tapes and only sending he information to the
2916 +++++          administrator, but rather checking after each tape error,
2917 +++++          checking on a regular basis (for example after each tape file),
2918 +++++          and also before unloading and after loading a new tape.  Then,
2919 +++++          depending on the drives TAPEALERT state and the know drive
2920 +++++          cleaning state Bacula could automatically schedule later
2921 +++++          cleaning, clean immediately, or inform the operator.
2922 +++++
2923 +++++          Implementing this would perhaps require another catalog change
2924 +++++          and perhaps major changes in SD code and the DIR-SD protocoll,
2925 +++++          so I'd only consider this worth implementing if it would
2926 +++++          actually be used or even needed by many people. 
2927 +++++
2928 +++++Item 14:  Merging of multiple backups into a single one. (Also called Synthetic
2929 +++++          Backup or Consolidation).
2930 +++++
2931 +++++  Origin: Marc Cousin and Eric Bollengier 
2932 +++++  Date:   15 November 2005
2933 +++++  Status: Depends on first implementing project Item 1 (Migration).
2934 +++++
2935 +++++  What:   A merged backup is a backup made without connecting to the Client.
2936 +++++          It would be a Merge of existing backups into a single backup.
2937 +++++          In effect, it is like a restore but to the backup medium.
2938 +++++
2939 +++++          For instance, say that last sunday we made a full backup.  Then
2940 +++++          all week long, we created incremental backups, in order to do
2941 +++++          them fast.  Now comes sunday again, and we need another full.
2942 +++++          The merged backup makes it possible to do instead an incremental
2943 +++++          backup (during the night for instance), and then create a merged
2944 +++++          backup during the day, by using the full and incrementals from
2945 +++++          the week.  The merged backup will be exactly like a full made
2946 +++++          sunday night on the tape, but the production interruption on the
2947 +++++          Client will be minimal, as the Client will only have to send
2948 +++++          incrementals.
2949 +++++
2950 +++++          In fact, if it's done correctly, you could merge all the
2951 +++++          Incrementals into single Incremental, or all the Incrementals
2952 +++++          and the last Differential into a new Differential, or the Full,
2953 +++++          last differential and all the Incrementals into a new Full
2954 +++++          backup.  And there is no need to involve the Client.
2955 +++++
2956 +++++  Why:    The benefit is that :
2957 +++++          - the Client just does an incremental ;
2958 +++++          - the merged backup on tape is just as a single full backup,
2959 +++++            and can be restored very fast.
2960 +++++
2961 +++++          This is also a way of reducing the backup data since the old
2962 +++++          data can then be pruned (or not) from the catalog, possibly
2963 +++++          allowing older volumes to be recycled
2964 +++++
2965 +++++Item 15:  Automatic disabling of devices
2966 +++++   Date:   2005-11-11
2967 +++++   Origin: Peter Eriksson <peter at ifm.liu dot se>
2968 +++++   Status:
2969 +++++
2970 +++++   What:  After a configurable amount of fatal errors with a tape drive
2971 +++++          Bacula should automatically disable further use of a certain
2972 +++++          tape drive. There should also be "disable"/"enable" commands in
2973 +++++          the "bconsole" tool.
2974 +++++
2975 +++++   Why:   On a multi-drive jukebox there is a possibility of tape drives
2976 +++++          going bad during large backups (needing a cleaning tape run,
2977 +++++          tapes getting stuck). It would be advantageous if Bacula would
2978 +++++          automatically disable further use of a problematic tape drive
2979 +++++          after a configurable amount of errors has occured.
2980 +++++
2981 +++++          An example: I have a multi-drive jukebox (6 drives, 380+ slots)
2982 +++++          where tapes occasionally get stuck inside the drive. Bacula will
2983 +++++          notice that the "mtx-changer" command will fail and then fail
2984 +++++          any backup jobs trying to use that drive. However, it will still
2985 +++++          keep on trying to run new jobs using that drive and fail -
2986 +++++          forever, and thus failing lots and lots of jobs... Since we have
2987 +++++          many drives Bacula could have just automatically disabled
2988 +++++          further use of that drive and used one of the other ones
2989 +++++          instead.
2990 +++++
2991 +++++
2992 +++++Item 16:  Directive/mode to backup only file changes, not entire file
2993 +++++  Date:   11 November 2005
2994 +++++  Origin: Joshua Kugler <joshua dot kugler at uaf dot edu>
2995 +++++          Marek Bajon <mbajon at bimsplus dot com dot pl>
2996 +++++  Status: RFC
2997 +++++
2998 +++++  What:   Currently when a file changes, the entire file will be backed up in
2999 +++++          the next incremental or full backup.  To save space on the tapes
3000 +++++          it would be nice to have a mode whereby only the changes to the
3001 +++++          file would be backed up when it is changed.
3002 +++++
3003 +++++  Why:    This would save lots of space when backing up large files such as 
3004 +++++          logs, mbox files, Outlook PST files and the like.
3005 +++++
3006 +++++  Notes:  This would require the usage of disk-based volumes as comparing 
3007 +++++          files would not be feasible using a tape drive.
3008 +++++
3009 +++++Item 17:  Quick release of FD-SD connection
3010 +++++  Origin: Frank Volf (frank at deze dot org)
3011 +++++  Date:   17 november 2005
3012 +++++  Status:
3013 +++++
3014 +++++   What:  In the bacula implementation a backup is finished after all data
3015 +++++          and attributes are succesfully written to storage.  When using a
3016 +++++          tape backup it is very annoying that a backup can take a day,
3017 +++++          simply because the current tape (or whatever) is full and the
3018 +++++          administrator has not put a new one in.  During that time the
3019 +++++          system cannot be taken off-line, because there is still an open
3020 +++++          session between the storage daemon and the file daemon on the
3021 +++++          client.
3022 +++++
3023 +++++          Although this is a very good strategey for making "safe backups"
3024 +++++          This can be annoying for e.g.  laptops, that must remain
3025 +++++          connected until the bacukp is completed.
3026 +++++
3027 +++++          Using a new feature called "migration" it will be possible to
3028 +++++          spool first to harddisk (using a special 'spool' migration
3029 +++++          scheme) and then migrate the backup to tape.
3030 +++++
3031 +++++          There is still the problem of getting the attributes committed.
3032 +++++          If it takes a very long time to do, with the current code, the
3033 +++++          job has not terminated, and the File daemon is not freed up.  The
3034 +++++          Storage daemon should release the File daemon as soon as all the
3035 +++++          file data and all the attributes have been sent to it (the SD).
3036 +++++          Currently the SD waits until everything is on tape and all the
3037 +++++          attributes are transmitted to the Director before signalling
3038 +++++          completion to the FD. I don't think I would have any problem
3039 +++++          changing this.  The reason is that even if the FD reports back to
3040 +++++          the Dir that all is OK, the job will not terminate until the SD
3041 +++++          has done the same thing -- so in a way keeping the SD-FD link
3042 +++++          open to the very end is not really very productive ...
3043 ++++ 
3044 +++++   Why:   Makes backup of laptops much easier.
3045 ++++ 
3046 ++++ 
3047 ++++ ============= Empty RFC form ===========
3048 ++++@@ -245,33 +413,4 @@
3049 ++++ ============== End RFC form ==============
3050 ++++ 
3051 ++++ 
3052 ++++-Items completed for release 1.38.0:
3053 ++++-#4   Embedded Python Scripting (implemented in all Daemons)
3054 ++++-#5   Events that call a Python program (Implemented in all
3055 ++++-       daemons, but more cleanup work to be done).
3056 ++++-#6   Select one from among Multiple Storage Devices for Job.
3057 ++++-       This is already implemented in 1.37.
3058 ++++-#7   Single Job Writing to Multiple Storage Devices. This is
3059 ++++-       currently implemented with a Clone feature.
3060 ++++-#-   Full multiple drive Autochanger support (done in 1.37)
3061 ++++-#-   Built in support for communications encryption (TLS) 
3062 ++++-       done by Landon Fuller.
3063 ++++-#    Support for Unicode characters
3064 ++++-       (via UTF-8) on Win32 machines thanks to Thorsten Engel.
3065 ++++-Item  8:  Break the one-to-one Relationship between a Job and a
3066 ++++-          Specific Storage Device (or Devices if #10 is implemented).
3067 ++++-
3068 ++++-Completed items from last year's list:
3069 ++++-Item 1:   Multiple simultaneous Jobs. (done)
3070 ++++-Item 3:   Write the bscan program -- also write a bcopy program (done).
3071 ++++-Item 5:   Implement Label templates (done).
3072 ++++-Item 6:   Write a regression script (done)
3073 ++++-Item 9:   Add SSL to daemon communications (done by Landon Fuller)
3074 ++++-Item 10:  Define definitive tape format (done)
3075 ++++-Item 3:   GUI for interactive restore. Partially Implemented in 1.34
3076 ++++-          Note, there is now a complete Webmin plugin, a partial
3077 ++++-          GNOME console, and an excellent wx-console GUI.
3078 ++++-Item 4:   GUI for interactive backup
3079 ++++-Item 2:   Job Data Spooling.
3080 ++++-    Done: Regular expression matching.
3081 ++++-Item 10:  New daemon communication protocol (this has been dropped).
3082 +++++Items completed for release 1.38.0 -- see kernsdone
3083 ++++Index: patches/1.38.1-to-1.38.2.patch
3084 ++++===================================================================
3085 ++++RCS file: patches/1.38.1-to-1.38.2.patch
3086 ++++diff -N patches/1.38.1-to-1.38.2.patch
3087 ++++--- /dev/null       1 Jan 1970 00:00:00 -0000
3088 +++++++ patches/1.38.1-to-1.38.2.patch  21 Nov 2005 13:17:58 -0000
3089 ++++@@ -0,0 +1,2471 @@
3090 +++++
3091 +++++ This patch fixes the following bugs:
3092 +++++
3093 +++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
3094 +++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
3095 +++++  says that this patch does not fix his problem)
3096 +++++- Fix cancel failure bug. Bug #481
3097 +++++- Fix failure when Pool name has spaces. Bug #487
3098 +++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
3099 +++++- Fix a couple of free()s in src/filed/acl.c
3100 +++++- Fix memory overrun in bfile.c in building OS X resource
3101 +++++  fork filename. Bug #489
3102 +++++
3103 +++++This patch is applied to Bacula source version 1.38.1 and will
3104 +++++produce Bacula source version 1.38.2.  Apply it with:
3105 +++++
3106 +++++   cd <bacula-1.38.1-source>
3107 +++++   ./configure (your options) if not already done
3108 +++++   patch -p0 <1.38.1-to-1.38.2.patch
3109 +++++   make
3110 +++++   make install
3111 +++++
3112 +++++? osx_finder.patch
3113 +++++Index: ChangeLog
3114 +++++===================================================================
3115 +++++RCS file: /cvsroot/bacula/bacula/ChangeLog,v
3116 +++++retrieving revision 1.154.2.7
3117 +++++diff -u -r1.154.2.7 ChangeLog
3118 +++++--- ChangeLog      15 Nov 2005 09:27:19 -0000      1.154.2.7
3119 ++++++++ ChangeLog      21 Nov 2005 13:12:58 -0000
3120 +++++@@ -1,4 +1,14 @@
3121 +++++ 
3122 ++++++Changes to 1.38.2:
3123 ++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
3124 ++++++- Fix bnet-server bug found on OpenBSD. Bug #486
3125 ++++++- Fix cancel failure bug. Bug #481
3126 ++++++- Fix failure when Pool name has spaces. Bug #487   
3127 ++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
3128 ++++++- Fix a couple of free()s in src/filed/acl.c
3129 ++++++- Fix memory overrun in bfile.c in building OS X resource
3130 ++++++  fork filename. Bug #489 
3131 ++++++- Add Pool name to SD status output.
3132 +++++ 
3133 +++++ Changes to 1.38.1:
3134 +++++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
3135 +++++Index: ReleaseNotes
3136 +++++===================================================================
3137 +++++RCS file: /cvsroot/bacula/bacula/ReleaseNotes,v
3138 +++++retrieving revision 1.147.2.9
3139 +++++diff -u -r1.147.2.9 ReleaseNotes
3140 +++++--- ReleaseNotes   15 Nov 2005 09:27:19 -0000      1.147.2.9
3141 ++++++++ ReleaseNotes   21 Nov 2005 13:12:59 -0000
3142 +++++@@ -1,10 +1,21 @@
3143 +++++ 
3144 +++++-          Release Notes for Bacula 1.38.1
3145 ++++++          Release Notes for Bacula 1.38.2
3146 +++++ 
3147 +++++   Bacula code: Total files = 420 Total lines = 138,440 (*.h *.c *.in)
3148 +++++       20,440 additional lines of code since version 1.36.3
3149 +++++ 
3150 +++++-Changes since 1.38.0:
3151 ++++++Changes to 1.38.2:
3152 ++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
3153 ++++++- Fix bnet-server bug found on OpenBSD. Bug #486
3154 ++++++- Fix cancel failure bug. Bug #481
3155 ++++++- Fix failure when Pool name has spaces. Bug #487   
3156 ++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
3157 ++++++- Fix a couple of free()s in src/filed/acl.c
3158 ++++++- Fix memory overrun in bfile.c in building OS X resource
3159 ++++++  fork filename. Bug #489 
3160 ++++++- Add Pool name to SD status output.
3161 ++++++
3162 ++++++Changes to 1.38.1:
3163 +++++ - Corrected ACL for Solaris (David Duchscher and Attila Fulop).
3164 +++++ - Add bacula_mail_summary.sh to examples directory. It makes
3165 +++++   a single email summary of any number of jobs. Submitted
3166 +++++Index: kernstodo
3167 +++++===================================================================
3168 +++++RCS file: /cvsroot/bacula/bacula/kernstodo,v
3169 +++++retrieving revision 1.570.2.6
3170 +++++diff -u -r1.570.2.6 kernstodo
3171 +++++--- kernstodo      4 Nov 2005 09:16:49 -0000       1.570.2.6
3172 ++++++++ kernstodo      21 Nov 2005 13:13:00 -0000
3173 +++++@@ -1,5 +1,5 @@
3174 +++++                     Kern's ToDo List
3175 +++++-                     03 November 2005
3176 ++++++                     21 November 2005
3177 +++++ 
3178 +++++ Major development:      
3179 +++++ Project                     Developer
3180 +++++@@ -7,8 +7,6 @@
3181 +++++ Version 1.37                Kern (see below)
3182 +++++ ========================================================
3183 +++++ 
3184 +++++-Final items for 1.37 before release:
3185 +++++-
3186 +++++ Document:
3187 +++++ - Does ClientRunAfterJob fail the job on a bad return code?
3188 +++++ - Document cleaning up the spool files:
3189 +++++@@ -18,6 +16,8 @@
3190 +++++ - Does WildFile match against full name?  Doc.
3191 +++++ 
3192 +++++ For 1.39:
3193 ++++++- Make sure that all do_prompt() calls in Dir check for
3194 ++++++  -1 (error) and -2 (cancel) returns.
3195 +++++ - Look at -D_FORTIFY_SOURCE=2
3196 +++++ - Add Win32 FileSet definition somewhere
3197 +++++ - Look at fixing restore status stats in SD.
3198 +++++@@ -27,6 +27,12 @@
3199 +++++   encountered, read many times (as it currently does), and if the
3200 +++++   block cannot be read, skip to the next block, and try again.  If
3201 +++++   that fails, skip to the next file and try again, ...
3202 ++++++- Add level table:
3203 ++++++  create table LevelType (LevelType binary(1), LevelTypeLong tinyblob);
3204 ++++++  insert into LevelType (LevelType,LevelTypeLong) values
3205 ++++++  ("F","Full"),
3206 ++++++  ("D","Diff"),
3207 ++++++  ("I","Inc");
3208 +++++ - Add ACL to restore only to original location.
3209 +++++ - Add a recursive mark command (rmark) to restore.
3210 +++++ - "Minimum Job Interval = nnn" sets minimum interval between Jobs
3211 +++++@@ -1246,219 +1252,4 @@
3212 +++++ ====
3213 +++++ 
3214 +++++ 
3215 +++++-=== Done
3216 +++++-- Save mount point for directories not traversed with onefs=yes.
3217 +++++-- Add seconds to start and end times in the Job report output.
3218 +++++-- if 2 concurrent backups are attempted on the same tape
3219 +++++-  drive (autoloader) into different tape pools, one of them will exit
3220 +++++-  fatally instead of halting until the drive is idle
3221 +++++-- Update StartTime if job held in Job Queue.
3222 +++++-- Look at www.nu2.nu/pebuilder as a helper for full windows
3223 +++++-  bare metal restore. (done by Scott)
3224 +++++-- Fix orphanned buffers:
3225 +++++-   Orphaned buffer:      24 bytes allocated at line 808 of rufus-dir job.c
3226 +++++-   Orphaned buffer:      40 bytes allocated at line 45 of rufus-dir alist.c
3227 +++++-- Implement Preben's suggestion to add
3228 +++++-  File System Types = ext2, ext3 
3229 +++++-  to FileSets, thus simplifying backup of *all* local partitions.
3230 +++++-- Try to open a device on each Job if it was not opened
3231 +++++-  when the SD started.
3232 +++++-- Add dump of VolSessionId/Time and FileIndex with bls.
3233 +++++-- If Bacula does not find the right tape in the Autochanger,
3234 +++++-  then mark the tape in error and move on rather than asking
3235 +++++-  for operator intervention.
3236 +++++-- Cancel command should include JobId in list of Jobs.
3237 +++++-- Add performance testing hooks
3238 +++++-- Bootstrap from JobMedia records.
3239 +++++-- Implement WildFile and WildDir to solve problem of 
3240 +++++-  saving only *.doc files.
3241 +++++-- Fix
3242 +++++-   Please use the "label"  command to create a new Volume for:
3243 +++++-       Storage:      DDS-4-changer
3244 +++++-       Media type:   
3245 +++++-       Pool:         Default
3246 +++++-   label
3247 +++++-   The defined Storage resources are:
3248 +++++-- Copy Changer Device and Changer Command from Autochanger
3249 +++++-  to Device resource in SD if none given in Device resource.
3250 +++++-- 1. Automatic use of more than one drive in an autochanger (done)
3251 +++++-- 2. Automatic selection of the correct drive for each Job (i.e.
3252 +++++-     selects a drive with an appropriate Volume for the Job) (done)
3253 +++++-- 6. Allow multiple simultaneous Jobs referencing the same pool write
3254 +++++-    to several tapes (some new directive(s) are are probably needed for
3255 +++++-    this) (done)
3256 +++++-- Locking (done)
3257 +++++-- Key on Storage rather than Pool (done)
3258 +++++-- Allow multiple drives to use same Pool (change jobq.c DIR) (done).
3259 +++++-- Synchronize multiple drives so that not more
3260 +++++-  than one loads a tape and any time (done)
3261 +++++-- 4. Use Changer Device and Changer Command specified in the
3262 +++++-     Autochanger resource, if none is found in the Device resource.
3263 +++++-    You can continue to specify them in the Device resource if you want
3264 +++++-    or need them to be different for each device.
3265 +++++-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") 
3266 +++++-    that can allow a Device be part of an Autochanger, and hence the changer
3267 +++++-    script protected, but if set to no, will prevent the Device from being 
3268 +++++-    automatically selected from the changer. This allows the device to
3269 +++++-    be directly accessed through its Device name, but not through the
3270 +++++-    AutoChanger name.
3271 +++++-#6   Select one from among Multiple Storage Devices for Job
3272 +++++-#5   Events that call a Python program 
3273 +++++-     (Implemented in Dir/SD)
3274 +++++-- Make sure the Device name is in the Query packet returned.
3275 +++++-- Don't start a second file job if one is already running.
3276 +++++-- Implement EOF/EOV labels for ANSI labels
3277 +++++-- Implement IBM labels.
3278 +++++-- When Python creates a new label, the tape is immediately
3279 +++++-  recycled and no label created. This happens when using   
3280 +++++-  autolabeling -- even when Python doesn't generate the name.
3281 +++++-- Scratch Pool where the volumes can be re-assigned to any Pool.
3282 +++++-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) 
3283 +++++-  is busy reading. Job 6 canceled.
3284 +++++-- Remove separate thread for opening devices in SD.  On the other
3285 +++++-  hand, don't block waiting for open() for devices.
3286 +++++-- Fix code to either handle updating NumVol or to calculate it in
3287 +++++-  Dir next_vol.c
3288 +++++-- Ensure that you cannot exclude a directory or a file explicitly
3289 +++++-  Included with File.
3290 +++++-#4   Embedded Python Scripting 
3291 +++++-     (Implemented in Dir/SD/FD)
3292 +++++-- Add Python writable variable for changing the Priority,
3293 +++++-    Client, Storage, JobStatus (error), ...
3294 +++++-- SD Python
3295 +++++-  - Solicit Events
3296 +++++-- Add disk seeking on restore; turn off seek on tapes.
3297 +++++-  stored/match_bsr.c
3298 +++++-- Look at dird_conf.c:1000: warning: `int size' 
3299 +++++-  might be used uninitialized in this function
3300 +++++-- Indicate when a Job is purged/pruned during restore.
3301 +++++-- Implement some way to turn off automatic pruning in Jobs.
3302 +++++-- Implement a way an Admin Job can prune, possibly multiple
3303 +++++-  clients -- Python script?
3304 +++++-- Look at Preben's acl.c error handling code.
3305 +++++-- SD crashes after a tape restore then doing a backup. 
3306 +++++-- If drive is opened read/write, close it and re-open
3307 +++++-  read-only if doing a restore, and vice-versa.
3308 +++++-- Windows restore:
3309 +++++-  data-fd: RestoreFiles.2004-12-07_15.56.42 Error:
3310 +++++-  > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der
3311 +++++-  > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen
3312 +++++-  > Prozess verwendet wird.
3313 +++++-  Restore restores all files, but then fails at the end trying
3314 +++++-  to set the attributes of e:
3315 +++++-  from failed jobs.- Resolve the problem between Device name and Archive name,
3316 +++++-  and fix SD messages.
3317 +++++-- Tell the "restore" user when browsing is no longer possible.
3318 +++++-- Add a restore directory-x
3319 +++++-- Write non-optimized bsrs from the JobMedia and Media records,
3320 +++++-  even after Files are pruned.
3321 +++++-- Delete Stripe and Copy from VolParams to save space.
3322 +++++-- Fix option 2 of restore -- list where file is backed up -- require Client,
3323 +++++-  then list last 20 backups.
3324 +++++-- Finish implementation of passing all Storage and Device needs to
3325 +++++-  the SD.
3326 +++++-- Move test for max wait time exceeded in job.c up -- Peter's idea.
3327 +++++-##   Consider moving docs to their own project.
3328 +++++-##   Move rescue to its own project.
3329 +++++-- Add client version to the Client name line that prints in
3330 +++++-  the Job report.
3331 +++++-- Fix the Rescue CDROM.
3332 +++++-- By the way: on page http://www.bacula.org/?page=tapedrives , at the 
3333 +++++-  bottom, the link to "Tape Testing Chapter" is broken. It goes to 
3334 +++++-  /html-manual/... while the others point to /rel-manual/...
3335 +++++-- Device resource needs the "name" of the SD.
3336 +++++-- Specify a single directory to restore.
3337 +++++-- Implement MediaType keyword in bsr?   
3338 +++++-- Add a date and time stamp at the beginning of every line in the 
3339 +++++-  Job report (Volker Sauer).
3340 +++++-- Add level to estimate command.
3341 +++++-- Add "limit=n" for "list jobs"
3342 +++++-- Make bootstrap filename unique.
3343 +++++-- Make Dmsg look at global before calling subroutine.
3344 +++++-- From Chris Hull:
3345 +++++-   it seems to be complaining about 12:00pm which should be a valid 12
3346 +++++-   hour time.  I changed the time to 11:59am and everything works fine.
3347 +++++-   Also 12:00am works fine.  0:00pm also works (which I don't think
3348 +++++-   should).  None of the values 12:00pm - 12:59pm work for that matter.
3349 +++++-- Require restore via the restore command or make a restore Job
3350 +++++-  get the bootstrap file.
3351 +++++-- Implement Maximum Job Spool Size
3352 +++++-- Fix 3993 error in SD. It forgets to look at autochanger
3353 +++++-  resource for device command, ...
3354 +++++-- 3. Prevent two drives requesting the same Volume in any given
3355 +++++-     autochanger, by checking if a Volume is mounted on another drive
3356 +++++-     in an Autochanger.
3357 +++++-- Upgrade to MySQL 4.1.12 See:  
3358 +++++-  http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html
3359 +++++-- Add # Job Level date to bsr file
3360 +++++-- Implement "PreferMountedVolumes = yes|no" in Job resource.
3361 +++++-##   Integrate web-bacula into a new Bacula project with
3362 +++++-     bimagemgr.
3363 +++++-- Cleaning tapes should have Status "Cleaning" rather than append.
3364 +++++-- Make sure that Python has access to Client address/port so that
3365 +++++-  it can check if Clients are alive.
3366 +++++-- Review all items in "restore".
3367 +++++-- Fix PostgreSQL GROUP BY problems in restore.
3368 +++++-- Fix PostgreSQL sql problems in bugs.
3369 +++++-- After rename
3370 +++++-  04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume 
3371 +++++-     "DLT-13Feb04".
3372 +++++-  Current Volume "DLT-04Jul05" not acceptable because:
3373 +++++-  1997 Volume "DLT-13Feb04" not in catalog.
3374 +++++-  04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device 
3375 +++++-     "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02
3376 +++++-##   Create a new GUI chapter explaining all the GUI programs.
3377 +++++--    Make "update slots" when pointing to Autochanger, remove
3378 +++++-     all Volumes from other drives.  "update slots all-drives"?
3379 +++++-     No, this is done by modifying mtx-changer to list what is
3380 +++++-     in the drives.
3381 +++++-- Finish TLS implementation.
3382 +++++-- Port limiting -m in iptables to prevent DoS attacks
3383 +++++-  could cause broken pipes on Bacula.
3384 +++++-6. Build and test the Volume Shadow Copy (VSS) for Win32. 
3385 +++++--  Allow cancel of unknown Job
3386 +++++--  State not saved when closing Win32 FD by icon
3387 +++++--  bsr-opt-test fails. bsr deleted. Fix.
3388 +++++--  Move Python daemon variables from Job to Bacula object.
3389 +++++-   WorkingDir, ConfigFile
3390 +++++-- Document that Bootstrap files can be written with cataloging
3391 +++++-  turned off.
3392 +++++-- Document details of ANSI/IBM labels
3393 +++++-- OS linux 2.4
3394 +++++-  1) ADIC, DLT, FastStor 4000, 7*20GB
3395 +++++-- Linux Sony LIB-D81, AIT-3 library works.
3396 +++++-- Doc the following
3397 +++++-  to activate, check or disable the hardware compression feature on my 
3398 +++++-  exb-8900 i use the exabyte "MammothTool" you can get it here:
3399 +++++-  http://www.exabyte.com/support/online/downloads/index.cfm
3400 +++++-  There is a solaris version of this tool. With option -C 0 or 1 you can 
3401 +++++-  disable or activate compression. Start this tool without any options for 
3402 +++++-  a small reference.
3403 +++++-- Document Heartbeat Interval in the dealing with firewalls section.
3404 +++++-- Document new CDROM directory.
3405 +++++-- On Win32 working directory must have drive letter ????
3406 +++++-- On Win32 working directory must be writable by SYSTEM to
3407 +++++-  do restores.
3408 +++++-- Document that ChangerDevice is used for Alert command.
3409 +++++-- Add better documentation on how restores can be done
3410 +++++-8. Take one more try at making DVD writing work (no go)
3411 +++++-7. Write a bacula-web document
3412 +++++-- Why isn't the DEVICE structure defined when doing
3413 +++++-  a reservation?
3414 +++++-- Multi-drive changer seems to only use drive 0
3415 +++++-  Multiple drives don't seem to be opened.
3416 +++++-- My database is growing
3417 +++++-- Call GetLastError() in the berrno constructor rather
3418 +++++-  than delaying until strerror.
3419 +++++-- Tape xxx in drive 0, requested in drive 1
3420 +++++-- The mount command does not work with drives other than 0.
3421 +++++-- A mount should cause the SD to re-examine what Slot is   
3422 +++++-  loaded.
3423 +++++-- The SD locks on to the first available drive then
3424 +++++-  wants a Volume that is released but in another drive --
3425 +++++-  chaos.
3426 +++++-- Run the regression scripts on Solaris and FreeBSD
3427 +++++--  Figure out how to package gui, and rescue programs.
3428 +++++-- Add a .dir command to restore tree code to eliminate the problem
3429 +++++-- Mount after manually unloading changer causes hang in SD
3430 +++++-- Fix JobACL with restore by JobId.
3431 ++++++=== Done -- see kernsdone
3432 +++++Index: kes-1.38
3433 +++++===================================================================
3434 +++++RCS file: /cvsroot/bacula/bacula/kes-1.38,v
3435 +++++retrieving revision 1.1.2.13
3436 +++++diff -u -r1.1.2.13 kes-1.38
3437 +++++--- kes-1.38       14 Nov 2005 20:20:38 -0000      1.1.2.13
3438 ++++++++ kes-1.38       21 Nov 2005 13:13:00 -0000
3439 +++++@@ -3,6 +3,18 @@
3440 +++++ 
3441 +++++ General:
3442 +++++ 
3443 ++++++Changes to 1.38.2:
3444 ++++++20Oct05
3445 ++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
3446 ++++++- Fix bnet-server bug found on OpenBSD. Bug #486
3447 ++++++- Fix cancel failure bug. Bug #481
3448 ++++++- Fix failure when Pool name has spaces. Bug #487   
3449 ++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
3450 ++++++- Fix a couple of free()s in src/filed/acl.c
3451 ++++++- Fix memory overrun in bfile.c in building OS X resource
3452 ++++++  fork filename. Bug #489 
3453 ++++++- Add Pool name to SD status output.
3454 ++++++
3455 +++++ Changes to 1.38.1:
3456 +++++ 14Oct05
3457 +++++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
3458 +++++Index: projects
3459 +++++===================================================================
3460 +++++RCS file: /cvsroot/bacula/bacula/projects,v
3461 +++++retrieving revision 1.12.2.3
3462 +++++diff -u -r1.12.2.3 projects
3463 +++++--- projects       10 Nov 2005 20:25:27 -0000      1.12.2.3
3464 ++++++++ projects       21 Nov 2005 13:13:00 -0000
3465 +++++@@ -228,7 +228,175 @@
3466 +++++ 
3467 +++++   Why:    Performance enhancement.
3468 +++++ 
3469 ++++++Item 13:  Let Bacula log tape usage and handle drive cleaning cycles.
3470 ++++++  Date:   November 11, 2005
3471 ++++++  Origin: Arno Lehmann <al at its-lehmann dot de>
3472 ++++++  Status:
3473 ++++++
3474 ++++++  What:   Make Bacula manage tape life cycle information and drive 
3475 ++++++          cleaning cycles.
3476 ++++++
3477 ++++++  Why:    Both parts of this project are important when operating backups.
3478 ++++++          We need to know which tapes need replacement, and we need to
3479 ++++++          make sure the drives are cleaned when necessary.  While many
3480 ++++++          tape libraries and even autoloaders can handle all this
3481 ++++++          automatically, support by Bacula can be helpful for smaller
3482 ++++++          (older) libraries and single drives.  Also, checking drive
3483 ++++++          status during operation can prevent some failures (as I had to
3484 ++++++          learn the hard way...)
3485 ++++++
3486 ++++++  Notes:  First, Bacula could (and even does, to some limited extent)
3487 ++++++          record tape and drive usage.  For tapes, the number of mounts,
3488 ++++++          the amount of data, and the time the tape has actually been
3489 ++++++          running could be recorded.  Data fields for Read and Write time
3490 ++++++          and Nmber of mounts already exist in the catalog (I'm not sure
3491 ++++++          if VolBytes is the sum of all bytes ever written to that volume
3492 ++++++          by Bacula).  This information can be important when determining
3493 ++++++          which media to replace.  For the tape drives known to Bacula,
3494 ++++++          similar information is interesting to determine the device
3495 ++++++          status and expected life time: Time it's been Reading and
3496 ++++++          Writing, number of tape Loads / Unloads / Errors.  This
3497 ++++++          information is not yet recorded as far as I know.
3498 ++++++
3499 ++++++          The next step would be implementing drive cleaning setup.
3500 ++++++          Bacula already has knowledge about cleaning tapes.  Once it has
3501 ++++++          some information about cleaning cycles (measured in drive run
3502 ++++++          time, number of tapes used, or calender days, for example) it
3503 ++++++          can automatically execute tape cleaning (with an autochanger,
3504 ++++++          obviously) or ask for operator assistence loading a cleaning
3505 ++++++          tape.
3506 ++++++
3507 ++++++          The next step would be to implement TAPEALERT checks not only
3508 ++++++          when changing tapes and only sending he information to the
3509 ++++++          administrator, but rather checking after each tape error,
3510 ++++++          checking on a regular basis (for example after each tape file),
3511 ++++++          and also before unloading and after loading a new tape.  Then,
3512 ++++++          depending on the drives TAPEALERT state and the know drive
3513 ++++++          cleaning state Bacula could automatically schedule later
3514 ++++++          cleaning, clean immediately, or inform the operator.
3515 ++++++
3516 ++++++          Implementing this would perhaps require another catalog change
3517 ++++++          and perhaps major changes in SD code and the DIR-SD protocoll,
3518 ++++++          so I'd only consider this worth implementing if it would
3519 ++++++          actually be used or even needed by many people. 
3520 ++++++
3521 ++++++Item 14:  Merging of multiple backups into a single one. (Also called Synthetic
3522 ++++++          Backup or Consolidation).
3523 ++++++
3524 ++++++  Origin: Marc Cousin and Eric Bollengier 
3525 ++++++  Date:   15 November 2005
3526 ++++++  Status: Depends on first implementing project Item 1 (Migration).
3527 ++++++
3528 ++++++  What:   A merged backup is a backup made without connecting to the Client.
3529 ++++++          It would be a Merge of existing backups into a single backup.
3530 ++++++          In effect, it is like a restore but to the backup medium.
3531 ++++++
3532 ++++++          For instance, say that last sunday we made a full backup.  Then
3533 ++++++          all week long, we created incremental backups, in order to do
3534 ++++++          them fast.  Now comes sunday again, and we need another full.
3535 ++++++          The merged backup makes it possible to do instead an incremental
3536 ++++++          backup (during the night for instance), and then create a merged
3537 ++++++          backup during the day, by using the full and incrementals from
3538 ++++++          the week.  The merged backup will be exactly like a full made
3539 ++++++          sunday night on the tape, but the production interruption on the
3540 ++++++          Client will be minimal, as the Client will only have to send
3541 ++++++          incrementals.
3542 ++++++
3543 ++++++          In fact, if it's done correctly, you could merge all the
3544 ++++++          Incrementals into single Incremental, or all the Incrementals
3545 ++++++          and the last Differential into a new Differential, or the Full,
3546 ++++++          last differential and all the Incrementals into a new Full
3547 ++++++          backup.  And there is no need to involve the Client.
3548 ++++++
3549 ++++++  Why:    The benefit is that :
3550 ++++++          - the Client just does an incremental ;
3551 ++++++          - the merged backup on tape is just as a single full backup,
3552 ++++++            and can be restored very fast.
3553 ++++++
3554 ++++++          This is also a way of reducing the backup data since the old
3555 ++++++          data can then be pruned (or not) from the catalog, possibly
3556 ++++++          allowing older volumes to be recycled
3557 ++++++
3558 ++++++Item 15:  Automatic disabling of devices
3559 ++++++   Date:   2005-11-11
3560 ++++++   Origin: Peter Eriksson <peter at ifm.liu dot se>
3561 ++++++   Status:
3562 ++++++
3563 ++++++   What:  After a configurable amount of fatal errors with a tape drive
3564 ++++++          Bacula should automatically disable further use of a certain
3565 ++++++          tape drive. There should also be "disable"/"enable" commands in
3566 ++++++          the "bconsole" tool.
3567 ++++++
3568 ++++++   Why:   On a multi-drive jukebox there is a possibility of tape drives
3569 ++++++          going bad during large backups (needing a cleaning tape run,
3570 ++++++          tapes getting stuck). It would be advantageous if Bacula would
3571 ++++++          automatically disable further use of a problematic tape drive
3572 ++++++          after a configurable amount of errors has occured.
3573 ++++++
3574 ++++++          An example: I have a multi-drive jukebox (6 drives, 380+ slots)
3575 ++++++          where tapes occasionally get stuck inside the drive. Bacula will
3576 ++++++          notice that the "mtx-changer" command will fail and then fail
3577 ++++++          any backup jobs trying to use that drive. However, it will still
3578 ++++++          keep on trying to run new jobs using that drive and fail -
3579 ++++++          forever, and thus failing lots and lots of jobs... Since we have
3580 ++++++          many drives Bacula could have just automatically disabled
3581 ++++++          further use of that drive and used one of the other ones
3582 ++++++          instead.
3583 ++++++
3584 ++++++
3585 ++++++Item 16:  Directive/mode to backup only file changes, not entire file
3586 ++++++  Date:   11 November 2005
3587 ++++++  Origin: Joshua Kugler <joshua dot kugler at uaf dot edu>
3588 ++++++          Marek Bajon <mbajon at bimsplus dot com dot pl>
3589 ++++++  Status: RFC
3590 ++++++
3591 ++++++  What:   Currently when a file changes, the entire file will be backed up in
3592 ++++++          the next incremental or full backup.  To save space on the tapes
3593 ++++++          it would be nice to have a mode whereby only the changes to the
3594 ++++++          file would be backed up when it is changed.
3595 ++++++
3596 ++++++  Why:    This would save lots of space when backing up large files such as 
3597 ++++++          logs, mbox files, Outlook PST files and the like.
3598 ++++++
3599 ++++++  Notes:  This would require the usage of disk-based volumes as comparing 
3600 ++++++          files would not be feasible using a tape drive.
3601 ++++++
3602 ++++++Item 17:  Quick release of FD-SD connection
3603 ++++++  Origin: Frank Volf (frank at deze dot org)
3604 ++++++  Date:   17 november 2005
3605 ++++++  Status:
3606 ++++++
3607 ++++++   What:  In the bacula implementation a backup is finished after all data
3608 ++++++          and attributes are succesfully written to storage.  When using a
3609 ++++++          tape backup it is very annoying that a backup can take a day,
3610 ++++++          simply because the current tape (or whatever) is full and the
3611 ++++++          administrator has not put a new one in.  During that time the
3612 ++++++          system cannot be taken off-line, because there is still an open
3613 ++++++          session between the storage daemon and the file daemon on the
3614 ++++++          client.
3615 ++++++
3616 ++++++          Although this is a very good strategey for making "safe backups"
3617 ++++++          This can be annoying for e.g.  laptops, that must remain
3618 ++++++          connected until the bacukp is completed.
3619 ++++++
3620 ++++++          Using a new feature called "migration" it will be possible to
3621 ++++++          spool first to harddisk (using a special 'spool' migration
3622 ++++++          scheme) and then migrate the backup to tape.
3623 ++++++
3624 ++++++          There is still the problem of getting the attributes committed.
3625 ++++++          If it takes a very long time to do, with the current code, the
3626 ++++++          job has not terminated, and the File daemon is not freed up.  The
3627 ++++++          Storage daemon should release the File daemon as soon as all the
3628 ++++++          file data and all the attributes have been sent to it (the SD).
3629 ++++++          Currently the SD waits until everything is on tape and all the
3630 ++++++          attributes are transmitted to the Director before signalling
3631 ++++++          completion to the FD. I don't think I would have any problem
3632 ++++++          changing this.  The reason is that even if the FD reports back to
3633 ++++++          the Dir that all is OK, the job will not terminate until the SD
3634 ++++++          has done the same thing -- so in a way keeping the SD-FD link
3635 ++++++          open to the very end is not really very productive ...
3636 +++++ 
3637 ++++++   Why:   Makes backup of laptops much easier.
3638 +++++ 
3639 +++++ 
3640 +++++ ============= Empty RFC form ===========
3641 +++++@@ -245,33 +413,4 @@
3642 +++++ ============== End RFC form ==============
3643 +++++ 
3644 +++++ 
3645 +++++-Items completed for release 1.38.0:
3646 +++++-#4   Embedded Python Scripting (implemented in all Daemons)
3647 +++++-#5   Events that call a Python program (Implemented in all
3648 +++++-       daemons, but more cleanup work to be done).
3649 +++++-#6   Select one from among Multiple Storage Devices for Job.
3650 +++++-       This is already implemented in 1.37.
3651 +++++-#7   Single Job Writing to Multiple Storage Devices. This is
3652 +++++-       currently implemented with a Clone feature.
3653 +++++-#-   Full multiple drive Autochanger support (done in 1.37)
3654 +++++-#-   Built in support for communications encryption (TLS) 
3655 +++++-       done by Landon Fuller.
3656 +++++-#    Support for Unicode characters
3657 +++++-       (via UTF-8) on Win32 machines thanks to Thorsten Engel.
3658 +++++-Item  8:  Break the one-to-one Relationship between a Job and a
3659 +++++-          Specific Storage Device (or Devices if #10 is implemented).
3660 +++++-
3661 +++++-Completed items from last year's list:
3662 +++++-Item 1:   Multiple simultaneous Jobs. (done)
3663 +++++-Item 3:   Write the bscan program -- also write a bcopy program (done).
3664 +++++-Item 5:   Implement Label templates (done).
3665 +++++-Item 6:   Write a regression script (done)
3666 +++++-Item 9:   Add SSL to daemon communications (done by Landon Fuller)
3667 +++++-Item 10:  Define definitive tape format (done)
3668 +++++-Item 3:   GUI for interactive restore. Partially Implemented in 1.34
3669 +++++-          Note, there is now a complete Webmin plugin, a partial
3670 +++++-          GNOME console, and an excellent wx-console GUI.
3671 +++++-Item 4:   GUI for interactive backup
3672 +++++-Item 2:   Job Data Spooling.
3673 +++++-    Done: Regular expression matching.
3674 +++++-Item 10:  New daemon communication protocol (this has been dropped).
3675 ++++++Items completed for release 1.38.0 -- see kernsdone
3676 +++++Index: patches/1.38.1-to-1.38.2.patch
3677 +++++===================================================================
3678 +++++RCS file: patches/1.38.1-to-1.38.2.patch
3679 +++++diff -N patches/1.38.1-to-1.38.2.patch
3680 +++++--- /dev/null      1 Jan 1970 00:00:00 -0000
3681 ++++++++ patches/1.38.1-to-1.38.2.patch 21 Nov 2005 13:13:01 -0000
3682 +++++@@ -0,0 +1,1414 @@
3683 ++++++
3684 ++++++ This patch fixes the following bugs:
3685 ++++++
3686 ++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
3687 ++++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
3688 ++++++  says that this patch does not fix his problem)
3689 ++++++- Fix cancel failure bug. Bug #481
3690 ++++++- Fix failure when Pool name has spaces. Bug #487
3691 ++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
3692 ++++++- Fix a couple of free()s in src/filed/acl.c
3693 ++++++- Fix memory overrun in bfile.c in building OS X resource
3694 ++++++  fork filename. Bug #489
3695 ++++++
3696 ++++++This patch is applied to Bacula source version 1.38.1 and will
3697 ++++++produce Bacula source version 1.38.2.  Apply it with:
3698 ++++++
3699 ++++++   cd <bacula-1.38.1-source>
3700 ++++++   ./configure (your options) if not already done
3701 ++++++   patch -p0 <1.38.1-to-1.38.2.patch
3702 ++++++   make
3703 ++++++   make install
3704 ++++++
3705 ++++++? osx_finder.patch
3706 ++++++Index: kernstodo
3707 ++++++===================================================================
3708 ++++++RCS file: /cvsroot/bacula/bacula/kernstodo,v
3709 ++++++retrieving revision 1.570.2.6
3710 ++++++diff -u -r1.570.2.6 kernstodo
3711 ++++++--- kernstodo     4 Nov 2005 09:16:49 -0000       1.570.2.6
3712 +++++++++ kernstodo     21 Nov 2005 13:06:36 -0000
3713 ++++++@@ -1,5 +1,5 @@
3714 ++++++                     Kern's ToDo List
3715 ++++++-                     03 November 2005
3716 +++++++                     21 November 2005
3717 ++++++ 
3718 ++++++ Major development:      
3719 ++++++ Project                     Developer
3720 ++++++@@ -7,8 +7,6 @@
3721 ++++++ Version 1.37                Kern (see below)
3722 ++++++ ========================================================
3723 ++++++ 
3724 ++++++-Final items for 1.37 before release:
3725 ++++++-
3726 ++++++ Document:
3727 ++++++ - Does ClientRunAfterJob fail the job on a bad return code?
3728 ++++++ - Document cleaning up the spool files:
3729 ++++++@@ -18,6 +16,8 @@
3730 ++++++ - Does WildFile match against full name?  Doc.
3731 ++++++ 
3732 ++++++ For 1.39:
3733 +++++++- Make sure that all do_prompt() calls in Dir check for
3734 +++++++  -1 (error) and -2 (cancel) returns.
3735 ++++++ - Look at -D_FORTIFY_SOURCE=2
3736 ++++++ - Add Win32 FileSet definition somewhere
3737 ++++++ - Look at fixing restore status stats in SD.
3738 ++++++@@ -27,6 +27,12 @@
3739 ++++++   encountered, read many times (as it currently does), and if the
3740 ++++++   block cannot be read, skip to the next block, and try again.  If
3741 ++++++   that fails, skip to the next file and try again, ...
3742 +++++++- Add level table:
3743 +++++++  create table LevelType (LevelType binary(1), LevelTypeLong tinyblob);
3744 +++++++  insert into LevelType (LevelType,LevelTypeLong) values
3745 +++++++  ("F","Full"),
3746 +++++++  ("D","Diff"),
3747 +++++++  ("I","Inc");
3748 ++++++ - Add ACL to restore only to original location.
3749 ++++++ - Add a recursive mark command (rmark) to restore.
3750 ++++++ - "Minimum Job Interval = nnn" sets minimum interval between Jobs
3751 ++++++@@ -1246,219 +1252,4 @@
3752 ++++++ ====
3753 ++++++ 
3754 ++++++ 
3755 ++++++-=== Done
3756 ++++++-- Save mount point for directories not traversed with onefs=yes.
3757 ++++++-- Add seconds to start and end times in the Job report output.
3758 ++++++-- if 2 concurrent backups are attempted on the same tape
3759 ++++++-  drive (autoloader) into different tape pools, one of them will exit
3760 ++++++-  fatally instead of halting until the drive is idle
3761 ++++++-- Update StartTime if job held in Job Queue.
3762 ++++++-- Look at www.nu2.nu/pebuilder as a helper for full windows
3763 ++++++-  bare metal restore. (done by Scott)
3764 ++++++-- Fix orphanned buffers:
3765 ++++++-   Orphaned buffer:      24 bytes allocated at line 808 of rufus-dir job.c
3766 ++++++-   Orphaned buffer:      40 bytes allocated at line 45 of rufus-dir alist.c
3767 ++++++-- Implement Preben's suggestion to add
3768 ++++++-  File System Types = ext2, ext3 
3769 ++++++-  to FileSets, thus simplifying backup of *all* local partitions.
3770 ++++++-- Try to open a device on each Job if it was not opened
3771 ++++++-  when the SD started.
3772 ++++++-- Add dump of VolSessionId/Time and FileIndex with bls.
3773 ++++++-- If Bacula does not find the right tape in the Autochanger,
3774 ++++++-  then mark the tape in error and move on rather than asking
3775 ++++++-  for operator intervention.
3776 ++++++-- Cancel command should include JobId in list of Jobs.
3777 ++++++-- Add performance testing hooks
3778 ++++++-- Bootstrap from JobMedia records.
3779 ++++++-- Implement WildFile and WildDir to solve problem of 
3780 ++++++-  saving only *.doc files.
3781 ++++++-- Fix
3782 ++++++-   Please use the "label"  command to create a new Volume for:
3783 ++++++-       Storage:      DDS-4-changer
3784 ++++++-       Media type:   
3785 ++++++-       Pool:         Default
3786 ++++++-   label
3787 ++++++-   The defined Storage resources are:
3788 ++++++-- Copy Changer Device and Changer Command from Autochanger
3789 ++++++-  to Device resource in SD if none given in Device resource.
3790 ++++++-- 1. Automatic use of more than one drive in an autochanger (done)
3791 ++++++-- 2. Automatic selection of the correct drive for each Job (i.e.
3792 ++++++-     selects a drive with an appropriate Volume for the Job) (done)
3793 ++++++-- 6. Allow multiple simultaneous Jobs referencing the same pool write
3794 ++++++-    to several tapes (some new directive(s) are are probably needed for
3795 ++++++-    this) (done)
3796 ++++++-- Locking (done)
3797 ++++++-- Key on Storage rather than Pool (done)
3798 ++++++-- Allow multiple drives to use same Pool (change jobq.c DIR) (done).
3799 ++++++-- Synchronize multiple drives so that not more
3800 ++++++-  than one loads a tape and any time (done)
3801 ++++++-- 4. Use Changer Device and Changer Command specified in the
3802 ++++++-     Autochanger resource, if none is found in the Device resource.
3803 ++++++-    You can continue to specify them in the Device resource if you want
3804 ++++++-    or need them to be different for each device.
3805 ++++++-- 5. Implement a new Device directive (perhaps "Autoselect = yes/no") 
3806 ++++++-    that can allow a Device be part of an Autochanger, and hence the changer
3807 ++++++-    script protected, but if set to no, will prevent the Device from being 
3808 ++++++-    automatically selected from the changer. This allows the device to
3809 ++++++-    be directly accessed through its Device name, but not through the
3810 ++++++-    AutoChanger name.
3811 ++++++-#6   Select one from among Multiple Storage Devices for Job
3812 ++++++-#5   Events that call a Python program 
3813 ++++++-     (Implemented in Dir/SD)
3814 ++++++-- Make sure the Device name is in the Query packet returned.
3815 ++++++-- Don't start a second file job if one is already running.
3816 ++++++-- Implement EOF/EOV labels for ANSI labels
3817 ++++++-- Implement IBM labels.
3818 ++++++-- When Python creates a new label, the tape is immediately
3819 ++++++-  recycled and no label created. This happens when using   
3820 ++++++-  autolabeling -- even when Python doesn't generate the name.
3821 ++++++-- Scratch Pool where the volumes can be re-assigned to any Pool.
3822 ++++++-- 28-Mar 23:19 rufus-sd: acquire.c:379 Device "DDS-4" (/dev/nst0) 
3823 ++++++-  is busy reading. Job 6 canceled.
3824 ++++++-- Remove separate thread for opening devices in SD.  On the other
3825 ++++++-  hand, don't block waiting for open() for devices.
3826 ++++++-- Fix code to either handle updating NumVol or to calculate it in
3827 ++++++-  Dir next_vol.c
3828 ++++++-- Ensure that you cannot exclude a directory or a file explicitly
3829 ++++++-  Included with File.
3830 ++++++-#4   Embedded Python Scripting 
3831 ++++++-     (Implemented in Dir/SD/FD)
3832 ++++++-- Add Python writable variable for changing the Priority,
3833 ++++++-    Client, Storage, JobStatus (error), ...
3834 ++++++-- SD Python
3835 ++++++-  - Solicit Events
3836 ++++++-- Add disk seeking on restore; turn off seek on tapes.
3837 ++++++-  stored/match_bsr.c
3838 ++++++-- Look at dird_conf.c:1000: warning: `int size' 
3839 ++++++-  might be used uninitialized in this function
3840 ++++++-- Indicate when a Job is purged/pruned during restore.
3841 ++++++-- Implement some way to turn off automatic pruning in Jobs.
3842 ++++++-- Implement a way an Admin Job can prune, possibly multiple
3843 ++++++-  clients -- Python script?
3844 ++++++-- Look at Preben's acl.c error handling code.
3845 ++++++-- SD crashes after a tape restore then doing a backup. 
3846 ++++++-- If drive is opened read/write, close it and re-open
3847 ++++++-  read-only if doing a restore, and vice-versa.
3848 ++++++-- Windows restore:
3849 ++++++-  data-fd: RestoreFiles.2004-12-07_15.56.42 Error:
3850 ++++++-  > ..\findlib\../../findlib/create_file.c:275 Could not open e:/: ERR=Der
3851 ++++++-  > Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen
3852 ++++++-  > Prozess verwendet wird.
3853 ++++++-  Restore restores all files, but then fails at the end trying
3854 ++++++-  to set the attributes of e:
3855 ++++++-  from failed jobs.- Resolve the problem between Device name and Archive name,
3856 ++++++-  and fix SD messages.
3857 ++++++-- Tell the "restore" user when browsing is no longer possible.
3858 ++++++-- Add a restore directory-x
3859 ++++++-- Write non-optimized bsrs from the JobMedia and Media records,
3860 ++++++-  even after Files are pruned.
3861 ++++++-- Delete Stripe and Copy from VolParams to save space.
3862 ++++++-- Fix option 2 of restore -- list where file is backed up -- require Client,
3863 ++++++-  then list last 20 backups.
3864 ++++++-- Finish implementation of passing all Storage and Device needs to
3865 ++++++-  the SD.
3866 ++++++-- Move test for max wait time exceeded in job.c up -- Peter's idea.
3867 ++++++-##   Consider moving docs to their own project.
3868 ++++++-##   Move rescue to its own project.
3869 ++++++-- Add client version to the Client name line that prints in
3870 ++++++-  the Job report.
3871 ++++++-- Fix the Rescue CDROM.
3872 ++++++-- By the way: on page http://www.bacula.org/?page=tapedrives , at the 
3873 ++++++-  bottom, the link to "Tape Testing Chapter" is broken. It goes to 
3874 ++++++-  /html-manual/... while the others point to /rel-manual/...
3875 ++++++-- Device resource needs the "name" of the SD.
3876 ++++++-- Specify a single directory to restore.
3877 ++++++-- Implement MediaType keyword in bsr?   
3878 ++++++-- Add a date and time stamp at the beginning of every line in the 
3879 ++++++-  Job report (Volker Sauer).
3880 ++++++-- Add level to estimate command.
3881 ++++++-- Add "limit=n" for "list jobs"
3882 ++++++-- Make bootstrap filename unique.
3883 ++++++-- Make Dmsg look at global before calling subroutine.
3884 ++++++-- From Chris Hull:
3885 ++++++-   it seems to be complaining about 12:00pm which should be a valid 12
3886 ++++++-   hour time.  I changed the time to 11:59am and everything works fine.
3887 ++++++-   Also 12:00am works fine.  0:00pm also works (which I don't think
3888 ++++++-   should).  None of the values 12:00pm - 12:59pm work for that matter.
3889 ++++++-- Require restore via the restore command or make a restore Job
3890 ++++++-  get the bootstrap file.
3891 ++++++-- Implement Maximum Job Spool Size
3892 ++++++-- Fix 3993 error in SD. It forgets to look at autochanger
3893 ++++++-  resource for device command, ...
3894 ++++++-- 3. Prevent two drives requesting the same Volume in any given
3895 ++++++-     autochanger, by checking if a Volume is mounted on another drive
3896 ++++++-     in an Autochanger.
3897 ++++++-- Upgrade to MySQL 4.1.12 See:  
3898 ++++++-  http://dev.mysql.com/doc/mysql/en/Server_SQL_mode.html
3899 ++++++-- Add # Job Level date to bsr file
3900 ++++++-- Implement "PreferMountedVolumes = yes|no" in Job resource.
3901 ++++++-##   Integrate web-bacula into a new Bacula project with
3902 ++++++-     bimagemgr.
3903 ++++++-- Cleaning tapes should have Status "Cleaning" rather than append.
3904 ++++++-- Make sure that Python has access to Client address/port so that
3905 ++++++-  it can check if Clients are alive.
3906 ++++++-- Review all items in "restore".
3907 ++++++-- Fix PostgreSQL GROUP BY problems in restore.
3908 ++++++-- Fix PostgreSQL sql problems in bugs.
3909 ++++++-- After rename
3910 ++++++-  04-Jul 13:01 MainSD: Rufus.2005-07-04_01.05.02 Warning: Director wanted Volume 
3911 ++++++-     "DLT-13Feb04".
3912 ++++++-  Current Volume "DLT-04Jul05" not acceptable because:
3913 ++++++-  1997 Volume "DLT-13Feb04" not in catalog.
3914 ++++++-  04-Jul 13:01 MainSD: Please mount Volume "DLT-04Jul05" on Storage Device 
3915 ++++++-     "HP DLT 80" (/dev/nst0) for Job Rufus.2005-07-04_01.05.02
3916 ++++++-##   Create a new GUI chapter explaining all the GUI programs.
3917 ++++++--    Make "update slots" when pointing to Autochanger, remove
3918 ++++++-     all Volumes from other drives.  "update slots all-drives"?
3919 ++++++-     No, this is done by modifying mtx-changer to list what is
3920 ++++++-     in the drives.
3921 ++++++-- Finish TLS implementation.
3922 ++++++-- Port limiting -m in iptables to prevent DoS attacks
3923 ++++++-  could cause broken pipes on Bacula.
3924 ++++++-6. Build and test the Volume Shadow Copy (VSS) for Win32. 
3925 ++++++--  Allow cancel of unknown Job
3926 ++++++--  State not saved when closing Win32 FD by icon
3927 ++++++--  bsr-opt-test fails. bsr deleted. Fix.
3928 ++++++--  Move Python daemon variables from Job to Bacula object.
3929 ++++++-   WorkingDir, ConfigFile
3930 ++++++-- Document that Bootstrap files can be written with cataloging
3931 ++++++-  turned off.
3932 ++++++-- Document details of ANSI/IBM labels
3933 ++++++-- OS linux 2.4
3934 ++++++-  1) ADIC, DLT, FastStor 4000, 7*20GB
3935 ++++++-- Linux Sony LIB-D81, AIT-3 library works.
3936 ++++++-- Doc the following
3937 ++++++-  to activate, check or disable the hardware compression feature on my 
3938 ++++++-  exb-8900 i use the exabyte "MammothTool" you can get it here:
3939 ++++++-  http://www.exabyte.com/support/online/downloads/index.cfm
3940 ++++++-  There is a solaris version of this tool. With option -C 0 or 1 you can 
3941 ++++++-  disable or activate compression. Start this tool without any options for 
3942 ++++++-  a small reference.
3943 ++++++-- Document Heartbeat Interval in the dealing with firewalls section.
3944 ++++++-- Document new CDROM directory.
3945 ++++++-- On Win32 working directory must have drive letter ????
3946 ++++++-- On Win32 working directory must be writable by SYSTEM to
3947 ++++++-  do restores.
3948 ++++++-- Document that ChangerDevice is used for Alert command.
3949 ++++++-- Add better documentation on how restores can be done
3950 ++++++-8. Take one more try at making DVD writing work (no go)
3951 ++++++-7. Write a bacula-web document
3952 ++++++-- Why isn't the DEVICE structure defined when doing
3953 ++++++-  a reservation?
3954 ++++++-- Multi-drive changer seems to only use drive 0
3955 ++++++-  Multiple drives don't seem to be opened.
3956 ++++++-- My database is growing
3957 ++++++-- Call GetLastError() in the berrno constructor rather
3958 ++++++-  than delaying until strerror.
3959 ++++++-- Tape xxx in drive 0, requested in drive 1
3960 ++++++-- The mount command does not work with drives other than 0.
3961 ++++++-- A mount should cause the SD to re-examine what Slot is   
3962 ++++++-  loaded.
3963 ++++++-- The SD locks on to the first available drive then
3964 ++++++-  wants a Volume that is released but in another drive --
3965 ++++++-  chaos.
3966 ++++++-- Run the regression scripts on Solaris and FreeBSD
3967 ++++++--  Figure out how to package gui, and rescue programs.
3968 ++++++-- Add a .dir command to restore tree code to eliminate the problem
3969 ++++++-- Mount after manually unloading changer causes hang in SD
3970 ++++++-- Fix JobACL with restore by JobId.
3971 +++++++=== Done -- see kernsdone
3972 ++++++Index: kes-1.38
3973 ++++++===================================================================
3974 ++++++RCS file: /cvsroot/bacula/bacula/kes-1.38,v
3975 ++++++retrieving revision 1.1.2.13
3976 ++++++diff -u -r1.1.2.13 kes-1.38
3977 ++++++--- kes-1.38      14 Nov 2005 20:20:38 -0000      1.1.2.13
3978 +++++++++ kes-1.38      21 Nov 2005 13:06:36 -0000
3979 ++++++@@ -3,6 +3,17 @@
3980 ++++++ 
3981 ++++++ General:
3982 ++++++ 
3983 +++++++Changes after release of 1.38.1:
3984 +++++++20Oct05
3985 +++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
3986 +++++++- Fix bnet-server bug found on OpenBSD. Bug #486
3987 +++++++- Fix cancel failure bug. Bug #481
3988 +++++++- Fix failure when Pool name has spaces. Bug #487   
3989 +++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
3990 +++++++- Fix a couple of free()s in src/filed/acl.c
3991 +++++++- Fix memory overrun in bfile.c in building OS X resource
3992 +++++++  fork filename. Bug #489 
3993 +++++++
3994 ++++++ Changes to 1.38.1:
3995 ++++++ 14Oct05
3996 ++++++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
3997 ++++++Index: projects
3998 ++++++===================================================================
3999 ++++++RCS file: /cvsroot/bacula/bacula/projects,v
4000 ++++++retrieving revision 1.12.2.3
4001 ++++++diff -u -r1.12.2.3 projects
4002 ++++++--- projects      10 Nov 2005 20:25:27 -0000      1.12.2.3
4003 +++++++++ projects      21 Nov 2005 13:06:37 -0000
4004 ++++++@@ -228,7 +228,175 @@
4005 ++++++ 
4006 ++++++   Why:    Performance enhancement.
4007 ++++++ 
4008 +++++++Item 13:  Let Bacula log tape usage and handle drive cleaning cycles.
4009 +++++++  Date:   November 11, 2005
4010 +++++++  Origin: Arno Lehmann <al at its-lehmann dot de>
4011 +++++++  Status:
4012 +++++++
4013 +++++++  What:   Make Bacula manage tape life cycle information and drive 
4014 +++++++          cleaning cycles.
4015 +++++++
4016 +++++++  Why:    Both parts of this project are important when operating backups.
4017 +++++++          We need to know which tapes need replacement, and we need to
4018 +++++++          make sure the drives are cleaned when necessary.  While many
4019 +++++++          tape libraries and even autoloaders can handle all this
4020 +++++++          automatically, support by Bacula can be helpful for smaller
4021 +++++++          (older) libraries and single drives.  Also, checking drive
4022 +++++++          status during operation can prevent some failures (as I had to
4023 +++++++          learn the hard way...)
4024 +++++++
4025 +++++++  Notes:  First, Bacula could (and even does, to some limited extent)
4026 +++++++          record tape and drive usage.  For tapes, the number of mounts,
4027 +++++++          the amount of data, and the time the tape has actually been
4028 +++++++          running could be recorded.  Data fields for Read and Write time
4029 +++++++          and Nmber of mounts already exist in the catalog (I'm not sure
4030 +++++++          if VolBytes is the sum of all bytes ever written to that volume
4031 +++++++          by Bacula).  This information can be important when determining
4032 +++++++          which media to replace.  For the tape drives known to Bacula,
4033 +++++++          similar information is interesting to determine the device
4034 +++++++          status and expected life time: Time it's been Reading and
4035 +++++++          Writing, number of tape Loads / Unloads / Errors.  This
4036 +++++++          information is not yet recorded as far as I know.
4037 +++++++
4038 +++++++          The next step would be implementing drive cleaning setup.
4039 +++++++          Bacula already has knowledge about cleaning tapes.  Once it has
4040 +++++++          some information about cleaning cycles (measured in drive run
4041 +++++++          time, number of tapes used, or calender days, for example) it
4042 +++++++          can automatically execute tape cleaning (with an autochanger,
4043 +++++++          obviously) or ask for operator assistence loading a cleaning
4044 +++++++          tape.
4045 +++++++
4046 +++++++          The next step would be to implement TAPEALERT checks not only
4047 +++++++          when changing tapes and only sending he information to the
4048 +++++++          administrator, but rather checking after each tape error,
4049 +++++++          checking on a regular basis (for example after each tape file),
4050 +++++++          and also before unloading and after loading a new tape.  Then,
4051 +++++++          depending on the drives TAPEALERT state and the know drive
4052 +++++++          cleaning state Bacula could automatically schedule later
4053 +++++++          cleaning, clean immediately, or inform the operator.
4054 +++++++
4055 +++++++          Implementing this would perhaps require another catalog change
4056 +++++++          and perhaps major changes in SD code and the DIR-SD protocoll,
4057 +++++++          so I'd only consider this worth implementing if it would
4058 +++++++          actually be used or even needed by many people. 
4059 +++++++
4060 +++++++Item 14:  Merging of multiple backups into a single one. (Also called Synthetic
4061 +++++++          Backup or Consolidation).
4062 +++++++
4063 +++++++  Origin: Marc Cousin and Eric Bollengier 
4064 +++++++  Date:   15 November 2005
4065 +++++++  Status: Depends on first implementing project Item 1 (Migration).
4066 +++++++
4067 +++++++  What:   A merged backup is a backup made without connecting to the Client.
4068 +++++++          It would be a Merge of existing backups into a single backup.
4069 +++++++          In effect, it is like a restore but to the backup medium.
4070 +++++++
4071 +++++++          For instance, say that last sunday we made a full backup.  Then
4072 +++++++          all week long, we created incremental backups, in order to do
4073 +++++++          them fast.  Now comes sunday again, and we need another full.
4074 +++++++          The merged backup makes it possible to do instead an incremental
4075 +++++++          backup (during the night for instance), and then create a merged
4076 +++++++          backup during the day, by using the full and incrementals from
4077 +++++++          the week.  The merged backup will be exactly like a full made
4078 +++++++          sunday night on the tape, but the production interruption on the
4079 +++++++          Client will be minimal, as the Client will only have to send
4080 +++++++          incrementals.
4081 +++++++
4082 +++++++          In fact, if it's done correctly, you could merge all the
4083 +++++++          Incrementals into single Incremental, or all the Incrementals
4084 +++++++          and the last Differential into a new Differential, or the Full,
4085 +++++++          last differential and all the Incrementals into a new Full
4086 +++++++          backup.  And there is no need to involve the Client.
4087 +++++++
4088 +++++++  Why:    The benefit is that :
4089 +++++++          - the Client just does an incremental ;
4090 +++++++          - the merged backup on tape is just as a single full backup,
4091 +++++++            and can be restored very fast.
4092 +++++++
4093 +++++++          This is also a way of reducing the backup data since the old
4094 +++++++          data can then be pruned (or not) from the catalog, possibly
4095 +++++++          allowing older volumes to be recycled
4096 +++++++
4097 +++++++Item 15:  Automatic disabling of devices
4098 +++++++   Date:   2005-11-11
4099 +++++++   Origin: Peter Eriksson <peter at ifm.liu dot se>
4100 +++++++   Status:
4101 +++++++
4102 +++++++   What:  After a configurable amount of fatal errors with a tape drive
4103 +++++++          Bacula should automatically disable further use of a certain
4104 +++++++          tape drive. There should also be "disable"/"enable" commands in
4105 +++++++          the "bconsole" tool.
4106 +++++++
4107 +++++++   Why:   On a multi-drive jukebox there is a possibility of tape drives
4108 +++++++          going bad during large backups (needing a cleaning tape run,
4109 +++++++          tapes getting stuck). It would be advantageous if Bacula would
4110 +++++++          automatically disable further use of a problematic tape drive
4111 +++++++          after a configurable amount of errors has occured.
4112 +++++++
4113 +++++++          An example: I have a multi-drive jukebox (6 drives, 380+ slots)
4114 +++++++          where tapes occasionally get stuck inside the drive. Bacula will
4115 +++++++          notice that the "mtx-changer" command will fail and then fail
4116 +++++++          any backup jobs trying to use that drive. However, it will still
4117 +++++++          keep on trying to run new jobs using that drive and fail -
4118 +++++++          forever, and thus failing lots and lots of jobs... Since we have
4119 +++++++          many drives Bacula could have just automatically disabled
4120 +++++++          further use of that drive and used one of the other ones
4121 +++++++          instead.
4122 +++++++
4123 +++++++
4124 +++++++Item 16:  Directive/mode to backup only file changes, not entire file
4125 +++++++  Date:   11 November 2005
4126 +++++++  Origin: Joshua Kugler <joshua dot kugler at uaf dot edu>
4127 +++++++          Marek Bajon <mbajon at bimsplus dot com dot pl>
4128 +++++++  Status: RFC
4129 +++++++
4130 +++++++  What:   Currently when a file changes, the entire file will be backed up in
4131 +++++++          the next incremental or full backup.  To save space on the tapes
4132 +++++++          it would be nice to have a mode whereby only the changes to the
4133 +++++++          file would be backed up when it is changed.
4134 +++++++
4135 +++++++  Why:    This would save lots of space when backing up large files such as 
4136 +++++++          logs, mbox files, Outlook PST files and the like.
4137 +++++++
4138 +++++++  Notes:  This would require the usage of disk-based volumes as comparing 
4139 +++++++          files would not be feasible using a tape drive.
4140 +++++++
4141 +++++++Item 17:  Quick release of FD-SD connection
4142 +++++++  Origin: Frank Volf (frank at deze dot org)
4143 +++++++  Date:   17 november 2005
4144 +++++++  Status:
4145 +++++++
4146 +++++++   What:  In the bacula implementation a backup is finished after all data
4147 +++++++          and attributes are succesfully written to storage.  When using a
4148 +++++++          tape backup it is very annoying that a backup can take a day,
4149 +++++++          simply because the current tape (or whatever) is full and the
4150 +++++++          administrator has not put a new one in.  During that time the
4151 +++++++          system cannot be taken off-line, because there is still an open
4152 +++++++          session between the storage daemon and the file daemon on the
4153 +++++++          client.
4154 +++++++
4155 +++++++          Although this is a very good strategey for making "safe backups"
4156 +++++++          This can be annoying for e.g.  laptops, that must remain
4157 +++++++          connected until the bacukp is completed.
4158 +++++++
4159 +++++++          Using a new feature called "migration" it will be possible to
4160 +++++++          spool first to harddisk (using a special 'spool' migration
4161 +++++++          scheme) and then migrate the backup to tape.
4162 +++++++
4163 +++++++          There is still the problem of getting the attributes committed.
4164 +++++++          If it takes a very long time to do, with the current code, the
4165 +++++++          job has not terminated, and the File daemon is not freed up.  The
4166 +++++++          Storage daemon should release the File daemon as soon as all the
4167 +++++++          file data and all the attributes have been sent to it (the SD).
4168 +++++++          Currently the SD waits until everything is on tape and all the
4169 +++++++          attributes are transmitted to the Director before signalling
4170 +++++++          completion to the FD. I don't think I would have any problem
4171 +++++++          changing this.  The reason is that even if the FD reports back to
4172 +++++++          the Dir that all is OK, the job will not terminate until the SD
4173 +++++++          has done the same thing -- so in a way keeping the SD-FD link
4174 +++++++          open to the very end is not really very productive ...
4175 ++++++ 
4176 +++++++   Why:   Makes backup of laptops much easier.
4177 ++++++ 
4178 ++++++ 
4179 ++++++ ============= Empty RFC form ===========
4180 ++++++@@ -245,33 +413,4 @@
4181 ++++++ ============== End RFC form ==============
4182 ++++++ 
4183 ++++++ 
4184 ++++++-Items completed for release 1.38.0:
4185 ++++++-#4   Embedded Python Scripting (implemented in all Daemons)
4186 ++++++-#5   Events that call a Python program (Implemented in all
4187 ++++++-       daemons, but more cleanup work to be done).
4188 ++++++-#6   Select one from among Multiple Storage Devices for Job.
4189 ++++++-       This is already implemented in 1.37.
4190 ++++++-#7   Single Job Writing to Multiple Storage Devices. This is
4191 ++++++-       currently implemented with a Clone feature.
4192 ++++++-#-   Full multiple drive Autochanger support (done in 1.37)
4193 ++++++-#-   Built in support for communications encryption (TLS) 
4194 ++++++-       done by Landon Fuller.
4195 ++++++-#    Support for Unicode characters
4196 ++++++-       (via UTF-8) on Win32 machines thanks to Thorsten Engel.
4197 ++++++-Item  8:  Break the one-to-one Relationship between a Job and a
4198 ++++++-          Specific Storage Device (or Devices if #10 is implemented).
4199 ++++++-
4200 ++++++-Completed items from last year's list:
4201 ++++++-Item 1:   Multiple simultaneous Jobs. (done)
4202 ++++++-Item 3:   Write the bscan program -- also write a bcopy program (done).
4203 ++++++-Item 5:   Implement Label templates (done).
4204 ++++++-Item 6:   Write a regression script (done)
4205 ++++++-Item 9:   Add SSL to daemon communications (done by Landon Fuller)
4206 ++++++-Item 10:  Define definitive tape format (done)
4207 ++++++-Item 3:   GUI for interactive restore. Partially Implemented in 1.34
4208 ++++++-          Note, there is now a complete Webmin plugin, a partial
4209 ++++++-          GNOME console, and an excellent wx-console GUI.
4210 ++++++-Item 4:   GUI for interactive backup
4211 ++++++-Item 2:   Job Data Spooling.
4212 ++++++-    Done: Regular expression matching.
4213 ++++++-Item 10:  New daemon communication protocol (this has been dropped).
4214 +++++++Items completed for release 1.38.0 -- see kernsdone
4215 ++++++Index: patches/1.38.1-to-1.38.2.patch
4216 ++++++===================================================================
4217 ++++++RCS file: patches/1.38.1-to-1.38.2.patch
4218 ++++++diff -N patches/1.38.1-to-1.38.2.patch
4219 ++++++--- /dev/null     1 Jan 1970 00:00:00 -0000
4220 +++++++++ patches/1.38.1-to-1.38.2.patch        21 Nov 2005 13:06:37 -0000
4221 ++++++@@ -0,0 +1,412 @@
4222 +++++++
4223 +++++++ This patch fixes the following bugs:
4224 +++++++
4225 +++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
4226 +++++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
4227 +++++++  says that this patch does not fix his problem)
4228 +++++++- Fix cancel failure bug. Bug #481
4229 +++++++- Fix failure when Pool name has spaces. Bug #487
4230 +++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
4231 +++++++- Fix a couple of free()s in src/filed/acl.c
4232 +++++++- Fix memory overrun in bfile.c in building OS X resource
4233 +++++++  fork filename. Bug #489
4234 +++++++
4235 +++++++This patch is applied to Bacula source version 1.38.1 and will
4236 +++++++produce Bacula source version 1.38.2.  Apply it with:
4237 +++++++
4238 +++++++   cd <bacula-1.38.1-source>
4239 +++++++   ./configure (your options) if not already done
4240 +++++++   patch -p0 <1.38.1-to-1.38.2.patch
4241 +++++++   make
4242 +++++++   make install
4243 +++++++
4244 +++++++Index: kes-1.38
4245 +++++++===================================================================
4246 +++++++RCS file: /cvsroot/bacula/bacula/kes-1.38,v
4247 +++++++retrieving revision 1.1.2.13
4248 +++++++diff -u -r1.1.2.13 kes-1.38
4249 +++++++--- kes-1.38     14 Nov 2005 20:20:38 -0000      1.1.2.13
4250 ++++++++++ kes-1.38     21 Nov 2005 12:53:36 -0000
4251 +++++++@@ -3,6 +3,17 @@
4252 +++++++ 
4253 +++++++ General:
4254 +++++++ 
4255 ++++++++Changes after release of 1.38.1:
4256 ++++++++20Oct05
4257 ++++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
4258 ++++++++- Fix bnet-server bug found on OpenBSD. Bug #486
4259 ++++++++- Fix cancel failure bug. Bug #481
4260 ++++++++- Fix failure when Pool name has spaces. Bug #487   
4261 ++++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
4262 ++++++++- Fix a couple of free()s in src/filed/acl.c
4263 ++++++++- Fix memory overrun in bfile.c in building OS X resource
4264 ++++++++  fork filename. Bug #489 
4265 ++++++++
4266 +++++++ Changes to 1.38.1:
4267 +++++++ 14Oct05
4268 +++++++ - Apply SunOS patch for ACLs submitted by David Duchscher.                  
4269 +++++++Index: src/version.h
4270 +++++++===================================================================
4271 +++++++RCS file: /cvsroot/bacula/bacula/src/version.h,v
4272 +++++++retrieving revision 1.554.2.14
4273 +++++++diff -u -r1.554.2.14 version.h
4274 +++++++--- src/version.h        14 Nov 2005 14:21:58 -0000      1.554.2.14
4275 ++++++++++ src/version.h        21 Nov 2005 12:53:37 -0000
4276 +++++++@@ -3,9 +3,9 @@
4277 +++++++  */
4278 +++++++ 
4279 +++++++ #undef  VERSION
4280 +++++++-#define VERSION "1.38.1"
4281 +++++++-#define BDATE   "14 November 2005"
4282 +++++++-#define LSMDATE "14Nov05"
4283 ++++++++#define VERSION "1.38.2"
4284 ++++++++#define BDATE   "20 November 2005"
4285 ++++++++#define LSMDATE "20Nov05"
4286 +++++++ 
4287 +++++++ /* Debug flags */
4288 +++++++ #undef  DEBUG
4289 +++++++Index: src/dird/catreq.c
4290 +++++++===================================================================
4291 +++++++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v
4292 +++++++retrieving revision 1.77.2.1
4293 +++++++diff -u -r1.77.2.1 catreq.c
4294 +++++++--- src/dird/catreq.c    26 Oct 2005 14:02:04 -0000      1.77.2.1
4295 ++++++++++ src/dird/catreq.c    21 Nov 2005 12:53:37 -0000
4296 +++++++@@ -10,7 +10,7 @@
4297 +++++++  *  Basic tasks done here:
4298 +++++++  *      Handle Catalog services.
4299 +++++++  *
4300 +++++++- *   Version $Id$
4301 ++++++++ *   Version $Id$
4302 +++++++  */
4303 +++++++ /*
4304 +++++++    Copyright (C) 2001-2005 Kern Sibbald
4305 +++++++@@ -117,6 +117,7 @@
4306 +++++++    if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) {
4307 +++++++       memset(&pr, 0, sizeof(pr));
4308 +++++++       bstrncpy(pr.Name, pool_name, sizeof(pr.Name));
4309 ++++++++      unbash_spaces(pr.Name);
4310 +++++++       ok = db_get_pool_record(jcr, jcr->db, &pr);
4311 +++++++       if (ok) {
4312 +++++++          mr.PoolId = pr.PoolId;
4313 +++++++Index: src/dird/ua_restore.c
4314 +++++++===================================================================
4315 +++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v
4316 +++++++retrieving revision 1.101.2.1
4317 +++++++diff -u -r1.101.2.1 ua_restore.c
4318 +++++++--- src/dird/ua_restore.c        26 Oct 2005 14:02:04 -0000      1.101.2.1
4319 ++++++++++ src/dird/ua_restore.c        21 Nov 2005 12:53:37 -0000
4320 +++++++@@ -10,7 +10,7 @@
4321 +++++++  *
4322 +++++++  *     Kern Sibbald, July MMII
4323 +++++++  *
4324 +++++++- *   Version $Id$
4325 ++++++++ *   Version $Id$
4326 +++++++  */
4327 +++++++ /*
4328 +++++++    Copyright (C) 2002-2005 Kern Sibbald
4329 +++++++@@ -573,6 +573,7 @@
4330 +++++++          }
4331 +++++++          return 2;
4332 +++++++ 
4333 ++++++++      case -2:                        /* Period entered to cancel */
4334 +++++++       case 11:                        /* Cancel or quit */
4335 +++++++          return 0;
4336 +++++++       }
4337 +++++++Index: src/dird/ua_run.c
4338 +++++++===================================================================
4339 +++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v
4340 +++++++retrieving revision 1.71
4341 +++++++diff -u -r1.71 ua_run.c
4342 +++++++--- src/dird/ua_run.c    10 Aug 2005 16:35:19 -0000      1.71
4343 ++++++++++ src/dird/ua_run.c    21 Nov 2005 12:53:38 -0000
4344 +++++++@@ -851,6 +851,8 @@
4345 +++++++             bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
4346 +++++++          }
4347 +++++++          goto try_again;
4348 ++++++++      case -1:                        /* error or cancel */
4349 ++++++++         goto bail_out;
4350 +++++++       default:
4351 +++++++          goto try_again;
4352 +++++++       }
4353 +++++++Index: src/dird/ua_select.c
4354 +++++++===================================================================
4355 +++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v
4356 +++++++retrieving revision 1.65.2.1
4357 +++++++diff -u -r1.65.2.1 ua_select.c
4358 +++++++--- src/dird/ua_select.c 12 Nov 2005 17:30:52 -0000      1.65.2.1
4359 ++++++++++ src/dird/ua_select.c 21 Nov 2005 12:53:39 -0000
4360 +++++++@@ -4,7 +4,7 @@
4361 +++++++  *
4362 +++++++  *     Kern Sibbald, October MMI
4363 +++++++  *
4364 +++++++- *   Version  $Id$
4365 ++++++++ *   Version  $Id$
4366 +++++++  */
4367 +++++++ /*
4368 +++++++    Copyright (C) 2001-2005 Kern Sibbald
4369 +++++++@@ -149,7 +149,9 @@
4370 +++++++       }
4371 +++++++    }
4372 +++++++    UnlockRes();
4373 +++++++-   do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name));
4374 ++++++++   if (do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name)) < 0) {
4375 ++++++++      return NULL;
4376 ++++++++   }
4377 +++++++    store = (STORE *)GetResWithName(R_STORAGE, name);
4378 +++++++    return store;
4379 +++++++ }
4380 +++++++@@ -170,7 +172,9 @@
4381 +++++++       }
4382 +++++++    }
4383 +++++++    UnlockRes();
4384 +++++++-   do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name));
4385 ++++++++   if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) {
4386 ++++++++      return NULL;
4387 ++++++++   }
4388 +++++++    fs = (FILESET *)GetResWithName(R_FILESET, name);
4389 +++++++    return fs;
4390 +++++++ }
4391 +++++++@@ -202,7 +206,9 @@
4392 +++++++          }
4393 +++++++       }
4394 +++++++       UnlockRes();
4395 +++++++-      do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name));
4396 ++++++++      if (do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name)) < 0) {
4397 ++++++++         return NULL;
4398 ++++++++      }
4399 +++++++       catalog = (CAT *)GetResWithName(R_CATALOG, name);
4400 +++++++    }
4401 +++++++    return catalog;
4402 +++++++@@ -225,7 +231,9 @@
4403 +++++++       }
4404 +++++++    }
4405 +++++++    UnlockRes();
4406 +++++++-   do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name));
4407 ++++++++   if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) {
4408 ++++++++      return NULL;
4409 ++++++++   }
4410 +++++++    job = (JOB *)GetResWithName(R_JOB, name);
4411 +++++++    return job;
4412 +++++++ }
4413 +++++++@@ -246,7 +254,9 @@
4414 +++++++       }
4415 +++++++    }
4416 +++++++    UnlockRes();
4417 +++++++-   do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name));
4418 ++++++++   if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) {
4419 ++++++++      return NULL;
4420 ++++++++   }
4421 +++++++    job = (JOB *)GetResWithName(R_JOB, name);
4422 +++++++    return job;
4423 +++++++ }
4424 +++++++@@ -269,7 +279,9 @@
4425 +++++++       }
4426 +++++++    }
4427 +++++++    UnlockRes();
4428 +++++++-   do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name));
4429 ++++++++   if (do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) {
4430 ++++++++      return NULL;
4431 ++++++++   }
4432 +++++++    client = (CLIENT *)GetResWithName(R_CLIENT, name);
4433 +++++++    return client;
4434 +++++++ }
4435 +++++++@@ -551,7 +563,9 @@
4436 +++++++       }
4437 +++++++    }
4438 +++++++    UnlockRes();
4439 +++++++-   do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name));
4440 ++++++++   if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) {
4441 ++++++++      return NULL;
4442 ++++++++   }
4443 +++++++    pool = (POOL *)GetResWithName(R_POOL, name);
4444 +++++++    return pool;
4445 +++++++ }
4446 +++++++@@ -673,12 +687,16 @@
4447 +++++++  *  Returns: -1 on error
4448 +++++++  *            index base 0 on success, and choice
4449 +++++++  *               is copied to prompt if not NULL
4450 ++++++++ *             prompt is set to the chosen prompt item string
4451 +++++++  */
4452 +++++++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
4453 +++++++ {
4454 +++++++    int i, item;
4455 +++++++    char pmsg[MAXSTRING];
4456 +++++++ 
4457 ++++++++   if (prompt) {
4458 ++++++++      *prompt = 0;
4459 ++++++++   }
4460 +++++++    if (ua->num_prompts == 2) {
4461 +++++++       item = 1;
4462 +++++++       if (prompt) {
4463 +++++++@@ -698,15 +716,11 @@
4464 +++++++       bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
4465 +++++++    }
4466 +++++++ 
4467 +++++++-   if (prompt) {
4468 +++++++-      *prompt = 0;
4469 +++++++-   }
4470 +++++++-
4471 +++++++    for ( ;; ) {
4472 +++++++       /* First item is the prompt string, not the items */
4473 +++++++       if (ua->num_prompts == 1) {
4474 +++++++          bsendmsg(ua, _("Selection is empty!\n"));
4475 +++++++-         item = 0;                    /* list is empty ! */
4476 ++++++++         item = -1;                    /* list is empty ! */
4477 +++++++          break;
4478 +++++++       }
4479 +++++++       if (ua->num_prompts == 2) {
4480 +++++++@@ -741,7 +755,7 @@
4481 +++++++       free(ua->prompt[i]);
4482 +++++++    }
4483 +++++++    ua->num_prompts = 0;
4484 +++++++-   return item - 1;
4485 ++++++++   return item>0 ? item-1 : item;
4486 +++++++ }
4487 +++++++ 
4488 +++++++ 
4489 +++++++Index: src/dird/ua_update.c
4490 +++++++===================================================================
4491 +++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v
4492 +++++++retrieving revision 1.7
4493 +++++++diff -u -r1.7 ua_update.c
4494 +++++++--- src/dird/ua_update.c 28 Aug 2005 12:22:02 -0000      1.7
4495 ++++++++++ src/dird/ua_update.c 21 Nov 2005 12:53:39 -0000
4496 +++++++@@ -590,7 +590,7 @@
4497 +++++++          update_all_vols_from_pool(ua);
4498 +++++++          return 1;
4499 +++++++       default:                        /* Done or error */
4500 +++++++-         bsendmsg(ua, _("Selection done.\n"));
4501 ++++++++         bsendmsg(ua, _("Selection terminated.\n"));
4502 +++++++          return 1;
4503 +++++++       }
4504 +++++++    }
4505 +++++++Index: src/filed/acl.c
4506 +++++++===================================================================
4507 +++++++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v
4508 +++++++retrieving revision 1.10.2.1
4509 +++++++diff -u -r1.10.2.1 acl.c
4510 +++++++--- src/filed/acl.c      14 Nov 2005 20:20:38 -0000      1.10.2.1
4511 ++++++++++ src/filed/acl.c      21 Nov 2005 12:53:39 -0000
4512 +++++++@@ -26,7 +26,7 @@
4513 +++++++  *
4514 +++++++  *   Written by Preben 'Peppe' Guldberg, December MMIV
4515 +++++++  *
4516 +++++++- *   Version $Id$
4517 ++++++++ *   Version $Id$
4518 +++++++  */
4519 +++++++ /*
4520 +++++++    Copyright (C) 2004-2005 Kern Sibbald
4521 +++++++@@ -140,7 +140,7 @@
4522 +++++++ 
4523 +++++++    if ((acl_text = acl_get(jcr->last_fname)) != NULL) {
4524 +++++++       len = pm_strcpy(jcr->acl_text, acl_text);
4525 +++++++-      free(acl_text);
4526 ++++++++      actuallyfree(acl_text);
4527 +++++++       return len;
4528 +++++++    }
4529 +++++++    return -1;
4530 +++++++@@ -270,7 +270,7 @@
4531 +++++++    if ((n = getacl(jcr->last_fname, n, acls)) > 0) {
4532 +++++++       if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) {
4533 +++++++          len = pm_strcpy(jcr->acl_text, acl_text);
4534 +++++++-         free(acl_text);
4535 ++++++++         actuallyfree(acl_text);
4536 +++++++          return len;
4537 +++++++       }
4538 +++++++    }
4539 +++++++Index: src/findlib/bfile.c
4540 +++++++===================================================================
4541 +++++++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v
4542 +++++++retrieving revision 1.40
4543 +++++++diff -u -r1.40 bfile.c
4544 +++++++--- src/findlib/bfile.c  10 Aug 2005 16:35:19 -0000      1.40
4545 ++++++++++ src/findlib/bfile.c  21 Nov 2005 12:53:39 -0000
4546 +++++++@@ -623,13 +623,10 @@
4547 +++++++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
4548 +++++++ {
4549 +++++++    POOLMEM *rsrc_fname;
4550 +++++++-   size_t fname_len;
4551 +++++++ 
4552 +++++++-   fname_len = strlen(fname);
4553 +++++++    rsrc_fname = get_pool_memory(PM_FNAME);
4554 +++++++-   bstrncpy(rsrc_fname, fname, fname_len + 1);
4555 +++++++-   bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC,
4556 +++++++-      strlen(_PATH_RSRCFORKSPEC) + 1);
4557 ++++++++   pm_strcpy(rsrc_fname, fname);
4558 ++++++++   pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC);
4559 +++++++    bopen(bfd, rsrc_fname, flags, mode);
4560 +++++++    free_pool_memory(rsrc_fname);
4561 +++++++    return bfd->fid;
4562 +++++++Index: src/lib/bnet_server.c
4563 +++++++===================================================================
4564 +++++++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v
4565 +++++++retrieving revision 1.39
4566 +++++++diff -u -r1.39 bnet_server.c
4567 +++++++--- src/lib/bnet_server.c        18 Aug 2005 15:37:40 -0000      1.39
4568 ++++++++++ src/lib/bnet_server.c        21 Nov 2005 12:53:39 -0000
4569 +++++++@@ -153,7 +153,6 @@
4570 +++++++          /* Error, get out */
4571 +++++++          foreach_dlist(fd_ptr, &sockfds) {
4572 +++++++             close(fd_ptr->fd);
4573 +++++++-            free((void *)fd_ptr);
4574 +++++++          }
4575 +++++++          Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror());
4576 +++++++          break;
4577 +++++++Index: src/stored/autochanger.c
4578 +++++++===================================================================
4579 +++++++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
4580 +++++++retrieving revision 1.47.2.3
4581 +++++++diff -u -r1.47.2.3 autochanger.c
4582 +++++++--- src/stored/autochanger.c     12 Nov 2005 17:30:53 -0000      1.47.2.3
4583 ++++++++++ src/stored/autochanger.c     21 Nov 2005 12:53:39 -0000
4584 +++++++@@ -4,7 +4,7 @@
4585 +++++++  *
4586 +++++++  *   Kern Sibbald, August MMII
4587 +++++++  *                            
4588 +++++++- *   Version $Id$
4589 ++++++++ *   Version $Id$
4590 +++++++  */
4591 +++++++ /*
4592 +++++++    Copyright (C) 2002-2005 Kern Sibbald
4593 +++++++@@ -163,6 +163,7 @@
4594 +++++++             rtn_stat = -1;            /* hard error */
4595 +++++++          }
4596 +++++++          Dmsg2(400, "load slot %d status=%d\n", slot, status);
4597 ++++++++         unlock_changer(dcr);
4598 +++++++       } else {
4599 +++++++          status = 0;                  /* we got what we want */
4600 +++++++          dev->Slot = slot;            /* set currently loaded slot */
4601 +++++++@@ -174,7 +175,6 @@
4602 +++++++    } else {
4603 +++++++       rtn_stat = 0;                   /* no changer found */
4604 +++++++    }
4605 +++++++-   unlock_changer(dcr);
4606 +++++++    free_pool_memory(changer);
4607 +++++++    return rtn_stat;
4608 +++++++ 
4609 +++++++Index: src/tray-monitor/tray-monitor.c
4610 +++++++===================================================================
4611 +++++++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v
4612 +++++++retrieving revision 1.25.2.1
4613 +++++++diff -u -r1.25.2.1 tray-monitor.c
4614 +++++++--- src/tray-monitor/tray-monitor.c      1 Oct 2005 10:20:18 -0000       1.25.2.1
4615 ++++++++++ src/tray-monitor/tray-monitor.c      21 Nov 2005 12:53:39 -0000
4616 +++++++@@ -4,7 +4,7 @@
4617 +++++++  *
4618 +++++++  *     Nicolas Boichat, August MMIV
4619 +++++++  *
4620 +++++++- *     Version $Id$
4621 ++++++++ *     Version $Id$
4622 +++++++  */
4623 +++++++ 
4624 +++++++ /*
4625 +++++++@@ -881,7 +881,7 @@
4626 +++++++       }
4627 +++++++ 
4628 +++++++       if (item->D_sock == NULL) {
4629 +++++++-         g_slist_append(*list, (void *)_("Cannot connect to daemon.\n"));
4630 ++++++++         g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n")));
4631 +++++++          changeStatusMessage(item, _("Cannot connect to daemon."));
4632 +++++++          item->state = error;
4633 +++++++          item->oldstate = error;
4634 ++++++Index: patches/patches-1.38.0
4635 ++++++===================================================================
4636 ++++++RCS file: patches/patches-1.38.0
4637 ++++++diff -N patches/patches-1.38.0
4638 ++++++Index: patches/patches-1.38.1
4639 ++++++===================================================================
4640 ++++++RCS file: patches/patches-1.38.1
4641 ++++++diff -N patches/patches-1.38.1
4642 ++++++--- /dev/null     1 Jan 1970 00:00:00 -0000
4643 +++++++++ patches/patches-1.38.1        21 Nov 2005 13:06:37 -0000
4644 ++++++@@ -0,0 +1,14 @@
4645 +++++++20Nov05 1.38.1-to-1.38.2.patch
4646 +++++++ This patch fixes the following bugs:
4647 +++++++
4648 +++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
4649 +++++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
4650 +++++++  says this patch does not fix his problem)
4651 +++++++- Fix cancel failure bug. Bug #481
4652 +++++++- Fix failure when Pool name has spaces. Bug #487
4653 +++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
4654 +++++++- Fix a couple of free()s in src/filed/acl.c
4655 +++++++- Fix memory overrun in bfile.c in building OS X resource
4656 +++++++  fork filename. Bug #489
4657 +++++++                         
4658 +++++++  
4659 ++++++Index: src/version.h
4660 ++++++===================================================================
4661 ++++++RCS file: /cvsroot/bacula/bacula/src/version.h,v
4662 ++++++retrieving revision 1.554.2.14
4663 ++++++diff -u -r1.554.2.14 version.h
4664 ++++++--- src/version.h 14 Nov 2005 14:21:58 -0000      1.554.2.14
4665 +++++++++ src/version.h 21 Nov 2005 13:06:37 -0000
4666 ++++++@@ -3,9 +3,9 @@
4667 ++++++  */
4668 ++++++ 
4669 ++++++ #undef  VERSION
4670 ++++++-#define VERSION "1.38.1"
4671 ++++++-#define BDATE   "14 November 2005"
4672 ++++++-#define LSMDATE "14Nov05"
4673 +++++++#define VERSION "1.38.2"
4674 +++++++#define BDATE   "20 November 2005"
4675 +++++++#define LSMDATE "20Nov05"
4676 ++++++ 
4677 ++++++ /* Debug flags */
4678 ++++++ #undef  DEBUG
4679 ++++++Index: src/dird/catreq.c
4680 ++++++===================================================================
4681 ++++++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v
4682 ++++++retrieving revision 1.77.2.1
4683 ++++++diff -u -r1.77.2.1 catreq.c
4684 ++++++--- src/dird/catreq.c     26 Oct 2005 14:02:04 -0000      1.77.2.1
4685 +++++++++ src/dird/catreq.c     21 Nov 2005 13:06:37 -0000
4686 ++++++@@ -10,7 +10,7 @@
4687 ++++++  *  Basic tasks done here:
4688 ++++++  *      Handle Catalog services.
4689 ++++++  *
4690 ++++++- *   Version $Id$
4691 +++++++ *   Version $Id$
4692 ++++++  */
4693 ++++++ /*
4694 ++++++    Copyright (C) 2001-2005 Kern Sibbald
4695 ++++++@@ -117,6 +117,7 @@
4696 ++++++    if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) {
4697 ++++++       memset(&pr, 0, sizeof(pr));
4698 ++++++       bstrncpy(pr.Name, pool_name, sizeof(pr.Name));
4699 +++++++      unbash_spaces(pr.Name);
4700 ++++++       ok = db_get_pool_record(jcr, jcr->db, &pr);
4701 ++++++       if (ok) {
4702 ++++++          mr.PoolId = pr.PoolId;
4703 ++++++Index: src/dird/ua_restore.c
4704 ++++++===================================================================
4705 ++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v
4706 ++++++retrieving revision 1.101.2.1
4707 ++++++diff -u -r1.101.2.1 ua_restore.c
4708 ++++++--- src/dird/ua_restore.c 26 Oct 2005 14:02:04 -0000      1.101.2.1
4709 +++++++++ src/dird/ua_restore.c 21 Nov 2005 13:06:37 -0000
4710 ++++++@@ -10,7 +10,7 @@
4711 ++++++  *
4712 ++++++  *     Kern Sibbald, July MMII
4713 ++++++  *
4714 ++++++- *   Version $Id$
4715 +++++++ *   Version $Id$
4716 ++++++  */
4717 ++++++ /*
4718 ++++++    Copyright (C) 2002-2005 Kern Sibbald
4719 ++++++@@ -573,6 +573,7 @@
4720 ++++++          }
4721 ++++++          return 2;
4722 ++++++ 
4723 +++++++      case -2:                        /* Period entered to cancel */
4724 ++++++       case 11:                        /* Cancel or quit */
4725 ++++++          return 0;
4726 ++++++       }
4727 ++++++Index: src/dird/ua_run.c
4728 ++++++===================================================================
4729 ++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v
4730 ++++++retrieving revision 1.71
4731 ++++++diff -u -r1.71 ua_run.c
4732 ++++++--- src/dird/ua_run.c     10 Aug 2005 16:35:19 -0000      1.71
4733 +++++++++ src/dird/ua_run.c     21 Nov 2005 13:06:38 -0000
4734 ++++++@@ -851,6 +851,8 @@
4735 ++++++             bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
4736 ++++++          }
4737 ++++++          goto try_again;
4738 +++++++      case -1:                        /* error or cancel */
4739 +++++++         goto bail_out;
4740 ++++++       default:
4741 ++++++          goto try_again;
4742 ++++++       }
4743 ++++++Index: src/dird/ua_select.c
4744 ++++++===================================================================
4745 ++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v
4746 ++++++retrieving revision 1.65.2.1
4747 ++++++diff -u -r1.65.2.1 ua_select.c
4748 ++++++--- src/dird/ua_select.c  12 Nov 2005 17:30:52 -0000      1.65.2.1
4749 +++++++++ src/dird/ua_select.c  21 Nov 2005 13:06:38 -0000
4750 ++++++@@ -4,7 +4,7 @@
4751 ++++++  *
4752 ++++++  *     Kern Sibbald, October MMI
4753 ++++++  *
4754 ++++++- *   Version  $Id$
4755 +++++++ *   Version  $Id$
4756 ++++++  */
4757 ++++++ /*
4758 ++++++    Copyright (C) 2001-2005 Kern Sibbald
4759 ++++++@@ -149,7 +149,9 @@
4760 ++++++       }
4761 ++++++    }
4762 ++++++    UnlockRes();
4763 ++++++-   do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name));
4764 +++++++   if (do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name)) < 0) {
4765 +++++++      return NULL;
4766 +++++++   }
4767 ++++++    store = (STORE *)GetResWithName(R_STORAGE, name);
4768 ++++++    return store;
4769 ++++++ }
4770 ++++++@@ -170,7 +172,9 @@
4771 ++++++       }
4772 ++++++    }
4773 ++++++    UnlockRes();
4774 ++++++-   do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name));
4775 +++++++   if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) {
4776 +++++++      return NULL;
4777 +++++++   }
4778 ++++++    fs = (FILESET *)GetResWithName(R_FILESET, name);
4779 ++++++    return fs;
4780 ++++++ }
4781 ++++++@@ -202,7 +206,9 @@
4782 ++++++          }
4783 ++++++       }
4784 ++++++       UnlockRes();
4785 ++++++-      do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name));
4786 +++++++      if (do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name)) < 0) {
4787 +++++++         return NULL;
4788 +++++++      }
4789 ++++++       catalog = (CAT *)GetResWithName(R_CATALOG, name);
4790 ++++++    }
4791 ++++++    return catalog;
4792 ++++++@@ -225,7 +231,9 @@
4793 ++++++       }
4794 ++++++    }
4795 ++++++    UnlockRes();
4796 ++++++-   do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name));
4797 +++++++   if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) {
4798 +++++++      return NULL;
4799 +++++++   }
4800 ++++++    job = (JOB *)GetResWithName(R_JOB, name);
4801 ++++++    return job;
4802 ++++++ }
4803 ++++++@@ -246,7 +254,9 @@
4804 ++++++       }
4805 ++++++    }
4806 ++++++    UnlockRes();
4807 ++++++-   do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name));
4808 +++++++   if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) {
4809 +++++++      return NULL;
4810 +++++++   }
4811 ++++++    job = (JOB *)GetResWithName(R_JOB, name);
4812 ++++++    return job;
4813 ++++++ }
4814 ++++++@@ -269,7 +279,9 @@
4815 ++++++       }
4816 ++++++    }
4817 ++++++    UnlockRes();
4818 ++++++-   do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name));
4819 +++++++   if (do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) {
4820 +++++++      return NULL;
4821 +++++++   }
4822 ++++++    client = (CLIENT *)GetResWithName(R_CLIENT, name);
4823 ++++++    return client;
4824 ++++++ }
4825 ++++++@@ -551,7 +563,9 @@
4826 ++++++       }
4827 ++++++    }
4828 ++++++    UnlockRes();
4829 ++++++-   do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name));
4830 +++++++   if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) {
4831 +++++++      return NULL;
4832 +++++++   }
4833 ++++++    pool = (POOL *)GetResWithName(R_POOL, name);
4834 ++++++    return pool;
4835 ++++++ }
4836 ++++++@@ -673,12 +687,16 @@
4837 ++++++  *  Returns: -1 on error
4838 ++++++  *            index base 0 on success, and choice
4839 ++++++  *               is copied to prompt if not NULL
4840 +++++++ *             prompt is set to the chosen prompt item string
4841 ++++++  */
4842 ++++++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
4843 ++++++ {
4844 ++++++    int i, item;
4845 ++++++    char pmsg[MAXSTRING];
4846 ++++++ 
4847 +++++++   if (prompt) {
4848 +++++++      *prompt = 0;
4849 +++++++   }
4850 ++++++    if (ua->num_prompts == 2) {
4851 ++++++       item = 1;
4852 ++++++       if (prompt) {
4853 ++++++@@ -698,15 +716,11 @@
4854 ++++++       bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
4855 ++++++    }
4856 ++++++ 
4857 ++++++-   if (prompt) {
4858 ++++++-      *prompt = 0;
4859 ++++++-   }
4860 ++++++-
4861 ++++++    for ( ;; ) {
4862 ++++++       /* First item is the prompt string, not the items */
4863 ++++++       if (ua->num_prompts == 1) {
4864 ++++++          bsendmsg(ua, _("Selection is empty!\n"));
4865 ++++++-         item = 0;                    /* list is empty ! */
4866 +++++++         item = -1;                    /* list is empty ! */
4867 ++++++          break;
4868 ++++++       }
4869 ++++++       if (ua->num_prompts == 2) {
4870 ++++++@@ -741,7 +755,7 @@
4871 ++++++       free(ua->prompt[i]);
4872 ++++++    }
4873 ++++++    ua->num_prompts = 0;
4874 ++++++-   return item - 1;
4875 +++++++   return item>0 ? item-1 : item;
4876 ++++++ }
4877 ++++++ 
4878 ++++++ 
4879 ++++++Index: src/dird/ua_update.c
4880 ++++++===================================================================
4881 ++++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v
4882 ++++++retrieving revision 1.7
4883 ++++++diff -u -r1.7 ua_update.c
4884 ++++++--- src/dird/ua_update.c  28 Aug 2005 12:22:02 -0000      1.7
4885 +++++++++ src/dird/ua_update.c  21 Nov 2005 13:06:38 -0000
4886 ++++++@@ -590,7 +590,7 @@
4887 ++++++          update_all_vols_from_pool(ua);
4888 ++++++          return 1;
4889 ++++++       default:                        /* Done or error */
4890 ++++++-         bsendmsg(ua, _("Selection done.\n"));
4891 +++++++         bsendmsg(ua, _("Selection terminated.\n"));
4892 ++++++          return 1;
4893 ++++++       }
4894 ++++++    }
4895 ++++++Index: src/filed/acl.c
4896 ++++++===================================================================
4897 ++++++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v
4898 ++++++retrieving revision 1.10.2.1
4899 ++++++diff -u -r1.10.2.1 acl.c
4900 ++++++--- src/filed/acl.c       14 Nov 2005 20:20:38 -0000      1.10.2.1
4901 +++++++++ src/filed/acl.c       21 Nov 2005 13:06:38 -0000
4902 ++++++@@ -26,7 +26,7 @@
4903 ++++++  *
4904 ++++++  *   Written by Preben 'Peppe' Guldberg, December MMIV
4905 ++++++  *
4906 ++++++- *   Version $Id$
4907 +++++++ *   Version $Id$
4908 ++++++  */
4909 ++++++ /*
4910 ++++++    Copyright (C) 2004-2005 Kern Sibbald
4911 ++++++@@ -140,7 +140,7 @@
4912 ++++++ 
4913 ++++++    if ((acl_text = acl_get(jcr->last_fname)) != NULL) {
4914 ++++++       len = pm_strcpy(jcr->acl_text, acl_text);
4915 ++++++-      free(acl_text);
4916 +++++++      actuallyfree(acl_text);
4917 ++++++       return len;
4918 ++++++    }
4919 ++++++    return -1;
4920 ++++++@@ -270,7 +270,7 @@
4921 ++++++    if ((n = getacl(jcr->last_fname, n, acls)) > 0) {
4922 ++++++       if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) {
4923 ++++++          len = pm_strcpy(jcr->acl_text, acl_text);
4924 ++++++-         free(acl_text);
4925 +++++++         actuallyfree(acl_text);
4926 ++++++          return len;
4927 ++++++       }
4928 ++++++    }
4929 ++++++Index: src/findlib/bfile.c
4930 ++++++===================================================================
4931 ++++++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v
4932 ++++++retrieving revision 1.40
4933 ++++++diff -u -r1.40 bfile.c
4934 ++++++--- src/findlib/bfile.c   10 Aug 2005 16:35:19 -0000      1.40
4935 +++++++++ src/findlib/bfile.c   21 Nov 2005 13:06:38 -0000
4936 ++++++@@ -623,13 +623,10 @@
4937 ++++++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
4938 ++++++ {
4939 ++++++    POOLMEM *rsrc_fname;
4940 ++++++-   size_t fname_len;
4941 ++++++ 
4942 ++++++-   fname_len = strlen(fname);
4943 ++++++    rsrc_fname = get_pool_memory(PM_FNAME);
4944 ++++++-   bstrncpy(rsrc_fname, fname, fname_len + 1);
4945 ++++++-   bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC,
4946 ++++++-      strlen(_PATH_RSRCFORKSPEC) + 1);
4947 +++++++   pm_strcpy(rsrc_fname, fname);
4948 +++++++   pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC);
4949 ++++++    bopen(bfd, rsrc_fname, flags, mode);
4950 ++++++    free_pool_memory(rsrc_fname);
4951 ++++++    return bfd->fid;
4952 ++++++Index: src/lib/bnet_server.c
4953 ++++++===================================================================
4954 ++++++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v
4955 ++++++retrieving revision 1.39
4956 ++++++diff -u -r1.39 bnet_server.c
4957 ++++++--- src/lib/bnet_server.c 18 Aug 2005 15:37:40 -0000      1.39
4958 +++++++++ src/lib/bnet_server.c 21 Nov 2005 13:06:38 -0000
4959 ++++++@@ -153,7 +153,6 @@
4960 ++++++          /* Error, get out */
4961 ++++++          foreach_dlist(fd_ptr, &sockfds) {
4962 ++++++             close(fd_ptr->fd);
4963 ++++++-            free((void *)fd_ptr);
4964 ++++++          }
4965 ++++++          Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror());
4966 ++++++          break;
4967 ++++++Index: src/stored/autochanger.c
4968 ++++++===================================================================
4969 ++++++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
4970 ++++++retrieving revision 1.47.2.3
4971 ++++++diff -u -r1.47.2.3 autochanger.c
4972 ++++++--- src/stored/autochanger.c      12 Nov 2005 17:30:53 -0000      1.47.2.3
4973 +++++++++ src/stored/autochanger.c      21 Nov 2005 13:06:38 -0000
4974 ++++++@@ -4,7 +4,7 @@
4975 ++++++  *
4976 ++++++  *   Kern Sibbald, August MMII
4977 ++++++  *                            
4978 ++++++- *   Version $Id$
4979 +++++++ *   Version $Id$
4980 ++++++  */
4981 ++++++ /*
4982 ++++++    Copyright (C) 2002-2005 Kern Sibbald
4983 ++++++@@ -163,6 +163,7 @@
4984 ++++++             rtn_stat = -1;            /* hard error */
4985 ++++++          }
4986 ++++++          Dmsg2(400, "load slot %d status=%d\n", slot, status);
4987 +++++++         unlock_changer(dcr);
4988 ++++++       } else {
4989 ++++++          status = 0;                  /* we got what we want */
4990 ++++++          dev->Slot = slot;            /* set currently loaded slot */
4991 ++++++@@ -174,7 +175,6 @@
4992 ++++++    } else {
4993 ++++++       rtn_stat = 0;                   /* no changer found */
4994 ++++++    }
4995 ++++++-   unlock_changer(dcr);
4996 ++++++    free_pool_memory(changer);
4997 ++++++    return rtn_stat;
4998 ++++++ 
4999 ++++++Index: src/stored/status.c
5000 ++++++===================================================================
5001 ++++++RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v
5002 ++++++retrieving revision 1.44.2.1
5003 ++++++diff -u -r1.44.2.1 status.c
5004 ++++++--- src/stored/status.c   6 Oct 2005 07:04:13 -0000       1.44.2.1
5005 +++++++++ src/stored/status.c   21 Nov 2005 13:06:39 -0000
5006 ++++++@@ -264,6 +264,7 @@
5007 ++++++    bool found = false;
5008 ++++++    int bps, sec;
5009 ++++++    JCR *jcr;
5010 +++++++   DCR *dcr;
5011 ++++++    char JobName[MAX_NAME_LENGTH];
5012 ++++++    char b1[30], b2[30], b3[30];
5013 ++++++ 
5014 ++++++@@ -273,7 +274,8 @@
5015 ++++++          bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"),
5016 ++++++             job_type_to_str(jcr->JobType), jcr->Job);
5017 ++++++       }
5018 ++++++-      if (jcr->dcr && jcr->dcr->device) {
5019 +++++++      dcr = jcr->dcr;
5020 +++++++      if (dcr && dcr->device) {
5021 ++++++          bstrncpy(JobName, jcr->Job, sizeof(JobName));
5022 ++++++          /* There are three periods after the Job name */
5023 ++++++          char *p;
5024 ++++++@@ -282,13 +284,16 @@
5025 ++++++                *p = 0;
5026 ++++++             }
5027 ++++++          }
5028 ++++++-         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"),
5029 +++++++         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n"
5030 +++++++                            "    pool=\"%s\" device=\"%s\"\n"),
5031 ++++++                    job_level_to_str(jcr->JobLevel),
5032 ++++++                    job_type_to_str(jcr->JobType),
5033 ++++++                    JobName,
5034 ++++++                    jcr->JobId,
5035 ++++++-                   jcr->dcr->VolumeName,
5036 ++++++-                   jcr->dcr->device->device_name);
5037 +++++++                   dcr->VolumeName,
5038 +++++++                   dcr->pool_name,
5039 +++++++                   dcr->dev?dcr->dev->print_name(): 
5040 +++++++                            dcr->device->device_name);
5041 ++++++          sec = time(NULL) - jcr->run_time;
5042 ++++++          if (sec <= 0) {
5043 ++++++             sec = 1;
5044 ++++++Index: src/stored/stored_conf.c
5045 ++++++===================================================================
5046 ++++++RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v
5047 ++++++retrieving revision 1.76
5048 ++++++diff -u -r1.76 stored_conf.c
5049 ++++++--- src/stored/stored_conf.c      9 Sep 2005 09:40:04 -0000       1.76
5050 +++++++++ src/stored/stored_conf.c      21 Nov 2005 13:06:39 -0000
5051 ++++++@@ -222,16 +222,16 @@
5052 ++++++          res->res_dev.hdr.name,
5053 ++++++          res->res_dev.media_type, res->res_dev.device_name,
5054 ++++++          res->res_dev.label_type);
5055 ++++++-      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d\n",
5056 +++++++      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n",
5057 ++++++          res->res_dev.max_rewind_wait, res->res_dev.min_block_size,
5058 ++++++-         res->res_dev.max_block_size);
5059 +++++++         res->res_dev.max_block_size, res->res_dev.max_changer_wait);
5060 ++++++       sendit(sock, "        max_jobs=%d max_files=%" lld " max_size=%" lld "\n",
5061 ++++++          res->res_dev.max_volume_jobs, res->res_dev.max_volume_files,
5062 ++++++          res->res_dev.max_volume_size);
5063 ++++++       sendit(sock, "        max_file_size=%" lld " capacity=%" lld "\n",
5064 ++++++          res->res_dev.max_file_size, res->res_dev.volume_capacity);
5065 ++++++-      sendit(sock, "         spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
5066 ++++++-      sendit(sock, "         max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
5067 +++++++      sendit(sock, "        spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
5068 +++++++      sendit(sock, "        max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
5069 ++++++          res->res_dev.max_spool_size, res->res_dev.max_job_spool_size);
5070 ++++++       if (res->res_dev.changer_res) {
5071 ++++++          sendit(sock, "         changer=%p\n", res->res_dev.changer_res);
5072 ++++++Index: src/tray-monitor/tray-monitor.c
5073 ++++++===================================================================
5074 ++++++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v
5075 ++++++retrieving revision 1.25.2.1
5076 ++++++diff -u -r1.25.2.1 tray-monitor.c
5077 ++++++--- src/tray-monitor/tray-monitor.c       1 Oct 2005 10:20:18 -0000       1.25.2.1
5078 +++++++++ src/tray-monitor/tray-monitor.c       21 Nov 2005 13:06:39 -0000
5079 ++++++@@ -4,7 +4,7 @@
5080 ++++++  *
5081 ++++++  *     Nicolas Boichat, August MMIV
5082 ++++++  *
5083 ++++++- *     Version $Id$
5084 +++++++ *     Version $Id$
5085 ++++++  */
5086 ++++++ 
5087 ++++++ /*
5088 ++++++@@ -881,7 +881,7 @@
5089 ++++++       }
5090 ++++++ 
5091 ++++++       if (item->D_sock == NULL) {
5092 ++++++-         g_slist_append(*list, (void *)_("Cannot connect to daemon.\n"));
5093 +++++++         g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n")));
5094 ++++++          changeStatusMessage(item, _("Cannot connect to daemon."));
5095 ++++++          item->state = error;
5096 ++++++          item->oldstate = error;
5097 +++++Index: patches/patches-1.38.0
5098 +++++===================================================================
5099 +++++RCS file: patches/patches-1.38.0
5100 +++++diff -N patches/patches-1.38.0
5101 +++++Index: patches/patches-1.38.1
5102 +++++===================================================================
5103 +++++RCS file: patches/patches-1.38.1
5104 +++++diff -N patches/patches-1.38.1
5105 +++++--- /dev/null      1 Jan 1970 00:00:00 -0000
5106 ++++++++ patches/patches-1.38.1 21 Nov 2005 13:13:01 -0000
5107 +++++@@ -0,0 +1,14 @@
5108 ++++++20Nov05 1.38.1-to-1.38.2.patch
5109 ++++++ This patch fixes the following bugs:
5110 ++++++
5111 ++++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
5112 ++++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
5113 ++++++  says this patch does not fix his problem)
5114 ++++++- Fix cancel failure bug. Bug #481
5115 ++++++- Fix failure when Pool name has spaces. Bug #487
5116 ++++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
5117 ++++++- Fix a couple of free()s in src/filed/acl.c
5118 ++++++- Fix memory overrun in bfile.c in building OS X resource
5119 ++++++  fork filename. Bug #489
5120 ++++++                         
5121 ++++++  
5122 +++++Index: src/version.h
5123 +++++===================================================================
5124 +++++RCS file: /cvsroot/bacula/bacula/src/version.h,v
5125 +++++retrieving revision 1.554.2.14
5126 +++++diff -u -r1.554.2.14 version.h
5127 +++++--- src/version.h  14 Nov 2005 14:21:58 -0000      1.554.2.14
5128 ++++++++ src/version.h  21 Nov 2005 13:13:01 -0000
5129 +++++@@ -3,9 +3,9 @@
5130 +++++  */
5131 +++++ 
5132 +++++ #undef  VERSION
5133 +++++-#define VERSION "1.38.1"
5134 +++++-#define BDATE   "14 November 2005"
5135 +++++-#define LSMDATE "14Nov05"
5136 ++++++#define VERSION "1.38.2"
5137 ++++++#define BDATE   "20 November 2005"
5138 ++++++#define LSMDATE "20Nov05"
5139 +++++ 
5140 +++++ /* Debug flags */
5141 +++++ #undef  DEBUG
5142 +++++Index: src/dird/catreq.c
5143 +++++===================================================================
5144 +++++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v
5145 +++++retrieving revision 1.77.2.1
5146 +++++diff -u -r1.77.2.1 catreq.c
5147 +++++--- src/dird/catreq.c      26 Oct 2005 14:02:04 -0000      1.77.2.1
5148 ++++++++ src/dird/catreq.c      21 Nov 2005 13:13:01 -0000
5149 +++++@@ -10,7 +10,7 @@
5150 +++++  *  Basic tasks done here:
5151 +++++  *      Handle Catalog services.
5152 +++++  *
5153 +++++- *   Version $Id$
5154 ++++++ *   Version $Id$
5155 +++++  */
5156 +++++ /*
5157 +++++    Copyright (C) 2001-2005 Kern Sibbald
5158 +++++@@ -117,6 +117,7 @@
5159 +++++    if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) {
5160 +++++       memset(&pr, 0, sizeof(pr));
5161 +++++       bstrncpy(pr.Name, pool_name, sizeof(pr.Name));
5162 ++++++      unbash_spaces(pr.Name);
5163 +++++       ok = db_get_pool_record(jcr, jcr->db, &pr);
5164 +++++       if (ok) {
5165 +++++          mr.PoolId = pr.PoolId;
5166 +++++Index: src/dird/ua_restore.c
5167 +++++===================================================================
5168 +++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v
5169 +++++retrieving revision 1.101.2.1
5170 +++++diff -u -r1.101.2.1 ua_restore.c
5171 +++++--- src/dird/ua_restore.c  26 Oct 2005 14:02:04 -0000      1.101.2.1
5172 ++++++++ src/dird/ua_restore.c  21 Nov 2005 13:13:01 -0000
5173 +++++@@ -10,7 +10,7 @@
5174 +++++  *
5175 +++++  *     Kern Sibbald, July MMII
5176 +++++  *
5177 +++++- *   Version $Id$
5178 ++++++ *   Version $Id$
5179 +++++  */
5180 +++++ /*
5181 +++++    Copyright (C) 2002-2005 Kern Sibbald
5182 +++++@@ -409,7 +409,7 @@
5183 +++++       }
5184 +++++       done = true;
5185 +++++       switch (do_prompt(ua, "", _("Select item: "), NULL, 0)) {
5186 +++++-      case -1:                        /* error */
5187 ++++++      case -1:                        /* error or cancel */
5188 +++++          return 0;
5189 +++++       case 0:                         /* list last 20 Jobs run */
5190 +++++          gui_save = ua->jcr->gui;
5191 +++++Index: src/dird/ua_run.c
5192 +++++===================================================================
5193 +++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v
5194 +++++retrieving revision 1.71
5195 +++++diff -u -r1.71 ua_run.c
5196 +++++--- src/dird/ua_run.c      10 Aug 2005 16:35:19 -0000      1.71
5197 ++++++++ src/dird/ua_run.c      21 Nov 2005 13:13:02 -0000
5198 +++++@@ -851,6 +851,8 @@
5199 +++++             bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
5200 +++++          }
5201 +++++          goto try_again;
5202 ++++++      case -1:                        /* error or cancel */
5203 ++++++         goto bail_out;
5204 +++++       default:
5205 +++++          goto try_again;
5206 +++++       }
5207 +++++Index: src/dird/ua_select.c
5208 +++++===================================================================
5209 +++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v
5210 +++++retrieving revision 1.65.2.1
5211 +++++diff -u -r1.65.2.1 ua_select.c
5212 +++++--- src/dird/ua_select.c   12 Nov 2005 17:30:52 -0000      1.65.2.1
5213 ++++++++ src/dird/ua_select.c   21 Nov 2005 13:13:02 -0000
5214 +++++@@ -4,7 +4,7 @@
5215 +++++  *
5216 +++++  *     Kern Sibbald, October MMI
5217 +++++  *
5218 +++++- *   Version  $Id$
5219 ++++++ *   Version  $Id$
5220 +++++  */
5221 +++++ /*
5222 +++++    Copyright (C) 2001-2005 Kern Sibbald
5223 +++++@@ -149,7 +149,9 @@
5224 +++++       }
5225 +++++    }
5226 +++++    UnlockRes();
5227 +++++-   do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name));
5228 ++++++   if (do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name)) < 0) {
5229 ++++++      return NULL;
5230 ++++++   }
5231 +++++    store = (STORE *)GetResWithName(R_STORAGE, name);
5232 +++++    return store;
5233 +++++ }
5234 +++++@@ -170,7 +172,9 @@
5235 +++++       }
5236 +++++    }
5237 +++++    UnlockRes();
5238 +++++-   do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name));
5239 ++++++   if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) {
5240 ++++++      return NULL;
5241 ++++++   }
5242 +++++    fs = (FILESET *)GetResWithName(R_FILESET, name);
5243 +++++    return fs;
5244 +++++ }
5245 +++++@@ -202,7 +206,9 @@
5246 +++++          }
5247 +++++       }
5248 +++++       UnlockRes();
5249 +++++-      do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name));
5250 ++++++      if (do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name)) < 0) {
5251 ++++++         return NULL;
5252 ++++++      }
5253 +++++       catalog = (CAT *)GetResWithName(R_CATALOG, name);
5254 +++++    }
5255 +++++    return catalog;
5256 +++++@@ -225,7 +231,9 @@
5257 +++++       }
5258 +++++    }
5259 +++++    UnlockRes();
5260 +++++-   do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name));
5261 ++++++   if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) {
5262 ++++++      return NULL;
5263 ++++++   }
5264 +++++    job = (JOB *)GetResWithName(R_JOB, name);
5265 +++++    return job;
5266 +++++ }
5267 +++++@@ -246,7 +254,9 @@
5268 +++++       }
5269 +++++    }
5270 +++++    UnlockRes();
5271 +++++-   do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name));
5272 ++++++   if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) {
5273 ++++++      return NULL;
5274 ++++++   }
5275 +++++    job = (JOB *)GetResWithName(R_JOB, name);
5276 +++++    return job;
5277 +++++ }
5278 +++++@@ -269,7 +279,9 @@
5279 +++++       }
5280 +++++    }
5281 +++++    UnlockRes();
5282 +++++-   do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name));
5283 ++++++   if (do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) {
5284 ++++++      return NULL;
5285 ++++++   }
5286 +++++    client = (CLIENT *)GetResWithName(R_CLIENT, name);
5287 +++++    return client;
5288 +++++ }
5289 +++++@@ -551,7 +563,9 @@
5290 +++++       }
5291 +++++    }
5292 +++++    UnlockRes();
5293 +++++-   do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name));
5294 ++++++   if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) {
5295 ++++++      return NULL;
5296 ++++++   }
5297 +++++    pool = (POOL *)GetResWithName(R_POOL, name);
5298 +++++    return pool;
5299 +++++ }
5300 +++++@@ -673,12 +687,16 @@
5301 +++++  *  Returns: -1 on error
5302 +++++  *            index base 0 on success, and choice
5303 +++++  *               is copied to prompt if not NULL
5304 ++++++ *             prompt is set to the chosen prompt item string
5305 +++++  */
5306 +++++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
5307 +++++ {
5308 +++++    int i, item;
5309 +++++    char pmsg[MAXSTRING];
5310 +++++ 
5311 ++++++   if (prompt) {
5312 ++++++      *prompt = 0;
5313 ++++++   }
5314 +++++    if (ua->num_prompts == 2) {
5315 +++++       item = 1;
5316 +++++       if (prompt) {
5317 +++++@@ -698,15 +716,11 @@
5318 +++++       bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
5319 +++++    }
5320 +++++ 
5321 +++++-   if (prompt) {
5322 +++++-      *prompt = 0;
5323 +++++-   }
5324 +++++-
5325 +++++    for ( ;; ) {
5326 +++++       /* First item is the prompt string, not the items */
5327 +++++       if (ua->num_prompts == 1) {
5328 +++++          bsendmsg(ua, _("Selection is empty!\n"));
5329 +++++-         item = 0;                    /* list is empty ! */
5330 ++++++         item = -1;                    /* list is empty ! */
5331 +++++          break;
5332 +++++       }
5333 +++++       if (ua->num_prompts == 2) {
5334 +++++@@ -741,7 +755,7 @@
5335 +++++       free(ua->prompt[i]);
5336 +++++    }
5337 +++++    ua->num_prompts = 0;
5338 +++++-   return item - 1;
5339 ++++++   return item>0 ? item-1 : item;
5340 +++++ }
5341 +++++ 
5342 +++++ 
5343 +++++Index: src/dird/ua_update.c
5344 +++++===================================================================
5345 +++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v
5346 +++++retrieving revision 1.7
5347 +++++diff -u -r1.7 ua_update.c
5348 +++++--- src/dird/ua_update.c   28 Aug 2005 12:22:02 -0000      1.7
5349 ++++++++ src/dird/ua_update.c   21 Nov 2005 13:13:02 -0000
5350 +++++@@ -590,7 +590,7 @@
5351 +++++          update_all_vols_from_pool(ua);
5352 +++++          return 1;
5353 +++++       default:                        /* Done or error */
5354 +++++-         bsendmsg(ua, _("Selection done.\n"));
5355 ++++++         bsendmsg(ua, _("Selection terminated.\n"));
5356 +++++          return 1;
5357 +++++       }
5358 +++++    }
5359 +++++Index: src/filed/acl.c
5360 +++++===================================================================
5361 +++++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v
5362 +++++retrieving revision 1.10.2.1
5363 +++++diff -u -r1.10.2.1 acl.c
5364 +++++--- src/filed/acl.c        14 Nov 2005 20:20:38 -0000      1.10.2.1
5365 ++++++++ src/filed/acl.c        21 Nov 2005 13:13:02 -0000
5366 +++++@@ -26,7 +26,7 @@
5367 +++++  *
5368 +++++  *   Written by Preben 'Peppe' Guldberg, December MMIV
5369 +++++  *
5370 +++++- *   Version $Id$
5371 ++++++ *   Version $Id$
5372 +++++  */
5373 +++++ /*
5374 +++++    Copyright (C) 2004-2005 Kern Sibbald
5375 +++++@@ -140,7 +140,7 @@
5376 +++++ 
5377 +++++    if ((acl_text = acl_get(jcr->last_fname)) != NULL) {
5378 +++++       len = pm_strcpy(jcr->acl_text, acl_text);
5379 +++++-      free(acl_text);
5380 ++++++      actuallyfree(acl_text);
5381 +++++       return len;
5382 +++++    }
5383 +++++    return -1;
5384 +++++@@ -270,7 +270,7 @@
5385 +++++    if ((n = getacl(jcr->last_fname, n, acls)) > 0) {
5386 +++++       if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) {
5387 +++++          len = pm_strcpy(jcr->acl_text, acl_text);
5388 +++++-         free(acl_text);
5389 ++++++         actuallyfree(acl_text);
5390 +++++          return len;
5391 +++++       }
5392 +++++    }
5393 +++++Index: src/findlib/bfile.c
5394 +++++===================================================================
5395 +++++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v
5396 +++++retrieving revision 1.40
5397 +++++diff -u -r1.40 bfile.c
5398 +++++--- src/findlib/bfile.c    10 Aug 2005 16:35:19 -0000      1.40
5399 ++++++++ src/findlib/bfile.c    21 Nov 2005 13:13:02 -0000
5400 +++++@@ -623,13 +623,10 @@
5401 +++++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
5402 +++++ {
5403 +++++    POOLMEM *rsrc_fname;
5404 +++++-   size_t fname_len;
5405 +++++ 
5406 +++++-   fname_len = strlen(fname);
5407 +++++    rsrc_fname = get_pool_memory(PM_FNAME);
5408 +++++-   bstrncpy(rsrc_fname, fname, fname_len + 1);
5409 +++++-   bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC,
5410 +++++-      strlen(_PATH_RSRCFORKSPEC) + 1);
5411 ++++++   pm_strcpy(rsrc_fname, fname);
5412 ++++++   pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC);
5413 +++++    bopen(bfd, rsrc_fname, flags, mode);
5414 +++++    free_pool_memory(rsrc_fname);
5415 +++++    return bfd->fid;
5416 +++++Index: src/lib/bnet_server.c
5417 +++++===================================================================
5418 +++++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v
5419 +++++retrieving revision 1.39
5420 +++++diff -u -r1.39 bnet_server.c
5421 +++++--- src/lib/bnet_server.c  18 Aug 2005 15:37:40 -0000      1.39
5422 ++++++++ src/lib/bnet_server.c  21 Nov 2005 13:13:03 -0000
5423 +++++@@ -153,7 +153,6 @@
5424 +++++          /* Error, get out */
5425 +++++          foreach_dlist(fd_ptr, &sockfds) {
5426 +++++             close(fd_ptr->fd);
5427 +++++-            free((void *)fd_ptr);
5428 +++++          }
5429 +++++          Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror());
5430 +++++          break;
5431 +++++Index: src/stored/autochanger.c
5432 +++++===================================================================
5433 +++++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
5434 +++++retrieving revision 1.47.2.3
5435 +++++diff -u -r1.47.2.3 autochanger.c
5436 +++++--- src/stored/autochanger.c       12 Nov 2005 17:30:53 -0000      1.47.2.3
5437 ++++++++ src/stored/autochanger.c       21 Nov 2005 13:13:03 -0000
5438 +++++@@ -4,7 +4,7 @@
5439 +++++  *
5440 +++++  *   Kern Sibbald, August MMII
5441 +++++  *                            
5442 +++++- *   Version $Id$
5443 ++++++ *   Version $Id$
5444 +++++  */
5445 +++++ /*
5446 +++++    Copyright (C) 2002-2005 Kern Sibbald
5447 +++++@@ -163,6 +163,7 @@
5448 +++++             rtn_stat = -1;            /* hard error */
5449 +++++          }
5450 +++++          Dmsg2(400, "load slot %d status=%d\n", slot, status);
5451 ++++++         unlock_changer(dcr);
5452 +++++       } else {
5453 +++++          status = 0;                  /* we got what we want */
5454 +++++          dev->Slot = slot;            /* set currently loaded slot */
5455 +++++@@ -174,7 +175,6 @@
5456 +++++    } else {
5457 +++++       rtn_stat = 0;                   /* no changer found */
5458 +++++    }
5459 +++++-   unlock_changer(dcr);
5460 +++++    free_pool_memory(changer);
5461 +++++    return rtn_stat;
5462 +++++ 
5463 +++++Index: src/stored/status.c
5464 +++++===================================================================
5465 +++++RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v
5466 +++++retrieving revision 1.44.2.1
5467 +++++diff -u -r1.44.2.1 status.c
5468 +++++--- src/stored/status.c    6 Oct 2005 07:04:13 -0000       1.44.2.1
5469 ++++++++ src/stored/status.c    21 Nov 2005 13:13:03 -0000
5470 +++++@@ -264,6 +264,7 @@
5471 +++++    bool found = false;
5472 +++++    int bps, sec;
5473 +++++    JCR *jcr;
5474 ++++++   DCR *dcr;
5475 +++++    char JobName[MAX_NAME_LENGTH];
5476 +++++    char b1[30], b2[30], b3[30];
5477 +++++ 
5478 +++++@@ -273,7 +274,8 @@
5479 +++++          bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"),
5480 +++++             job_type_to_str(jcr->JobType), jcr->Job);
5481 +++++       }
5482 +++++-      if (jcr->dcr && jcr->dcr->device) {
5483 ++++++      dcr = jcr->dcr;
5484 ++++++      if (dcr && dcr->device) {
5485 +++++          bstrncpy(JobName, jcr->Job, sizeof(JobName));
5486 +++++          /* There are three periods after the Job name */
5487 +++++          char *p;
5488 +++++@@ -282,13 +284,16 @@
5489 +++++                *p = 0;
5490 +++++             }
5491 +++++          }
5492 +++++-         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"),
5493 ++++++         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n"
5494 ++++++                            "    pool=\"%s\" device=\"%s\"\n"),
5495 +++++                    job_level_to_str(jcr->JobLevel),
5496 +++++                    job_type_to_str(jcr->JobType),
5497 +++++                    JobName,
5498 +++++                    jcr->JobId,
5499 +++++-                   jcr->dcr->VolumeName,
5500 +++++-                   jcr->dcr->device->device_name);
5501 ++++++                   dcr->VolumeName,
5502 ++++++                   dcr->pool_name,
5503 ++++++                   dcr->dev?dcr->dev->print_name(): 
5504 ++++++                            dcr->device->device_name);
5505 +++++          sec = time(NULL) - jcr->run_time;
5506 +++++          if (sec <= 0) {
5507 +++++             sec = 1;
5508 +++++Index: src/stored/stored_conf.c
5509 +++++===================================================================
5510 +++++RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v
5511 +++++retrieving revision 1.76
5512 +++++diff -u -r1.76 stored_conf.c
5513 +++++--- src/stored/stored_conf.c       9 Sep 2005 09:40:04 -0000       1.76
5514 ++++++++ src/stored/stored_conf.c       21 Nov 2005 13:13:04 -0000
5515 +++++@@ -222,16 +222,16 @@
5516 +++++          res->res_dev.hdr.name,
5517 +++++          res->res_dev.media_type, res->res_dev.device_name,
5518 +++++          res->res_dev.label_type);
5519 +++++-      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d\n",
5520 ++++++      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n",
5521 +++++          res->res_dev.max_rewind_wait, res->res_dev.min_block_size,
5522 +++++-         res->res_dev.max_block_size);
5523 ++++++         res->res_dev.max_block_size, res->res_dev.max_changer_wait);
5524 +++++       sendit(sock, "        max_jobs=%d max_files=%" lld " max_size=%" lld "\n",
5525 +++++          res->res_dev.max_volume_jobs, res->res_dev.max_volume_files,
5526 +++++          res->res_dev.max_volume_size);
5527 +++++       sendit(sock, "        max_file_size=%" lld " capacity=%" lld "\n",
5528 +++++          res->res_dev.max_file_size, res->res_dev.volume_capacity);
5529 +++++-      sendit(sock, "         spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
5530 +++++-      sendit(sock, "         max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
5531 ++++++      sendit(sock, "        spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
5532 ++++++      sendit(sock, "        max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
5533 +++++          res->res_dev.max_spool_size, res->res_dev.max_job_spool_size);
5534 +++++       if (res->res_dev.changer_res) {
5535 +++++          sendit(sock, "         changer=%p\n", res->res_dev.changer_res);
5536 +++++Index: src/tray-monitor/tray-monitor.c
5537 +++++===================================================================
5538 +++++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v
5539 +++++retrieving revision 1.25.2.1
5540 +++++diff -u -r1.25.2.1 tray-monitor.c
5541 +++++--- src/tray-monitor/tray-monitor.c        1 Oct 2005 10:20:18 -0000       1.25.2.1
5542 ++++++++ src/tray-monitor/tray-monitor.c        21 Nov 2005 13:13:04 -0000
5543 +++++@@ -4,7 +4,7 @@
5544 +++++  *
5545 +++++  *     Nicolas Boichat, August MMIV
5546 +++++  *
5547 +++++- *     Version $Id$
5548 ++++++ *     Version $Id$
5549 +++++  */
5550 +++++ 
5551 +++++ /*
5552 +++++@@ -881,7 +881,7 @@
5553 +++++       }
5554 +++++ 
5555 +++++       if (item->D_sock == NULL) {
5556 +++++-         g_slist_append(*list, (void *)_("Cannot connect to daemon.\n"));
5557 ++++++         g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n")));
5558 +++++          changeStatusMessage(item, _("Cannot connect to daemon."));
5559 +++++          item->state = error;
5560 +++++          item->oldstate = error;
5561 ++++Index: patches/patches-1.38.0
5562 ++++===================================================================
5563 ++++RCS file: patches/patches-1.38.0
5564 ++++diff -N patches/patches-1.38.0
5565 ++++Index: patches/patches-1.38.1
5566 ++++===================================================================
5567 ++++RCS file: patches/patches-1.38.1
5568 ++++diff -N patches/patches-1.38.1
5569 ++++--- /dev/null       1 Jan 1970 00:00:00 -0000
5570 +++++++ patches/patches-1.38.1  21 Nov 2005 13:17:58 -0000
5571 ++++@@ -0,0 +1,14 @@
5572 +++++20Nov05 1.38.1-to-1.38.2.patch
5573 +++++ This patch fixes the following bugs:
5574 +++++
5575 +++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
5576 +++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
5577 +++++  says this patch does not fix his problem)
5578 +++++- Fix cancel failure bug. Bug #481
5579 +++++- Fix failure when Pool name has spaces. Bug #487
5580 +++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
5581 +++++- Fix a couple of free()s in src/filed/acl.c
5582 +++++- Fix memory overrun in bfile.c in building OS X resource
5583 +++++  fork filename. Bug #489
5584 +++++                         
5585 +++++  
5586 ++++Index: src/version.h
5587 ++++===================================================================
5588 ++++RCS file: /cvsroot/bacula/bacula/src/version.h,v
5589 ++++retrieving revision 1.554.2.14
5590 ++++diff -u -r1.554.2.14 version.h
5591 ++++--- src/version.h   14 Nov 2005 14:21:58 -0000      1.554.2.14
5592 +++++++ src/version.h   21 Nov 2005 13:17:58 -0000
5593 ++++@@ -3,9 +3,9 @@
5594 ++++  */
5595 ++++ 
5596 ++++ #undef  VERSION
5597 ++++-#define VERSION "1.38.1"
5598 ++++-#define BDATE   "14 November 2005"
5599 ++++-#define LSMDATE "14Nov05"
5600 +++++#define VERSION "1.38.2"
5601 +++++#define BDATE   "20 November 2005"
5602 +++++#define LSMDATE "20Nov05"
5603 ++++ 
5604 ++++ /* Debug flags */
5605 ++++ #undef  DEBUG
5606 ++++Index: src/dird/catreq.c
5607 ++++===================================================================
5608 ++++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v
5609 ++++retrieving revision 1.77.2.1
5610 ++++diff -u -r1.77.2.1 catreq.c
5611 ++++--- src/dird/catreq.c       26 Oct 2005 14:02:04 -0000      1.77.2.1
5612 +++++++ src/dird/catreq.c       21 Nov 2005 13:17:59 -0000
5613 ++++@@ -10,7 +10,7 @@
5614 ++++  *  Basic tasks done here:
5615 ++++  *      Handle Catalog services.
5616 ++++  *
5617 ++++- *   Version $Id$
5618 +++++ *   Version $Id$
5619 ++++  */
5620 ++++ /*
5621 ++++    Copyright (C) 2001-2005 Kern Sibbald
5622 ++++@@ -117,6 +117,7 @@
5623 ++++    if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) {
5624 ++++       memset(&pr, 0, sizeof(pr));
5625 ++++       bstrncpy(pr.Name, pool_name, sizeof(pr.Name));
5626 +++++      unbash_spaces(pr.Name);
5627 ++++       ok = db_get_pool_record(jcr, jcr->db, &pr);
5628 ++++       if (ok) {
5629 ++++          mr.PoolId = pr.PoolId;
5630 ++++Index: src/dird/ua_restore.c
5631 ++++===================================================================
5632 ++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v
5633 ++++retrieving revision 1.101.2.1
5634 ++++diff -u -r1.101.2.1 ua_restore.c
5635 ++++--- src/dird/ua_restore.c   26 Oct 2005 14:02:04 -0000      1.101.2.1
5636 +++++++ src/dird/ua_restore.c   21 Nov 2005 13:17:59 -0000
5637 ++++@@ -10,7 +10,7 @@
5638 ++++  *
5639 ++++  *     Kern Sibbald, July MMII
5640 ++++  *
5641 ++++- *   Version $Id$
5642 +++++ *   Version $Id$
5643 ++++  */
5644 ++++ /*
5645 ++++    Copyright (C) 2002-2005 Kern Sibbald
5646 ++++@@ -409,7 +409,7 @@
5647 ++++       }
5648 ++++       done = true;
5649 ++++       switch (do_prompt(ua, "", _("Select item: "), NULL, 0)) {
5650 ++++-      case -1:                        /* error */
5651 +++++      case -1:                        /* error or cancel */
5652 ++++          return 0;
5653 ++++       case 0:                         /* list last 20 Jobs run */
5654 ++++          gui_save = ua->jcr->gui;
5655 ++++Index: src/dird/ua_run.c
5656 ++++===================================================================
5657 ++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v
5658 ++++retrieving revision 1.71
5659 ++++diff -u -r1.71 ua_run.c
5660 ++++--- src/dird/ua_run.c       10 Aug 2005 16:35:19 -0000      1.71
5661 +++++++ src/dird/ua_run.c       21 Nov 2005 13:17:59 -0000
5662 ++++@@ -851,6 +851,8 @@
5663 ++++             bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
5664 ++++          }
5665 ++++          goto try_again;
5666 +++++      case -1:                        /* error or cancel */
5667 +++++         goto bail_out;
5668 ++++       default:
5669 ++++          goto try_again;
5670 ++++       }
5671 ++++Index: src/dird/ua_select.c
5672 ++++===================================================================
5673 ++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v
5674 ++++retrieving revision 1.65.2.1
5675 ++++diff -u -r1.65.2.1 ua_select.c
5676 ++++--- src/dird/ua_select.c    12 Nov 2005 17:30:52 -0000      1.65.2.1
5677 +++++++ src/dird/ua_select.c    21 Nov 2005 13:17:59 -0000
5678 ++++@@ -4,7 +4,7 @@
5679 ++++  *
5680 ++++  *     Kern Sibbald, October MMI
5681 ++++  *
5682 ++++- *   Version  $Id$
5683 +++++ *   Version  $Id$
5684 ++++  */
5685 ++++ /*
5686 ++++    Copyright (C) 2001-2005 Kern Sibbald
5687 ++++@@ -149,7 +149,9 @@
5688 ++++       }
5689 ++++    }
5690 ++++    UnlockRes();
5691 ++++-   do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name));
5692 +++++   if (do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name)) < 0) {
5693 +++++      return NULL;
5694 +++++   }
5695 ++++    store = (STORE *)GetResWithName(R_STORAGE, name);
5696 ++++    return store;
5697 ++++ }
5698 ++++@@ -170,7 +172,9 @@
5699 ++++       }
5700 ++++    }
5701 ++++    UnlockRes();
5702 ++++-   do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name));
5703 +++++   if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) {
5704 +++++      return NULL;
5705 +++++   }
5706 ++++    fs = (FILESET *)GetResWithName(R_FILESET, name);
5707 ++++    return fs;
5708 ++++ }
5709 ++++@@ -202,7 +206,9 @@
5710 ++++          }
5711 ++++       }
5712 ++++       UnlockRes();
5713 ++++-      do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name));
5714 +++++      if (do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name)) < 0) {
5715 +++++         return NULL;
5716 +++++      }
5717 ++++       catalog = (CAT *)GetResWithName(R_CATALOG, name);
5718 ++++    }
5719 ++++    return catalog;
5720 ++++@@ -225,7 +231,9 @@
5721 ++++       }
5722 ++++    }
5723 ++++    UnlockRes();
5724 ++++-   do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name));
5725 +++++   if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) {
5726 +++++      return NULL;
5727 +++++   }
5728 ++++    job = (JOB *)GetResWithName(R_JOB, name);
5729 ++++    return job;
5730 ++++ }
5731 ++++@@ -246,7 +254,9 @@
5732 ++++       }
5733 ++++    }
5734 ++++    UnlockRes();
5735 ++++-   do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name));
5736 +++++   if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) {
5737 +++++      return NULL;
5738 +++++   }
5739 ++++    job = (JOB *)GetResWithName(R_JOB, name);
5740 ++++    return job;
5741 ++++ }
5742 ++++@@ -269,7 +279,9 @@
5743 ++++       }
5744 ++++    }
5745 ++++    UnlockRes();
5746 ++++-   do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name));
5747 +++++   if (do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) {
5748 +++++      return NULL;
5749 +++++   }
5750 ++++    client = (CLIENT *)GetResWithName(R_CLIENT, name);
5751 ++++    return client;
5752 ++++ }
5753 ++++@@ -551,7 +563,9 @@
5754 ++++       }
5755 ++++    }
5756 ++++    UnlockRes();
5757 ++++-   do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name));
5758 +++++   if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) {
5759 +++++      return NULL;
5760 +++++   }
5761 ++++    pool = (POOL *)GetResWithName(R_POOL, name);
5762 ++++    return pool;
5763 ++++ }
5764 ++++@@ -673,12 +687,16 @@
5765 ++++  *  Returns: -1 on error
5766 ++++  *            index base 0 on success, and choice
5767 ++++  *               is copied to prompt if not NULL
5768 +++++ *             prompt is set to the chosen prompt item string
5769 ++++  */
5770 ++++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
5771 ++++ {
5772 ++++    int i, item;
5773 ++++    char pmsg[MAXSTRING];
5774 ++++ 
5775 +++++   if (prompt) {
5776 +++++      *prompt = 0;
5777 +++++   }
5778 ++++    if (ua->num_prompts == 2) {
5779 ++++       item = 1;
5780 ++++       if (prompt) {
5781 ++++@@ -698,15 +716,11 @@
5782 ++++       bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
5783 ++++    }
5784 ++++ 
5785 ++++-   if (prompt) {
5786 ++++-      *prompt = 0;
5787 ++++-   }
5788 ++++-
5789 ++++    for ( ;; ) {
5790 ++++       /* First item is the prompt string, not the items */
5791 ++++       if (ua->num_prompts == 1) {
5792 ++++          bsendmsg(ua, _("Selection is empty!\n"));
5793 ++++-         item = 0;                    /* list is empty ! */
5794 +++++         item = -1;                    /* list is empty ! */
5795 ++++          break;
5796 ++++       }
5797 ++++       if (ua->num_prompts == 2) {
5798 ++++@@ -741,7 +755,7 @@
5799 ++++       free(ua->prompt[i]);
5800 ++++    }
5801 ++++    ua->num_prompts = 0;
5802 ++++-   return item - 1;
5803 +++++   return item>0 ? item-1 : item;
5804 ++++ }
5805 ++++ 
5806 ++++ 
5807 ++++Index: src/dird/ua_update.c
5808 ++++===================================================================
5809 ++++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v
5810 ++++retrieving revision 1.7
5811 ++++diff -u -r1.7 ua_update.c
5812 ++++--- src/dird/ua_update.c    28 Aug 2005 12:22:02 -0000      1.7
5813 +++++++ src/dird/ua_update.c    21 Nov 2005 13:17:59 -0000
5814 ++++@@ -590,7 +590,7 @@
5815 ++++          update_all_vols_from_pool(ua);
5816 ++++          return 1;
5817 ++++       default:                        /* Done or error */
5818 ++++-         bsendmsg(ua, _("Selection done.\n"));
5819 +++++         bsendmsg(ua, _("Selection terminated.\n"));
5820 ++++          return 1;
5821 ++++       }
5822 ++++    }
5823 ++++Index: src/filed/acl.c
5824 ++++===================================================================
5825 ++++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v
5826 ++++retrieving revision 1.10.2.1
5827 ++++diff -u -r1.10.2.1 acl.c
5828 ++++--- src/filed/acl.c 14 Nov 2005 20:20:38 -0000      1.10.2.1
5829 +++++++ src/filed/acl.c 21 Nov 2005 13:17:59 -0000
5830 ++++@@ -26,7 +26,7 @@
5831 ++++  *
5832 ++++  *   Written by Preben 'Peppe' Guldberg, December MMIV
5833 ++++  *
5834 ++++- *   Version $Id$
5835 +++++ *   Version $Id$
5836 ++++  */
5837 ++++ /*
5838 ++++    Copyright (C) 2004-2005 Kern Sibbald
5839 ++++@@ -140,7 +140,7 @@
5840 ++++ 
5841 ++++    if ((acl_text = acl_get(jcr->last_fname)) != NULL) {
5842 ++++       len = pm_strcpy(jcr->acl_text, acl_text);
5843 ++++-      free(acl_text);
5844 +++++      actuallyfree(acl_text);
5845 ++++       return len;
5846 ++++    }
5847 ++++    return -1;
5848 ++++@@ -270,7 +270,7 @@
5849 ++++    if ((n = getacl(jcr->last_fname, n, acls)) > 0) {
5850 ++++       if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) {
5851 ++++          len = pm_strcpy(jcr->acl_text, acl_text);
5852 ++++-         free(acl_text);
5853 +++++         actuallyfree(acl_text);
5854 ++++          return len;
5855 ++++       }
5856 ++++    }
5857 ++++Index: src/findlib/bfile.c
5858 ++++===================================================================
5859 ++++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v
5860 ++++retrieving revision 1.40
5861 ++++diff -u -r1.40 bfile.c
5862 ++++--- src/findlib/bfile.c     10 Aug 2005 16:35:19 -0000      1.40
5863 +++++++ src/findlib/bfile.c     21 Nov 2005 13:17:59 -0000
5864 ++++@@ -623,13 +623,10 @@
5865 ++++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
5866 ++++ {
5867 ++++    POOLMEM *rsrc_fname;
5868 ++++-   size_t fname_len;
5869 ++++ 
5870 ++++-   fname_len = strlen(fname);
5871 ++++    rsrc_fname = get_pool_memory(PM_FNAME);
5872 ++++-   bstrncpy(rsrc_fname, fname, fname_len + 1);
5873 ++++-   bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC,
5874 ++++-      strlen(_PATH_RSRCFORKSPEC) + 1);
5875 +++++   pm_strcpy(rsrc_fname, fname);
5876 +++++   pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC);
5877 ++++    bopen(bfd, rsrc_fname, flags, mode);
5878 ++++    free_pool_memory(rsrc_fname);
5879 ++++    return bfd->fid;
5880 ++++Index: src/lib/bnet_server.c
5881 ++++===================================================================
5882 ++++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v
5883 ++++retrieving revision 1.39
5884 ++++diff -u -r1.39 bnet_server.c
5885 ++++--- src/lib/bnet_server.c   18 Aug 2005 15:37:40 -0000      1.39
5886 +++++++ src/lib/bnet_server.c   21 Nov 2005 13:18:00 -0000
5887 ++++@@ -153,7 +153,6 @@
5888 ++++          /* Error, get out */
5889 ++++          foreach_dlist(fd_ptr, &sockfds) {
5890 ++++             close(fd_ptr->fd);
5891 ++++-            free((void *)fd_ptr);
5892 ++++          }
5893 ++++          Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror());
5894 ++++          break;
5895 ++++Index: src/stored/autochanger.c
5896 ++++===================================================================
5897 ++++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
5898 ++++retrieving revision 1.47.2.3
5899 ++++diff -u -r1.47.2.3 autochanger.c
5900 ++++--- src/stored/autochanger.c        12 Nov 2005 17:30:53 -0000      1.47.2.3
5901 +++++++ src/stored/autochanger.c        21 Nov 2005 13:18:00 -0000
5902 ++++@@ -4,7 +4,7 @@
5903 ++++  *
5904 ++++  *   Kern Sibbald, August MMII
5905 ++++  *                            
5906 ++++- *   Version $Id$
5907 +++++ *   Version $Id$
5908 ++++  */
5909 ++++ /*
5910 ++++    Copyright (C) 2002-2005 Kern Sibbald
5911 ++++@@ -163,6 +163,7 @@
5912 ++++             rtn_stat = -1;            /* hard error */
5913 ++++          }
5914 ++++          Dmsg2(400, "load slot %d status=%d\n", slot, status);
5915 +++++         unlock_changer(dcr);
5916 ++++       } else {
5917 ++++          status = 0;                  /* we got what we want */
5918 ++++          dev->Slot = slot;            /* set currently loaded slot */
5919 ++++@@ -174,7 +175,6 @@
5920 ++++    } else {
5921 ++++       rtn_stat = 0;                   /* no changer found */
5922 ++++    }
5923 ++++-   unlock_changer(dcr);
5924 ++++    free_pool_memory(changer);
5925 ++++    return rtn_stat;
5926 ++++ 
5927 ++++Index: src/stored/status.c
5928 ++++===================================================================
5929 ++++RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v
5930 ++++retrieving revision 1.44.2.1
5931 ++++diff -u -r1.44.2.1 status.c
5932 ++++--- src/stored/status.c     6 Oct 2005 07:04:13 -0000       1.44.2.1
5933 +++++++ src/stored/status.c     21 Nov 2005 13:18:00 -0000
5934 ++++@@ -264,6 +264,7 @@
5935 ++++    bool found = false;
5936 ++++    int bps, sec;
5937 ++++    JCR *jcr;
5938 +++++   DCR *dcr;
5939 ++++    char JobName[MAX_NAME_LENGTH];
5940 ++++    char b1[30], b2[30], b3[30];
5941 ++++ 
5942 ++++@@ -273,7 +274,8 @@
5943 ++++          bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"),
5944 ++++             job_type_to_str(jcr->JobType), jcr->Job);
5945 ++++       }
5946 ++++-      if (jcr->dcr && jcr->dcr->device) {
5947 +++++      dcr = jcr->dcr;
5948 +++++      if (dcr && dcr->device) {
5949 ++++          bstrncpy(JobName, jcr->Job, sizeof(JobName));
5950 ++++          /* There are three periods after the Job name */
5951 ++++          char *p;
5952 ++++@@ -282,13 +284,16 @@
5953 ++++                *p = 0;
5954 ++++             }
5955 ++++          }
5956 ++++-         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"),
5957 +++++         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n"
5958 +++++                            "    pool=\"%s\" device=\"%s\"\n"),
5959 ++++                    job_level_to_str(jcr->JobLevel),
5960 ++++                    job_type_to_str(jcr->JobType),
5961 ++++                    JobName,
5962 ++++                    jcr->JobId,
5963 ++++-                   jcr->dcr->VolumeName,
5964 ++++-                   jcr->dcr->device->device_name);
5965 +++++                   dcr->VolumeName,
5966 +++++                   dcr->pool_name,
5967 +++++                   dcr->dev?dcr->dev->print_name(): 
5968 +++++                            dcr->device->device_name);
5969 ++++          sec = time(NULL) - jcr->run_time;
5970 ++++          if (sec <= 0) {
5971 ++++             sec = 1;
5972 ++++Index: src/stored/stored_conf.c
5973 ++++===================================================================
5974 ++++RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v
5975 ++++retrieving revision 1.76
5976 ++++diff -u -r1.76 stored_conf.c
5977 ++++--- src/stored/stored_conf.c        9 Sep 2005 09:40:04 -0000       1.76
5978 +++++++ src/stored/stored_conf.c        21 Nov 2005 13:18:00 -0000
5979 ++++@@ -222,16 +222,16 @@
5980 ++++          res->res_dev.hdr.name,
5981 ++++          res->res_dev.media_type, res->res_dev.device_name,
5982 ++++          res->res_dev.label_type);
5983 ++++-      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d\n",
5984 +++++      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n",
5985 ++++          res->res_dev.max_rewind_wait, res->res_dev.min_block_size,
5986 ++++-         res->res_dev.max_block_size);
5987 +++++         res->res_dev.max_block_size, res->res_dev.max_changer_wait);
5988 ++++       sendit(sock, "        max_jobs=%d max_files=%" lld " max_size=%" lld "\n",
5989 ++++          res->res_dev.max_volume_jobs, res->res_dev.max_volume_files,
5990 ++++          res->res_dev.max_volume_size);
5991 ++++       sendit(sock, "        max_file_size=%" lld " capacity=%" lld "\n",
5992 ++++          res->res_dev.max_file_size, res->res_dev.volume_capacity);
5993 ++++-      sendit(sock, "         spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
5994 ++++-      sendit(sock, "         max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
5995 +++++      sendit(sock, "        spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
5996 +++++      sendit(sock, "        max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
5997 ++++          res->res_dev.max_spool_size, res->res_dev.max_job_spool_size);
5998 ++++       if (res->res_dev.changer_res) {
5999 ++++          sendit(sock, "         changer=%p\n", res->res_dev.changer_res);
6000 ++++Index: src/tray-monitor/tray-monitor.c
6001 ++++===================================================================
6002 ++++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v
6003 ++++retrieving revision 1.25.2.1
6004 ++++diff -u -r1.25.2.1 tray-monitor.c
6005 ++++--- src/tray-monitor/tray-monitor.c 1 Oct 2005 10:20:18 -0000       1.25.2.1
6006 +++++++ src/tray-monitor/tray-monitor.c 21 Nov 2005 13:18:00 -0000
6007 ++++@@ -4,7 +4,7 @@
6008 ++++  *
6009 ++++  *     Nicolas Boichat, August MMIV
6010 ++++  *
6011 ++++- *     Version $Id$
6012 +++++ *     Version $Id$
6013 ++++  */
6014 ++++ 
6015 ++++ /*
6016 ++++@@ -881,7 +881,7 @@
6017 ++++       }
6018 ++++ 
6019 ++++       if (item->D_sock == NULL) {
6020 ++++-         g_slist_append(*list, (void *)_("Cannot connect to daemon.\n"));
6021 +++++         g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n")));
6022 ++++          changeStatusMessage(item, _("Cannot connect to daemon."));
6023 ++++          item->state = error;
6024 ++++          item->oldstate = error;
6025 +++Index: patches/patches-1.38.0
6026 +++===================================================================
6027 +++RCS file: patches/patches-1.38.0
6028 +++diff -N patches/patches-1.38.0
6029 +++Index: patches/patches-1.38.1
6030 +++===================================================================
6031 +++RCS file: patches/patches-1.38.1
6032 +++diff -N patches/patches-1.38.1
6033 +++--- /dev/null        1 Jan 1970 00:00:00 -0000
6034 ++++++ patches/patches-1.38.1   21 Nov 2005 18:19:05 -0000
6035 +++@@ -0,0 +1,14 @@
6036 ++++20Nov05 1.38.1-to-1.38.2.patch
6037 ++++ This patch fixes the following bugs:
6038 ++++
6039 ++++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
6040 ++++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
6041 ++++  says this patch does not fix his problem)
6042 ++++- Fix cancel failure bug. Bug #481
6043 ++++- Fix failure when Pool name has spaces. Bug #487
6044 ++++- Fix SD crash in autochanger code. Mutex failure. Bug #488
6045 ++++- Fix a couple of free()s in src/filed/acl.c
6046 ++++- Fix memory overrun in bfile.c in building OS X resource
6047 ++++  fork filename. Bug #489
6048 ++++                         
6049 ++++  
6050 +++Index: src/version.h
6051 +++===================================================================
6052 +++RCS file: /cvsroot/bacula/bacula/src/version.h,v
6053 +++retrieving revision 1.554.2.14
6054 +++diff -u -r1.554.2.14 version.h
6055 +++--- src/version.h    14 Nov 2005 14:21:58 -0000      1.554.2.14
6056 ++++++ src/version.h    21 Nov 2005 18:19:06 -0000
6057 +++@@ -3,9 +3,9 @@
6058 +++  */
6059 +++ 
6060 +++ #undef  VERSION
6061 +++-#define VERSION "1.38.1"
6062 +++-#define BDATE   "14 November 2005"
6063 +++-#define LSMDATE "14Nov05"
6064 ++++#define VERSION "1.38.2"
6065 ++++#define BDATE   "20 November 2005"
6066 ++++#define LSMDATE "20Nov05"
6067 +++ 
6068 +++ /* Debug flags */
6069 +++ #undef  DEBUG
6070 +++Index: src/dird/catreq.c
6071 +++===================================================================
6072 +++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v
6073 +++retrieving revision 1.77.2.1
6074 +++diff -u -r1.77.2.1 catreq.c
6075 +++--- src/dird/catreq.c        26 Oct 2005 14:02:04 -0000      1.77.2.1
6076 ++++++ src/dird/catreq.c        21 Nov 2005 18:19:06 -0000
6077 +++@@ -10,7 +10,7 @@
6078 +++  *  Basic tasks done here:
6079 +++  *      Handle Catalog services.
6080 +++  *
6081 +++- *   Version $Id$
6082 ++++ *   Version $Id$
6083 +++  */
6084 +++ /*
6085 +++    Copyright (C) 2001-2005 Kern Sibbald
6086 +++@@ -117,6 +117,7 @@
6087 +++    if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) {
6088 +++       memset(&pr, 0, sizeof(pr));
6089 +++       bstrncpy(pr.Name, pool_name, sizeof(pr.Name));
6090 ++++      unbash_spaces(pr.Name);
6091 +++       ok = db_get_pool_record(jcr, jcr->db, &pr);
6092 +++       if (ok) {
6093 +++          mr.PoolId = pr.PoolId;
6094 +++Index: src/dird/ua_restore.c
6095 +++===================================================================
6096 +++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v
6097 +++retrieving revision 1.101.2.1
6098 +++diff -u -r1.101.2.1 ua_restore.c
6099 +++--- src/dird/ua_restore.c    26 Oct 2005 14:02:04 -0000      1.101.2.1
6100 ++++++ src/dird/ua_restore.c    21 Nov 2005 18:19:06 -0000
6101 +++@@ -10,7 +10,7 @@
6102 +++  *
6103 +++  *     Kern Sibbald, July MMII
6104 +++  *
6105 +++- *   Version $Id$
6106 ++++ *   Version $Id$
6107 +++  */
6108 +++ /*
6109 +++    Copyright (C) 2002-2005 Kern Sibbald
6110 +++@@ -409,7 +409,7 @@
6111 +++       }
6112 +++       done = true;
6113 +++       switch (do_prompt(ua, "", _("Select item: "), NULL, 0)) {
6114 +++-      case -1:                        /* error */
6115 ++++      case -1:                        /* error or cancel */
6116 +++          return 0;
6117 +++       case 0:                         /* list last 20 Jobs run */
6118 +++          gui_save = ua->jcr->gui;
6119 +++Index: src/dird/ua_run.c
6120 +++===================================================================
6121 +++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v
6122 +++retrieving revision 1.71
6123 +++diff -u -r1.71 ua_run.c
6124 +++--- src/dird/ua_run.c        10 Aug 2005 16:35:19 -0000      1.71
6125 ++++++ src/dird/ua_run.c        21 Nov 2005 18:19:06 -0000
6126 +++@@ -851,6 +851,8 @@
6127 +++             bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
6128 +++          }
6129 +++          goto try_again;
6130 ++++      case -1:                        /* error or cancel */
6131 ++++         goto bail_out;
6132 +++       default:
6133 +++          goto try_again;
6134 +++       }
6135 +++Index: src/dird/ua_select.c
6136 +++===================================================================
6137 +++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v
6138 +++retrieving revision 1.65.2.1
6139 +++diff -u -r1.65.2.1 ua_select.c
6140 +++--- src/dird/ua_select.c     12 Nov 2005 17:30:52 -0000      1.65.2.1
6141 ++++++ src/dird/ua_select.c     21 Nov 2005 18:19:06 -0000
6142 +++@@ -4,7 +4,7 @@
6143 +++  *
6144 +++  *     Kern Sibbald, October MMI
6145 +++  *
6146 +++- *   Version  $Id$
6147 ++++ *   Version  $Id$
6148 +++  */
6149 +++ /*
6150 +++    Copyright (C) 2001-2005 Kern Sibbald
6151 +++@@ -149,7 +149,9 @@
6152 +++       }
6153 +++    }
6154 +++    UnlockRes();
6155 +++-   do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name));
6156 ++++   if (do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name)) < 0) {
6157 ++++      return NULL;
6158 ++++   }
6159 +++    store = (STORE *)GetResWithName(R_STORAGE, name);
6160 +++    return store;
6161 +++ }
6162 +++@@ -170,7 +172,9 @@
6163 +++       }
6164 +++    }
6165 +++    UnlockRes();
6166 +++-   do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name));
6167 ++++   if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) {
6168 ++++      return NULL;
6169 ++++   }
6170 +++    fs = (FILESET *)GetResWithName(R_FILESET, name);
6171 +++    return fs;
6172 +++ }
6173 +++@@ -202,7 +206,9 @@
6174 +++          }
6175 +++       }
6176 +++       UnlockRes();
6177 +++-      do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name));
6178 ++++      if (do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name)) < 0) {
6179 ++++         return NULL;
6180 ++++      }
6181 +++       catalog = (CAT *)GetResWithName(R_CATALOG, name);
6182 +++    }
6183 +++    return catalog;
6184 +++@@ -225,7 +231,9 @@
6185 +++       }
6186 +++    }
6187 +++    UnlockRes();
6188 +++-   do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name));
6189 ++++   if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) {
6190 ++++      return NULL;
6191 ++++   }
6192 +++    job = (JOB *)GetResWithName(R_JOB, name);
6193 +++    return job;
6194 +++ }
6195 +++@@ -246,7 +254,9 @@
6196 +++       }
6197 +++    }
6198 +++    UnlockRes();
6199 +++-   do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name));
6200 ++++   if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) {
6201 ++++      return NULL;
6202 ++++   }
6203 +++    job = (JOB *)GetResWithName(R_JOB, name);
6204 +++    return job;
6205 +++ }
6206 +++@@ -269,7 +279,9 @@
6207 +++       }
6208 +++    }
6209 +++    UnlockRes();
6210 +++-   do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name));
6211 ++++   if (do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) {
6212 ++++      return NULL;
6213 ++++   }
6214 +++    client = (CLIENT *)GetResWithName(R_CLIENT, name);
6215 +++    return client;
6216 +++ }
6217 +++@@ -551,7 +563,9 @@
6218 +++       }
6219 +++    }
6220 +++    UnlockRes();
6221 +++-   do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name));
6222 ++++   if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) {
6223 ++++      return NULL;
6224 ++++   }
6225 +++    pool = (POOL *)GetResWithName(R_POOL, name);
6226 +++    return pool;
6227 +++ }
6228 +++@@ -673,12 +687,16 @@
6229 +++  *  Returns: -1 on error
6230 +++  *            index base 0 on success, and choice
6231 +++  *               is copied to prompt if not NULL
6232 ++++ *             prompt is set to the chosen prompt item string
6233 +++  */
6234 +++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
6235 +++ {
6236 +++    int i, item;
6237 +++    char pmsg[MAXSTRING];
6238 +++ 
6239 ++++   if (prompt) {
6240 ++++      *prompt = 0;
6241 ++++   }
6242 +++    if (ua->num_prompts == 2) {
6243 +++       item = 1;
6244 +++       if (prompt) {
6245 +++@@ -698,15 +716,11 @@
6246 +++       bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
6247 +++    }
6248 +++ 
6249 +++-   if (prompt) {
6250 +++-      *prompt = 0;
6251 +++-   }
6252 +++-
6253 +++    for ( ;; ) {
6254 +++       /* First item is the prompt string, not the items */
6255 +++       if (ua->num_prompts == 1) {
6256 +++          bsendmsg(ua, _("Selection is empty!\n"));
6257 +++-         item = 0;                    /* list is empty ! */
6258 ++++         item = -1;                    /* list is empty ! */
6259 +++          break;
6260 +++       }
6261 +++       if (ua->num_prompts == 2) {
6262 +++@@ -741,7 +755,7 @@
6263 +++       free(ua->prompt[i]);
6264 +++    }
6265 +++    ua->num_prompts = 0;
6266 +++-   return item - 1;
6267 ++++   return item>0 ? item-1 : item;
6268 +++ }
6269 +++ 
6270 +++ 
6271 +++Index: src/dird/ua_update.c
6272 +++===================================================================
6273 +++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v
6274 +++retrieving revision 1.7
6275 +++diff -u -r1.7 ua_update.c
6276 +++--- src/dird/ua_update.c     28 Aug 2005 12:22:02 -0000      1.7
6277 ++++++ src/dird/ua_update.c     21 Nov 2005 18:19:06 -0000
6278 +++@@ -590,7 +590,7 @@
6279 +++          update_all_vols_from_pool(ua);
6280 +++          return 1;
6281 +++       default:                        /* Done or error */
6282 +++-         bsendmsg(ua, _("Selection done.\n"));
6283 ++++         bsendmsg(ua, _("Selection terminated.\n"));
6284 +++          return 1;
6285 +++       }
6286 +++    }
6287 +++Index: src/filed/acl.c
6288 +++===================================================================
6289 +++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v
6290 +++retrieving revision 1.10.2.1
6291 +++diff -u -r1.10.2.1 acl.c
6292 +++--- src/filed/acl.c  14 Nov 2005 20:20:38 -0000      1.10.2.1
6293 ++++++ src/filed/acl.c  21 Nov 2005 18:19:07 -0000
6294 +++@@ -26,7 +26,7 @@
6295 +++  *
6296 +++  *   Written by Preben 'Peppe' Guldberg, December MMIV
6297 +++  *
6298 +++- *   Version $Id$
6299 ++++ *   Version $Id$
6300 +++  */
6301 +++ /*
6302 +++    Copyright (C) 2004-2005 Kern Sibbald
6303 +++@@ -140,7 +140,7 @@
6304 +++ 
6305 +++    if ((acl_text = acl_get(jcr->last_fname)) != NULL) {
6306 +++       len = pm_strcpy(jcr->acl_text, acl_text);
6307 +++-      free(acl_text);
6308 ++++      actuallyfree(acl_text);
6309 +++       return len;
6310 +++    }
6311 +++    return -1;
6312 +++@@ -270,7 +270,7 @@
6313 +++    if ((n = getacl(jcr->last_fname, n, acls)) > 0) {
6314 +++       if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) {
6315 +++          len = pm_strcpy(jcr->acl_text, acl_text);
6316 +++-         free(acl_text);
6317 ++++         actuallyfree(acl_text);
6318 +++          return len;
6319 +++       }
6320 +++    }
6321 +++Index: src/findlib/bfile.c
6322 +++===================================================================
6323 +++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v
6324 +++retrieving revision 1.40
6325 +++diff -u -r1.40 bfile.c
6326 +++--- src/findlib/bfile.c      10 Aug 2005 16:35:19 -0000      1.40
6327 ++++++ src/findlib/bfile.c      21 Nov 2005 18:19:07 -0000
6328 +++@@ -623,13 +623,10 @@
6329 +++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
6330 +++ {
6331 +++    POOLMEM *rsrc_fname;
6332 +++-   size_t fname_len;
6333 +++ 
6334 +++-   fname_len = strlen(fname);
6335 +++    rsrc_fname = get_pool_memory(PM_FNAME);
6336 +++-   bstrncpy(rsrc_fname, fname, fname_len + 1);
6337 +++-   bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC,
6338 +++-      strlen(_PATH_RSRCFORKSPEC) + 1);
6339 ++++   pm_strcpy(rsrc_fname, fname);
6340 ++++   pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC);
6341 +++    bopen(bfd, rsrc_fname, flags, mode);
6342 +++    free_pool_memory(rsrc_fname);
6343 +++    return bfd->fid;
6344 +++Index: src/lib/bnet_server.c
6345 +++===================================================================
6346 +++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v
6347 +++retrieving revision 1.39
6348 +++diff -u -r1.39 bnet_server.c
6349 +++--- src/lib/bnet_server.c    18 Aug 2005 15:37:40 -0000      1.39
6350 ++++++ src/lib/bnet_server.c    21 Nov 2005 18:19:07 -0000
6351 +++@@ -153,7 +153,6 @@
6352 +++          /* Error, get out */
6353 +++          foreach_dlist(fd_ptr, &sockfds) {
6354 +++             close(fd_ptr->fd);
6355 +++-            free((void *)fd_ptr);
6356 +++          }
6357 +++          Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror());
6358 +++          break;
6359 +++Index: src/stored/autochanger.c
6360 +++===================================================================
6361 +++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
6362 +++retrieving revision 1.47.2.3
6363 +++diff -u -r1.47.2.3 autochanger.c
6364 +++--- src/stored/autochanger.c 12 Nov 2005 17:30:53 -0000      1.47.2.3
6365 ++++++ src/stored/autochanger.c 21 Nov 2005 18:19:07 -0000
6366 +++@@ -4,7 +4,7 @@
6367 +++  *
6368 +++  *   Kern Sibbald, August MMII
6369 +++  *                            
6370 +++- *   Version $Id$
6371 ++++ *   Version $Id$
6372 +++  */
6373 +++ /*
6374 +++    Copyright (C) 2002-2005 Kern Sibbald
6375 +++@@ -163,6 +163,7 @@
6376 +++             rtn_stat = -1;            /* hard error */
6377 +++          }
6378 +++          Dmsg2(400, "load slot %d status=%d\n", slot, status);
6379 ++++         unlock_changer(dcr);
6380 +++       } else {
6381 +++          status = 0;                  /* we got what we want */
6382 +++          dev->Slot = slot;            /* set currently loaded slot */
6383 +++@@ -174,7 +175,6 @@
6384 +++    } else {
6385 +++       rtn_stat = 0;                   /* no changer found */
6386 +++    }
6387 +++-   unlock_changer(dcr);
6388 +++    free_pool_memory(changer);
6389 +++    return rtn_stat;
6390 +++ 
6391 +++Index: src/stored/status.c
6392 +++===================================================================
6393 +++RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v
6394 +++retrieving revision 1.44.2.1
6395 +++diff -u -r1.44.2.1 status.c
6396 +++--- src/stored/status.c      6 Oct 2005 07:04:13 -0000       1.44.2.1
6397 ++++++ src/stored/status.c      21 Nov 2005 18:19:08 -0000
6398 +++@@ -264,6 +264,7 @@
6399 +++    bool found = false;
6400 +++    int bps, sec;
6401 +++    JCR *jcr;
6402 ++++   DCR *dcr;
6403 +++    char JobName[MAX_NAME_LENGTH];
6404 +++    char b1[30], b2[30], b3[30];
6405 +++ 
6406 +++@@ -273,7 +274,8 @@
6407 +++          bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"),
6408 +++             job_type_to_str(jcr->JobType), jcr->Job);
6409 +++       }
6410 +++-      if (jcr->dcr && jcr->dcr->device) {
6411 ++++      dcr = jcr->dcr;
6412 ++++      if (dcr && dcr->device) {
6413 +++          bstrncpy(JobName, jcr->Job, sizeof(JobName));
6414 +++          /* There are three periods after the Job name */
6415 +++          char *p;
6416 +++@@ -282,13 +284,16 @@
6417 +++                *p = 0;
6418 +++             }
6419 +++          }
6420 +++-         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"),
6421 ++++         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n"
6422 ++++                            "    pool=\"%s\" device=\"%s\"\n"),
6423 +++                    job_level_to_str(jcr->JobLevel),
6424 +++                    job_type_to_str(jcr->JobType),
6425 +++                    JobName,
6426 +++                    jcr->JobId,
6427 +++-                   jcr->dcr->VolumeName,
6428 +++-                   jcr->dcr->device->device_name);
6429 ++++                   dcr->VolumeName,
6430 ++++                   dcr->pool_name,
6431 ++++                   dcr->dev?dcr->dev->print_name(): 
6432 ++++                            dcr->device->device_name);
6433 +++          sec = time(NULL) - jcr->run_time;
6434 +++          if (sec <= 0) {
6435 +++             sec = 1;
6436 +++Index: src/stored/stored_conf.c
6437 +++===================================================================
6438 +++RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v
6439 +++retrieving revision 1.76
6440 +++diff -u -r1.76 stored_conf.c
6441 +++--- src/stored/stored_conf.c 9 Sep 2005 09:40:04 -0000       1.76
6442 ++++++ src/stored/stored_conf.c 21 Nov 2005 18:19:08 -0000
6443 +++@@ -222,16 +222,16 @@
6444 +++          res->res_dev.hdr.name,
6445 +++          res->res_dev.media_type, res->res_dev.device_name,
6446 +++          res->res_dev.label_type);
6447 +++-      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d\n",
6448 ++++      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n",
6449 +++          res->res_dev.max_rewind_wait, res->res_dev.min_block_size,
6450 +++-         res->res_dev.max_block_size);
6451 ++++         res->res_dev.max_block_size, res->res_dev.max_changer_wait);
6452 +++       sendit(sock, "        max_jobs=%d max_files=%" lld " max_size=%" lld "\n",
6453 +++          res->res_dev.max_volume_jobs, res->res_dev.max_volume_files,
6454 +++          res->res_dev.max_volume_size);
6455 +++       sendit(sock, "        max_file_size=%" lld " capacity=%" lld "\n",
6456 +++          res->res_dev.max_file_size, res->res_dev.volume_capacity);
6457 +++-      sendit(sock, "         spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
6458 +++-      sendit(sock, "         max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
6459 ++++      sendit(sock, "        spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
6460 ++++      sendit(sock, "        max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
6461 +++          res->res_dev.max_spool_size, res->res_dev.max_job_spool_size);
6462 +++       if (res->res_dev.changer_res) {
6463 +++          sendit(sock, "         changer=%p\n", res->res_dev.changer_res);
6464 +++Index: src/tray-monitor/tray-monitor.c
6465 +++===================================================================
6466 +++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v
6467 +++retrieving revision 1.25.2.1
6468 +++diff -u -r1.25.2.1 tray-monitor.c
6469 +++--- src/tray-monitor/tray-monitor.c  1 Oct 2005 10:20:18 -0000       1.25.2.1
6470 ++++++ src/tray-monitor/tray-monitor.c  21 Nov 2005 18:19:08 -0000
6471 +++@@ -4,7 +4,7 @@
6472 +++  *
6473 +++  *     Nicolas Boichat, August MMIV
6474 +++  *
6475 +++- *     Version $Id$
6476 ++++ *     Version $Id$
6477 +++  */
6478 +++ 
6479 +++ /*
6480 +++@@ -881,7 +881,7 @@
6481 +++       }
6482 +++ 
6483 +++       if (item->D_sock == NULL) {
6484 +++-         g_slist_append(*list, (void *)_("Cannot connect to daemon.\n"));
6485 ++++         g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n")));
6486 +++          changeStatusMessage(item, _("Cannot connect to daemon."));
6487 +++          item->state = error;
6488 +++          item->oldstate = error;
6489 ++Index: patches/patches-1.38.0
6490 ++===================================================================
6491 ++RCS file: patches/patches-1.38.0
6492 ++diff -N patches/patches-1.38.0
6493 ++Index: patches/patches-1.38.1
6494 ++===================================================================
6495 ++RCS file: patches/patches-1.38.1
6496 ++diff -N patches/patches-1.38.1
6497 ++--- /dev/null 1 Jan 1970 00:00:00 -0000
6498 +++++ patches/patches-1.38.1    22 Nov 2005 10:42:22 -0000
6499 ++@@ -0,0 +1,14 @@
6500 +++20Nov05 1.38.1-to-1.38.2.patch
6501 +++ This patch fixes the following bugs:
6502 +++
6503 +++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
6504 +++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
6505 +++  says this patch does not fix his problem)
6506 +++- Fix cancel failure bug. Bug #481
6507 +++- Fix failure when Pool name has spaces. Bug #487
6508 +++- Fix SD crash in autochanger code. Mutex failure. Bug #488
6509 +++- Fix a couple of free()s in src/filed/acl.c
6510 +++- Fix memory overrun in bfile.c in building OS X resource
6511 +++  fork filename. Bug #489
6512 +++                         
6513 +++  
6514 ++Index: src/version.h
6515 ++===================================================================
6516 ++RCS file: /cvsroot/bacula/bacula/src/version.h,v
6517 ++retrieving revision 1.554.2.14
6518 ++diff -u -r1.554.2.14 version.h
6519 ++--- src/version.h     14 Nov 2005 14:21:58 -0000      1.554.2.14
6520 +++++ src/version.h     22 Nov 2005 10:42:22 -0000
6521 ++@@ -3,9 +3,9 @@
6522 ++  */
6523 ++ 
6524 ++ #undef  VERSION
6525 ++-#define VERSION "1.38.1"
6526 ++-#define BDATE   "14 November 2005"
6527 ++-#define LSMDATE "14Nov05"
6528 +++#define VERSION "1.38.2"
6529 +++#define BDATE   "20 November 2005"
6530 +++#define LSMDATE "20Nov05"
6531 ++ 
6532 ++ /* Debug flags */
6533 ++ #undef  DEBUG
6534 ++Index: src/dird/catreq.c
6535 ++===================================================================
6536 ++RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v
6537 ++retrieving revision 1.77.2.1
6538 ++diff -u -r1.77.2.1 catreq.c
6539 ++--- src/dird/catreq.c 26 Oct 2005 14:02:04 -0000      1.77.2.1
6540 +++++ src/dird/catreq.c 22 Nov 2005 10:42:22 -0000
6541 ++@@ -10,7 +10,7 @@
6542 ++  *  Basic tasks done here:
6543 ++  *      Handle Catalog services.
6544 ++  *
6545 ++- *   Version $Id$
6546 +++ *   Version $Id$
6547 ++  */
6548 ++ /*
6549 ++    Copyright (C) 2001-2005 Kern Sibbald
6550 ++@@ -117,6 +117,7 @@
6551 ++    if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) {
6552 ++       memset(&pr, 0, sizeof(pr));
6553 ++       bstrncpy(pr.Name, pool_name, sizeof(pr.Name));
6554 +++      unbash_spaces(pr.Name);
6555 ++       ok = db_get_pool_record(jcr, jcr->db, &pr);
6556 ++       if (ok) {
6557 ++          mr.PoolId = pr.PoolId;
6558 ++Index: src/dird/ua_restore.c
6559 ++===================================================================
6560 ++RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v
6561 ++retrieving revision 1.101.2.1
6562 ++diff -u -r1.101.2.1 ua_restore.c
6563 ++--- src/dird/ua_restore.c     26 Oct 2005 14:02:04 -0000      1.101.2.1
6564 +++++ src/dird/ua_restore.c     22 Nov 2005 10:42:23 -0000
6565 ++@@ -10,7 +10,7 @@
6566 ++  *
6567 ++  *     Kern Sibbald, July MMII
6568 ++  *
6569 ++- *   Version $Id$
6570 +++ *   Version $Id$
6571 ++  */
6572 ++ /*
6573 ++    Copyright (C) 2002-2005 Kern Sibbald
6574 ++@@ -409,7 +409,7 @@
6575 ++       }
6576 ++       done = true;
6577 ++       switch (do_prompt(ua, "", _("Select item: "), NULL, 0)) {
6578 ++-      case -1:                        /* error */
6579 +++      case -1:                        /* error or cancel */
6580 ++          return 0;
6581 ++       case 0:                         /* list last 20 Jobs run */
6582 ++          gui_save = ua->jcr->gui;
6583 ++Index: src/dird/ua_run.c
6584 ++===================================================================
6585 ++RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v
6586 ++retrieving revision 1.71
6587 ++diff -u -r1.71 ua_run.c
6588 ++--- src/dird/ua_run.c 10 Aug 2005 16:35:19 -0000      1.71
6589 +++++ src/dird/ua_run.c 22 Nov 2005 10:42:23 -0000
6590 ++@@ -851,6 +851,8 @@
6591 ++             bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
6592 ++          }
6593 ++          goto try_again;
6594 +++      case -1:                        /* error or cancel */
6595 +++         goto bail_out;
6596 ++       default:
6597 ++          goto try_again;
6598 ++       }
6599 ++Index: src/dird/ua_select.c
6600 ++===================================================================
6601 ++RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v
6602 ++retrieving revision 1.65.2.1
6603 ++diff -u -r1.65.2.1 ua_select.c
6604 ++--- src/dird/ua_select.c      12 Nov 2005 17:30:52 -0000      1.65.2.1
6605 +++++ src/dird/ua_select.c      22 Nov 2005 10:42:23 -0000
6606 ++@@ -4,7 +4,7 @@
6607 ++  *
6608 ++  *     Kern Sibbald, October MMI
6609 ++  *
6610 ++- *   Version  $Id$
6611 +++ *   Version  $Id$
6612 ++  */
6613 ++ /*
6614 ++    Copyright (C) 2001-2005 Kern Sibbald
6615 ++@@ -149,7 +149,9 @@
6616 ++       }
6617 ++    }
6618 ++    UnlockRes();
6619 ++-   do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name));
6620 +++   if (do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name)) < 0) {
6621 +++      return NULL;
6622 +++   }
6623 ++    store = (STORE *)GetResWithName(R_STORAGE, name);
6624 ++    return store;
6625 ++ }
6626 ++@@ -170,7 +172,9 @@
6627 ++       }
6628 ++    }
6629 ++    UnlockRes();
6630 ++-   do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name));
6631 +++   if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) {
6632 +++      return NULL;
6633 +++   }
6634 ++    fs = (FILESET *)GetResWithName(R_FILESET, name);
6635 ++    return fs;
6636 ++ }
6637 ++@@ -202,7 +206,9 @@
6638 ++          }
6639 ++       }
6640 ++       UnlockRes();
6641 ++-      do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name));
6642 +++      if (do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name)) < 0) {
6643 +++         return NULL;
6644 +++      }
6645 ++       catalog = (CAT *)GetResWithName(R_CATALOG, name);
6646 ++    }
6647 ++    return catalog;
6648 ++@@ -225,7 +231,9 @@
6649 ++       }
6650 ++    }
6651 ++    UnlockRes();
6652 ++-   do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name));
6653 +++   if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) {
6654 +++      return NULL;
6655 +++   }
6656 ++    job = (JOB *)GetResWithName(R_JOB, name);
6657 ++    return job;
6658 ++ }
6659 ++@@ -246,7 +254,9 @@
6660 ++       }
6661 ++    }
6662 ++    UnlockRes();
6663 ++-   do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name));
6664 +++   if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) {
6665 +++      return NULL;
6666 +++   }
6667 ++    job = (JOB *)GetResWithName(R_JOB, name);
6668 ++    return job;
6669 ++ }
6670 ++@@ -269,7 +279,9 @@
6671 ++       }
6672 ++    }
6673 ++    UnlockRes();
6674 ++-   do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name));
6675 +++   if (do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) {
6676 +++      return NULL;
6677 +++   }
6678 ++    client = (CLIENT *)GetResWithName(R_CLIENT, name);
6679 ++    return client;
6680 ++ }
6681 ++@@ -551,7 +563,9 @@
6682 ++       }
6683 ++    }
6684 ++    UnlockRes();
6685 ++-   do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name));
6686 +++   if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) {
6687 +++      return NULL;
6688 +++   }
6689 ++    pool = (POOL *)GetResWithName(R_POOL, name);
6690 ++    return pool;
6691 ++ }
6692 ++@@ -673,12 +687,16 @@
6693 ++  *  Returns: -1 on error
6694 ++  *            index base 0 on success, and choice
6695 ++  *               is copied to prompt if not NULL
6696 +++ *             prompt is set to the chosen prompt item string
6697 ++  */
6698 ++ int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
6699 ++ {
6700 ++    int i, item;
6701 ++    char pmsg[MAXSTRING];
6702 ++ 
6703 +++   if (prompt) {
6704 +++      *prompt = 0;
6705 +++   }
6706 ++    if (ua->num_prompts == 2) {
6707 ++       item = 1;
6708 ++       if (prompt) {
6709 ++@@ -698,15 +716,11 @@
6710 ++       bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
6711 ++    }
6712 ++ 
6713 ++-   if (prompt) {
6714 ++-      *prompt = 0;
6715 ++-   }
6716 ++-
6717 ++    for ( ;; ) {
6718 ++       /* First item is the prompt string, not the items */
6719 ++       if (ua->num_prompts == 1) {
6720 ++          bsendmsg(ua, _("Selection is empty!\n"));
6721 ++-         item = 0;                    /* list is empty ! */
6722 +++         item = -1;                    /* list is empty ! */
6723 ++          break;
6724 ++       }
6725 ++       if (ua->num_prompts == 2) {
6726 ++@@ -741,7 +755,7 @@
6727 ++       free(ua->prompt[i]);
6728 ++    }
6729 ++    ua->num_prompts = 0;
6730 ++-   return item - 1;
6731 +++   return item>0 ? item-1 : item;
6732 ++ }
6733 ++ 
6734 ++ 
6735 ++Index: src/dird/ua_update.c
6736 ++===================================================================
6737 ++RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v
6738 ++retrieving revision 1.7
6739 ++diff -u -r1.7 ua_update.c
6740 ++--- src/dird/ua_update.c      28 Aug 2005 12:22:02 -0000      1.7
6741 +++++ src/dird/ua_update.c      22 Nov 2005 10:42:23 -0000
6742 ++@@ -590,7 +590,7 @@
6743 ++          update_all_vols_from_pool(ua);
6744 ++          return 1;
6745 ++       default:                        /* Done or error */
6746 ++-         bsendmsg(ua, _("Selection done.\n"));
6747 +++         bsendmsg(ua, _("Selection terminated.\n"));
6748 ++          return 1;
6749 ++       }
6750 ++    }
6751 ++Index: src/filed/acl.c
6752 ++===================================================================
6753 ++RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v
6754 ++retrieving revision 1.10.2.1
6755 ++diff -u -r1.10.2.1 acl.c
6756 ++--- src/filed/acl.c   14 Nov 2005 20:20:38 -0000      1.10.2.1
6757 +++++ src/filed/acl.c   22 Nov 2005 10:42:23 -0000
6758 ++@@ -26,7 +26,7 @@
6759 ++  *
6760 ++  *   Written by Preben 'Peppe' Guldberg, December MMIV
6761 ++  *
6762 ++- *   Version $Id$
6763 +++ *   Version $Id$
6764 ++  */
6765 ++ /*
6766 ++    Copyright (C) 2004-2005 Kern Sibbald
6767 ++@@ -140,7 +140,7 @@
6768 ++ 
6769 ++    if ((acl_text = acl_get(jcr->last_fname)) != NULL) {
6770 ++       len = pm_strcpy(jcr->acl_text, acl_text);
6771 ++-      free(acl_text);
6772 +++      actuallyfree(acl_text);
6773 ++       return len;
6774 ++    }
6775 ++    return -1;
6776 ++@@ -270,7 +270,7 @@
6777 ++    if ((n = getacl(jcr->last_fname, n, acls)) > 0) {
6778 ++       if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) {
6779 ++          len = pm_strcpy(jcr->acl_text, acl_text);
6780 ++-         free(acl_text);
6781 +++         actuallyfree(acl_text);
6782 ++          return len;
6783 ++       }
6784 ++    }
6785 ++Index: src/findlib/bfile.c
6786 ++===================================================================
6787 ++RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v
6788 ++retrieving revision 1.40
6789 ++diff -u -r1.40 bfile.c
6790 ++--- src/findlib/bfile.c       10 Aug 2005 16:35:19 -0000      1.40
6791 +++++ src/findlib/bfile.c       22 Nov 2005 10:42:24 -0000
6792 ++@@ -623,13 +623,10 @@
6793 ++ int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
6794 ++ {
6795 ++    POOLMEM *rsrc_fname;
6796 ++-   size_t fname_len;
6797 ++ 
6798 ++-   fname_len = strlen(fname);
6799 ++    rsrc_fname = get_pool_memory(PM_FNAME);
6800 ++-   bstrncpy(rsrc_fname, fname, fname_len + 1);
6801 ++-   bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC,
6802 ++-      strlen(_PATH_RSRCFORKSPEC) + 1);
6803 +++   pm_strcpy(rsrc_fname, fname);
6804 +++   pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC);
6805 ++    bopen(bfd, rsrc_fname, flags, mode);
6806 ++    free_pool_memory(rsrc_fname);
6807 ++    return bfd->fid;
6808 ++Index: src/lib/bnet_server.c
6809 ++===================================================================
6810 ++RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v
6811 ++retrieving revision 1.39
6812 ++diff -u -r1.39 bnet_server.c
6813 ++--- src/lib/bnet_server.c     18 Aug 2005 15:37:40 -0000      1.39
6814 +++++ src/lib/bnet_server.c     22 Nov 2005 10:42:24 -0000
6815 ++@@ -153,7 +153,6 @@
6816 ++          /* Error, get out */
6817 ++          foreach_dlist(fd_ptr, &sockfds) {
6818 ++             close(fd_ptr->fd);
6819 ++-            free((void *)fd_ptr);
6820 ++          }
6821 ++          Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror());
6822 ++          break;
6823 ++Index: src/stored/autochanger.c
6824 ++===================================================================
6825 ++RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
6826 ++retrieving revision 1.47.2.3
6827 ++diff -u -r1.47.2.3 autochanger.c
6828 ++--- src/stored/autochanger.c  12 Nov 2005 17:30:53 -0000      1.47.2.3
6829 +++++ src/stored/autochanger.c  22 Nov 2005 10:42:24 -0000
6830 ++@@ -4,7 +4,7 @@
6831 ++  *
6832 ++  *   Kern Sibbald, August MMII
6833 ++  *                            
6834 ++- *   Version $Id$
6835 +++ *   Version $Id$
6836 ++  */
6837 ++ /*
6838 ++    Copyright (C) 2002-2005 Kern Sibbald
6839 ++@@ -163,6 +163,7 @@
6840 ++             rtn_stat = -1;            /* hard error */
6841 ++          }
6842 ++          Dmsg2(400, "load slot %d status=%d\n", slot, status);
6843 +++         unlock_changer(dcr);
6844 ++       } else {
6845 ++          status = 0;                  /* we got what we want */
6846 ++          dev->Slot = slot;            /* set currently loaded slot */
6847 ++@@ -174,7 +175,6 @@
6848 ++    } else {
6849 ++       rtn_stat = 0;                   /* no changer found */
6850 ++    }
6851 ++-   unlock_changer(dcr);
6852 ++    free_pool_memory(changer);
6853 ++    return rtn_stat;
6854 ++ 
6855 ++Index: src/stored/status.c
6856 ++===================================================================
6857 ++RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v
6858 ++retrieving revision 1.44.2.1
6859 ++diff -u -r1.44.2.1 status.c
6860 ++--- src/stored/status.c       6 Oct 2005 07:04:13 -0000       1.44.2.1
6861 +++++ src/stored/status.c       22 Nov 2005 10:42:24 -0000
6862 ++@@ -264,6 +264,7 @@
6863 ++    bool found = false;
6864 ++    int bps, sec;
6865 ++    JCR *jcr;
6866 +++   DCR *dcr;
6867 ++    char JobName[MAX_NAME_LENGTH];
6868 ++    char b1[30], b2[30], b3[30];
6869 ++ 
6870 ++@@ -273,7 +274,8 @@
6871 ++          bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"),
6872 ++             job_type_to_str(jcr->JobType), jcr->Job);
6873 ++       }
6874 ++-      if (jcr->dcr && jcr->dcr->device) {
6875 +++      dcr = jcr->dcr;
6876 +++      if (dcr && dcr->device) {
6877 ++          bstrncpy(JobName, jcr->Job, sizeof(JobName));
6878 ++          /* There are three periods after the Job name */
6879 ++          char *p;
6880 ++@@ -282,13 +284,16 @@
6881 ++                *p = 0;
6882 ++             }
6883 ++          }
6884 ++-         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"),
6885 +++         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n"
6886 +++                            "    pool=\"%s\" device=\"%s\"\n"),
6887 ++                    job_level_to_str(jcr->JobLevel),
6888 ++                    job_type_to_str(jcr->JobType),
6889 ++                    JobName,
6890 ++                    jcr->JobId,
6891 ++-                   jcr->dcr->VolumeName,
6892 ++-                   jcr->dcr->device->device_name);
6893 +++                   dcr->VolumeName,
6894 +++                   dcr->pool_name,
6895 +++                   dcr->dev?dcr->dev->print_name(): 
6896 +++                            dcr->device->device_name);
6897 ++          sec = time(NULL) - jcr->run_time;
6898 ++          if (sec <= 0) {
6899 ++             sec = 1;
6900 ++Index: src/stored/stored_conf.c
6901 ++===================================================================
6902 ++RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v
6903 ++retrieving revision 1.76
6904 ++diff -u -r1.76 stored_conf.c
6905 ++--- src/stored/stored_conf.c  9 Sep 2005 09:40:04 -0000       1.76
6906 +++++ src/stored/stored_conf.c  22 Nov 2005 10:42:24 -0000
6907 ++@@ -222,16 +222,16 @@
6908 ++          res->res_dev.hdr.name,
6909 ++          res->res_dev.media_type, res->res_dev.device_name,
6910 ++          res->res_dev.label_type);
6911 ++-      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d\n",
6912 +++      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n",
6913 ++          res->res_dev.max_rewind_wait, res->res_dev.min_block_size,
6914 ++-         res->res_dev.max_block_size);
6915 +++         res->res_dev.max_block_size, res->res_dev.max_changer_wait);
6916 ++       sendit(sock, "        max_jobs=%d max_files=%" lld " max_size=%" lld "\n",
6917 ++          res->res_dev.max_volume_jobs, res->res_dev.max_volume_files,
6918 ++          res->res_dev.max_volume_size);
6919 ++       sendit(sock, "        max_file_size=%" lld " capacity=%" lld "\n",
6920 ++          res->res_dev.max_file_size, res->res_dev.volume_capacity);
6921 ++-      sendit(sock, "         spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
6922 ++-      sendit(sock, "         max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
6923 +++      sendit(sock, "        spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
6924 +++      sendit(sock, "        max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
6925 ++          res->res_dev.max_spool_size, res->res_dev.max_job_spool_size);
6926 ++       if (res->res_dev.changer_res) {
6927 ++          sendit(sock, "         changer=%p\n", res->res_dev.changer_res);
6928 ++Index: src/tray-monitor/tray-monitor.c
6929 ++===================================================================
6930 ++RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v
6931 ++retrieving revision 1.25.2.1
6932 ++diff -u -r1.25.2.1 tray-monitor.c
6933 ++--- src/tray-monitor/tray-monitor.c   1 Oct 2005 10:20:18 -0000       1.25.2.1
6934 +++++ src/tray-monitor/tray-monitor.c   22 Nov 2005 10:42:24 -0000
6935 ++@@ -4,7 +4,7 @@
6936 ++  *
6937 ++  *     Nicolas Boichat, August MMIV
6938 ++  *
6939 ++- *     Version $Id$
6940 +++ *     Version $Id$
6941 ++  */
6942 ++ 
6943 ++ /*
6944 ++@@ -881,7 +881,7 @@
6945 ++       }
6946 ++ 
6947 ++       if (item->D_sock == NULL) {
6948 ++-         g_slist_append(*list, (void *)_("Cannot connect to daemon.\n"));
6949 +++         g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n")));
6950 ++          changeStatusMessage(item, _("Cannot connect to daemon."));
6951 ++          item->state = error;
6952 ++          item->oldstate = error;
6953 ++Index: updatedb/kes-1.38
6954 ++===================================================================
6955 ++RCS file: updatedb/kes-1.38
6956 ++diff -N updatedb/kes-1.38
6957 ++--- updatedb/kes-1.38 3 Nov 2005 14:54:28 -0000       1.1.2.1
6958 +++++ /dev/null 1 Jan 1970 00:00:00 -0000
6959 ++@@ -1,19 +0,0 @@
6960 ++-              Technical notes on version 1.38  
6961 ++-                        Kern Sibbald
6962 ++-
6963 ++-General:
6964 ++-
6965 ++-Changes to 1.38.0:
6966 ++-- Modify configure.in to add execute option to sqlite3 catalog  
6967 ++-  scripts.
6968 ++-- Create update_xxx_table_8_to_9 scripts for updatedb
6969 ++-- Fix wrong variable in bpipe.c debug output reported by user.
6970 ++-- Fix improper placement of encode_and_send_attributes() in
6971 ++-  FD backup.c causing first file of non-portable Win32 backup
6972 ++-  to have wrong stream. Reported by Thorsten.
6973 ++-- Move the -lcrypt for PostgreSQL after the PostgreSQL libs in
6974 ++-  autoconf/bacula-macros/db.m4 as suggested by user.  Fixes bug #457.
6975 ++-- Remove @STATIC_CONS@ from tray-monitor Makefile as suggested
6976 ++-  by user. Fixes bug #456.
6977 ++-
6978 ++-Released 1.38.0 (28Oct05): 31 October 2005
6979 +Index: patches/patches-1.38.0
6980 +===================================================================
6981 +RCS file: patches/patches-1.38.0
6982 +diff -N patches/patches-1.38.0
6983 +Index: patches/patches-1.38.1
6984 +===================================================================
6985 +RCS file: patches/patches-1.38.1
6986 +diff -N patches/patches-1.38.1
6987 +--- /dev/null  1 Jan 1970 00:00:00 -0000
6988 ++++ patches/patches-1.38.1     22 Nov 2005 10:50:55 -0000      1.1.2.2
6989 +@@ -0,0 +1,14 @@
6990 ++20Nov05 1.38.1-to-1.38.2.patch
6991 ++ This patch fixes the following bugs:
6992 ++
6993 ++- Fix crash in tray-monitor when daemon disconnects. Bug #479.
6994 ++- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
6995 ++  says this patch does not fix his problem)
6996 ++- Fix cancel failure bug. Bug #481
6997 ++- Fix failure when Pool name has spaces. Bug #487
6998 ++- Fix SD crash in autochanger code. Mutex failure. Bug #488
6999 ++- Fix a couple of free()s in src/filed/acl.c
7000 ++- Fix memory overrun in bfile.c in building OS X resource
7001 ++  fork filename. Bug #489
7002 ++                         
7003 ++  
7004 +Index: src/version.h
7005 +===================================================================
7006 +RCS file: /cvsroot/bacula/bacula/src/version.h,v
7007 +retrieving revision 1.554.2.14
7008 +retrieving revision 1.554.2.15
7009 +diff -u -r1.554.2.14 -r1.554.2.15
7010 +--- src/version.h      14 Nov 2005 14:21:58 -0000      1.554.2.14
7011 ++++ src/version.h      22 Nov 2005 10:50:55 -0000      1.554.2.15
7012 +@@ -1,11 +1,11 @@
7013 + /*
7014 +- *  Version $Id$
7015 ++ *  Version $Id$
7016 +  */
7017
7018 + #undef  VERSION
7019 +-#define VERSION "1.38.1"
7020 +-#define BDATE   "14 November 2005"
7021 +-#define LSMDATE "14Nov05"
7022 ++#define VERSION "1.38.2"
7023 ++#define BDATE   "20 November 2005"
7024 ++#define LSMDATE "20Nov05"
7025
7026 + /* Debug flags */
7027 + #undef  DEBUG
7028 +Index: src/dird/catreq.c
7029 +===================================================================
7030 +RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v
7031 +retrieving revision 1.77.2.1
7032 +retrieving revision 1.77.2.2
7033 +diff -u -r1.77.2.1 -r1.77.2.2
7034 +--- src/dird/catreq.c  26 Oct 2005 14:02:04 -0000      1.77.2.1
7035 ++++ src/dird/catreq.c  22 Nov 2005 10:50:55 -0000      1.77.2.2
7036 +@@ -10,7 +10,7 @@
7037 +  *  Basic tasks done here:
7038 +  *      Handle Catalog services.
7039 +  *
7040 +- *   Version $Id$
7041 ++ *   Version $Id$
7042 +  */
7043 + /*
7044 +    Copyright (C) 2001-2005 Kern Sibbald
7045 +@@ -117,6 +117,7 @@
7046 +    if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) {
7047 +       memset(&pr, 0, sizeof(pr));
7048 +       bstrncpy(pr.Name, pool_name, sizeof(pr.Name));
7049 ++      unbash_spaces(pr.Name);
7050 +       ok = db_get_pool_record(jcr, jcr->db, &pr);
7051 +       if (ok) {
7052 +          mr.PoolId = pr.PoolId;
7053 +Index: src/dird/ua_restore.c
7054 +===================================================================
7055 +RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v
7056 +retrieving revision 1.101.2.1
7057 +retrieving revision 1.101.2.2
7058 +diff -u -r1.101.2.1 -r1.101.2.2
7059 +--- src/dird/ua_restore.c      26 Oct 2005 14:02:04 -0000      1.101.2.1
7060 ++++ src/dird/ua_restore.c      22 Nov 2005 10:50:55 -0000      1.101.2.2
7061 +@@ -10,7 +10,7 @@
7062 +  *
7063 +  *     Kern Sibbald, July MMII
7064 +  *
7065 +- *   Version $Id$
7066 ++ *   Version $Id$
7067 +  */
7068 + /*
7069 +    Copyright (C) 2002-2005 Kern Sibbald
7070 +@@ -409,7 +409,7 @@
7071 +       }
7072 +       done = true;
7073 +       switch (do_prompt(ua, "", _("Select item: "), NULL, 0)) {
7074 +-      case -1:                        /* error */
7075 ++      case -1:                        /* error or cancel */
7076 +          return 0;
7077 +       case 0:                         /* list last 20 Jobs run */
7078 +          gui_save = ua->jcr->gui;
7079 +Index: src/dird/ua_run.c
7080 +===================================================================
7081 +RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v
7082 +retrieving revision 1.71
7083 +retrieving revision 1.71.2.1
7084 +diff -u -r1.71 -r1.71.2.1
7085 +--- src/dird/ua_run.c  10 Aug 2005 16:35:19 -0000      1.71
7086 ++++ src/dird/ua_run.c  22 Nov 2005 10:50:55 -0000      1.71.2.1
7087 +@@ -4,7 +4,7 @@
7088 +  *
7089 +  *     Kern Sibbald, December MMI
7090 +  *
7091 +- *   Version $Id$
7092 ++ *   Version $Id$
7093 +  */
7094 + /*
7095 +    Copyright (C) 2001-2005 Kern Sibbald
7096 +@@ -851,6 +851,8 @@
7097 +             bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
7098 +          }
7099 +          goto try_again;
7100 ++      case -1:                        /* error or cancel */
7101 ++         goto bail_out;
7102 +       default:
7103 +          goto try_again;
7104 +       }
7105 +Index: src/dird/ua_select.c
7106 +===================================================================
7107 +RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v
7108 +retrieving revision 1.65.2.1
7109 +retrieving revision 1.65.2.2
7110 +diff -u -r1.65.2.1 -r1.65.2.2
7111 +--- src/dird/ua_select.c       12 Nov 2005 17:30:52 -0000      1.65.2.1
7112 ++++ src/dird/ua_select.c       22 Nov 2005 10:50:55 -0000      1.65.2.2
7113 +@@ -4,7 +4,7 @@
7114 +  *
7115 +  *     Kern Sibbald, October MMI
7116 +  *
7117 +- *   Version  $Id$
7118 ++ *   Version  $Id$
7119 +  */
7120 + /*
7121 +    Copyright (C) 2001-2005 Kern Sibbald
7122 +@@ -149,7 +149,9 @@
7123 +       }
7124 +    }
7125 +    UnlockRes();
7126 +-   do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name));
7127 ++   if (do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name)) < 0) {
7128 ++      return NULL;
7129 ++   }
7130 +    store = (STORE *)GetResWithName(R_STORAGE, name);
7131 +    return store;
7132 + }
7133 +@@ -170,7 +172,9 @@
7134 +       }
7135 +    }
7136 +    UnlockRes();
7137 +-   do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name));
7138 ++   if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) {
7139 ++      return NULL;
7140 ++   }
7141 +    fs = (FILESET *)GetResWithName(R_FILESET, name);
7142 +    return fs;
7143 + }
7144 +@@ -202,7 +206,9 @@
7145 +          }
7146 +       }
7147 +       UnlockRes();
7148 +-      do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name));
7149 ++      if (do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name)) < 0) {
7150 ++         return NULL;
7151 ++      }
7152 +       catalog = (CAT *)GetResWithName(R_CATALOG, name);
7153 +    }
7154 +    return catalog;
7155 +@@ -225,7 +231,9 @@
7156 +       }
7157 +    }
7158 +    UnlockRes();
7159 +-   do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name));
7160 ++   if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) {
7161 ++      return NULL;
7162 ++   }
7163 +    job = (JOB *)GetResWithName(R_JOB, name);
7164 +    return job;
7165 + }
7166 +@@ -246,7 +254,9 @@
7167 +       }
7168 +    }
7169 +    UnlockRes();
7170 +-   do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name));
7171 ++   if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) {
7172 ++      return NULL;
7173 ++   }
7174 +    job = (JOB *)GetResWithName(R_JOB, name);
7175 +    return job;
7176 + }
7177 +@@ -269,7 +279,9 @@
7178 +       }
7179 +    }
7180 +    UnlockRes();
7181 +-   do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name));
7182 ++   if (do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) {
7183 ++      return NULL;
7184 ++   }
7185 +    client = (CLIENT *)GetResWithName(R_CLIENT, name);
7186 +    return client;
7187 + }
7188 +@@ -551,7 +563,9 @@
7189 +       }
7190 +    }
7191 +    UnlockRes();
7192 +-   do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name));
7193 ++   if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) {
7194 ++      return NULL;
7195 ++   }
7196 +    pool = (POOL *)GetResWithName(R_POOL, name);
7197 +    return pool;
7198 + }
7199 +@@ -673,12 +687,16 @@
7200 +  *  Returns: -1 on error
7201 +  *            index base 0 on success, and choice
7202 +  *               is copied to prompt if not NULL
7203 ++ *             prompt is set to the chosen prompt item string
7204 +  */
7205 + int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
7206 + {
7207 +    int i, item;
7208 +    char pmsg[MAXSTRING];
7209
7210 ++   if (prompt) {
7211 ++      *prompt = 0;
7212 ++   }
7213 +    if (ua->num_prompts == 2) {
7214 +       item = 1;
7215 +       if (prompt) {
7216 +@@ -698,15 +716,11 @@
7217 +       bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
7218 +    }
7219
7220 +-   if (prompt) {
7221 +-      *prompt = 0;
7222 +-   }
7223 +-
7224 +    for ( ;; ) {
7225 +       /* First item is the prompt string, not the items */
7226 +       if (ua->num_prompts == 1) {
7227 +          bsendmsg(ua, _("Selection is empty!\n"));
7228 +-         item = 0;                    /* list is empty ! */
7229 ++         item = -1;                    /* list is empty ! */
7230 +          break;
7231 +       }
7232 +       if (ua->num_prompts == 2) {
7233 +@@ -741,7 +755,7 @@
7234 +       free(ua->prompt[i]);
7235 +    }
7236 +    ua->num_prompts = 0;
7237 +-   return item - 1;
7238 ++   return item>0 ? item-1 : item;
7239 + }
7240
7241
7242 +Index: src/dird/ua_update.c
7243 +===================================================================
7244 +RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v
7245 +retrieving revision 1.7
7246 +retrieving revision 1.7.2.1
7247 +diff -u -r1.7 -r1.7.2.1
7248 +--- src/dird/ua_update.c       28 Aug 2005 12:22:02 -0000      1.7
7249 ++++ src/dird/ua_update.c       22 Nov 2005 10:50:55 -0000      1.7.2.1
7250 +@@ -5,7 +5,7 @@
7251 +  *
7252 +  *     Kern Sibbald, September MM
7253 +  *
7254 +- *   Version $Id$
7255 ++ *   Version $Id$
7256 +  */
7257 + /*
7258 +    Copyright (C) 2000-2005 Kern Sibbald
7259 +@@ -590,7 +590,7 @@
7260 +          update_all_vols_from_pool(ua);
7261 +          return 1;
7262 +       default:                        /* Done or error */
7263 +-         bsendmsg(ua, _("Selection done.\n"));
7264 ++         bsendmsg(ua, _("Selection terminated.\n"));
7265 +          return 1;
7266 +       }
7267 +    }
7268 +Index: src/filed/acl.c
7269 +===================================================================
7270 +RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v
7271 +retrieving revision 1.10.2.1
7272 +retrieving revision 1.10.2.2
7273 +diff -u -r1.10.2.1 -r1.10.2.2
7274 +--- src/filed/acl.c    14 Nov 2005 20:20:38 -0000      1.10.2.1
7275 ++++ src/filed/acl.c    22 Nov 2005 10:50:55 -0000      1.10.2.2
7276 +@@ -26,7 +26,7 @@
7277 +  *
7278 +  *   Written by Preben 'Peppe' Guldberg, December MMIV
7279 +  *
7280 +- *   Version $Id$
7281 ++ *   Version $Id$
7282 +  */
7283 + /*
7284 +    Copyright (C) 2004-2005 Kern Sibbald
7285 +@@ -140,7 +140,7 @@
7286
7287 +    if ((acl_text = acl_get(jcr->last_fname)) != NULL) {
7288 +       len = pm_strcpy(jcr->acl_text, acl_text);
7289 +-      free(acl_text);
7290 ++      actuallyfree(acl_text);
7291 +       return len;
7292 +    }
7293 +    return -1;
7294 +@@ -270,7 +270,7 @@
7295 +    if ((n = getacl(jcr->last_fname, n, acls)) > 0) {
7296 +       if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) {
7297 +          len = pm_strcpy(jcr->acl_text, acl_text);
7298 +-         free(acl_text);
7299 ++         actuallyfree(acl_text);
7300 +          return len;
7301 +       }
7302 +    }
7303 +Index: src/findlib/bfile.c
7304 +===================================================================
7305 +RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v
7306 +retrieving revision 1.40
7307 +retrieving revision 1.40.2.1
7308 +diff -u -r1.40 -r1.40.2.1
7309 +--- src/findlib/bfile.c        10 Aug 2005 16:35:19 -0000      1.40
7310 ++++ src/findlib/bfile.c        22 Nov 2005 10:50:55 -0000      1.40.2.1
7311 +@@ -5,7 +5,7 @@
7312 +  *
7313 +  *    Kern Sibbald, April MMIII
7314 +  *
7315 +- *   Version $Id$
7316 ++ *   Version $Id$
7317 +  *
7318 +  */
7319 + /*
7320 +@@ -623,13 +623,10 @@
7321 + int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
7322 + {
7323 +    POOLMEM *rsrc_fname;
7324 +-   size_t fname_len;
7325
7326 +-   fname_len = strlen(fname);
7327 +    rsrc_fname = get_pool_memory(PM_FNAME);
7328 +-   bstrncpy(rsrc_fname, fname, fname_len + 1);
7329 +-   bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC,
7330 +-      strlen(_PATH_RSRCFORKSPEC) + 1);
7331 ++   pm_strcpy(rsrc_fname, fname);
7332 ++   pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC);
7333 +    bopen(bfd, rsrc_fname, flags, mode);
7334 +    free_pool_memory(rsrc_fname);
7335 +    return bfd->fid;
7336 +Index: src/lib/bnet_server.c
7337 +===================================================================
7338 +RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v
7339 +retrieving revision 1.39
7340 +retrieving revision 1.39.2.1
7341 +diff -u -r1.39 -r1.39.2.1
7342 +--- src/lib/bnet_server.c      18 Aug 2005 15:37:40 -0000      1.39
7343 ++++ src/lib/bnet_server.c      22 Nov 2005 10:50:55 -0000      1.39.2.1
7344 +@@ -16,7 +16,7 @@
7345 +   * Originally written by Kern Sibbald for inclusion in apcupsd,
7346 +   *  but heavily modified for Bacula
7347 +   *
7348 +-  *   Version $Id$
7349 ++  *   Version $Id$
7350 +   */
7351
7352 + #include "bacula.h"
7353 +@@ -153,7 +153,6 @@
7354 +          /* Error, get out */
7355 +          foreach_dlist(fd_ptr, &sockfds) {
7356 +             close(fd_ptr->fd);
7357 +-            free((void *)fd_ptr);
7358 +          }
7359 +          Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror());
7360 +          break;
7361 +Index: src/stored/autochanger.c
7362 +===================================================================
7363 +RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
7364 +retrieving revision 1.47.2.3
7365 +retrieving revision 1.47.2.4
7366 +diff -u -r1.47.2.3 -r1.47.2.4
7367 +--- src/stored/autochanger.c   12 Nov 2005 17:30:53 -0000      1.47.2.3
7368 ++++ src/stored/autochanger.c   22 Nov 2005 10:50:55 -0000      1.47.2.4
7369 +@@ -4,7 +4,7 @@
7370 +  *
7371 +  *   Kern Sibbald, August MMII
7372 +  *                            
7373 +- *   Version $Id$
7374 ++ *   Version $Id$
7375 +  */
7376 + /*
7377 +    Copyright (C) 2002-2005 Kern Sibbald
7378 +@@ -163,6 +163,7 @@
7379 +             rtn_stat = -1;            /* hard error */
7380 +          }
7381 +          Dmsg2(400, "load slot %d status=%d\n", slot, status);
7382 ++         unlock_changer(dcr);
7383 +       } else {
7384 +          status = 0;                  /* we got what we want */
7385 +          dev->Slot = slot;            /* set currently loaded slot */
7386 +@@ -174,7 +175,6 @@
7387 +    } else {
7388 +       rtn_stat = 0;                   /* no changer found */
7389 +    }
7390 +-   unlock_changer(dcr);
7391 +    free_pool_memory(changer);
7392 +    return rtn_stat;
7393
7394 +Index: src/stored/status.c
7395 +===================================================================
7396 +RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v
7397 +retrieving revision 1.44.2.1
7398 +retrieving revision 1.44.2.2
7399 +diff -u -r1.44.2.1 -r1.44.2.2
7400 +--- src/stored/status.c        6 Oct 2005 07:04:13 -0000       1.44.2.1
7401 ++++ src/stored/status.c        22 Nov 2005 10:50:55 -0000      1.44.2.2
7402 +@@ -3,7 +3,7 @@
7403 +  *
7404 +  *     Kern Sibbald, May MMIII
7405 +  *
7406 +- *   Version $Id$
7407 ++ *   Version $Id$
7408 +  *
7409 +  */
7410 + /*
7411 +@@ -264,6 +264,7 @@
7412 +    bool found = false;
7413 +    int bps, sec;
7414 +    JCR *jcr;
7415 ++   DCR *dcr;
7416 +    char JobName[MAX_NAME_LENGTH];
7417 +    char b1[30], b2[30], b3[30];
7418
7419 +@@ -273,7 +274,8 @@
7420 +          bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"),
7421 +             job_type_to_str(jcr->JobType), jcr->Job);
7422 +       }
7423 +-      if (jcr->dcr && jcr->dcr->device) {
7424 ++      dcr = jcr->dcr;
7425 ++      if (dcr && dcr->device) {
7426 +          bstrncpy(JobName, jcr->Job, sizeof(JobName));
7427 +          /* There are three periods after the Job name */
7428 +          char *p;
7429 +@@ -282,13 +284,16 @@
7430 +                *p = 0;
7431 +             }
7432 +          }
7433 +-         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"),
7434 ++         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n"
7435 ++                            "    pool=\"%s\" device=\"%s\"\n"),
7436 +                    job_level_to_str(jcr->JobLevel),
7437 +                    job_type_to_str(jcr->JobType),
7438 +                    JobName,
7439 +                    jcr->JobId,
7440 +-                   jcr->dcr->VolumeName,
7441 +-                   jcr->dcr->device->device_name);
7442 ++                   dcr->VolumeName,
7443 ++                   dcr->pool_name,
7444 ++                   dcr->dev?dcr->dev->print_name(): 
7445 ++                            dcr->device->device_name);
7446 +          sec = time(NULL) - jcr->run_time;
7447 +          if (sec <= 0) {
7448 +             sec = 1;
7449 +Index: src/stored/stored_conf.c
7450 +===================================================================
7451 +RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v
7452 +retrieving revision 1.76
7453 +retrieving revision 1.76.2.1
7454 +diff -u -r1.76 -r1.76.2.1
7455 +--- src/stored/stored_conf.c   9 Sep 2005 09:40:04 -0000       1.76
7456 ++++ src/stored/stored_conf.c   22 Nov 2005 10:50:55 -0000      1.76.2.1
7457 +@@ -3,7 +3,7 @@
7458 +  *
7459 +  *     Kern Sibbald, March MM
7460 +  *
7461 +- *   Version $Id$
7462 ++ *   Version $Id$
7463 +  */
7464 + /*
7465 +    Copyright (C) 2000-2005 Kern Sibbald
7466 +@@ -222,16 +222,16 @@
7467 +          res->res_dev.hdr.name,
7468 +          res->res_dev.media_type, res->res_dev.device_name,
7469 +          res->res_dev.label_type);
7470 +-      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d\n",
7471 ++      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n",
7472 +          res->res_dev.max_rewind_wait, res->res_dev.min_block_size,
7473 +-         res->res_dev.max_block_size);
7474 ++         res->res_dev.max_block_size, res->res_dev.max_changer_wait);
7475 +       sendit(sock, "        max_jobs=%d max_files=%" lld " max_size=%" lld "\n",
7476 +          res->res_dev.max_volume_jobs, res->res_dev.max_volume_files,
7477 +          res->res_dev.max_volume_size);
7478 +       sendit(sock, "        max_file_size=%" lld " capacity=%" lld "\n",
7479 +          res->res_dev.max_file_size, res->res_dev.volume_capacity);
7480 +-      sendit(sock, "         spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
7481 +-      sendit(sock, "         max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
7482 ++      sendit(sock, "        spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
7483 ++      sendit(sock, "        max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
7484 +          res->res_dev.max_spool_size, res->res_dev.max_job_spool_size);
7485 +       if (res->res_dev.changer_res) {
7486 +          sendit(sock, "         changer=%p\n", res->res_dev.changer_res);
7487 +Index: src/tray-monitor/tray-monitor.c
7488 +===================================================================
7489 +RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v
7490 +retrieving revision 1.25.2.1
7491 +retrieving revision 1.25.2.2
7492 +diff -u -r1.25.2.1 -r1.25.2.2
7493 +--- src/tray-monitor/tray-monitor.c    1 Oct 2005 10:20:18 -0000       1.25.2.1
7494 ++++ src/tray-monitor/tray-monitor.c    22 Nov 2005 10:50:55 -0000      1.25.2.2
7495 +@@ -4,7 +4,7 @@
7496 +  *
7497 +  *     Nicolas Boichat, August MMIV
7498 +  *
7499 +- *     Version $Id$
7500 ++ *     Version $Id$
7501 +  */
7502
7503 + /*
7504 +@@ -881,7 +881,7 @@
7505 +       }
7506
7507 +       if (item->D_sock == NULL) {
7508 +-         g_slist_append(*list, (void *)_("Cannot connect to daemon.\n"));
7509 ++         g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n")));
7510 +          changeStatusMessage(item, _("Cannot connect to daemon."));
7511 +          item->state = error;
7512 +          item->oldstate = error;
7513 +Index: updatedb/kes-1.38
7514 +===================================================================
7515 +RCS file: updatedb/kes-1.38
7516 +diff -N updatedb/kes-1.38
7517 +--- updatedb/kes-1.38  3 Nov 2005 14:54:28 -0000       1.1.2.1
7518 ++++ /dev/null  1 Jan 1970 00:00:00 -0000
7519 +@@ -1,19 +0,0 @@
7520 +-              Technical notes on version 1.38  
7521 +-                        Kern Sibbald
7522 +-
7523 +-General:
7524 +-
7525 +-Changes to 1.38.0:
7526 +-- Modify configure.in to add execute option to sqlite3 catalog  
7527 +-  scripts.
7528 +-- Create update_xxx_table_8_to_9 scripts for updatedb
7529 +-- Fix wrong variable in bpipe.c debug output reported by user.
7530 +-- Fix improper placement of encode_and_send_attributes() in
7531 +-  FD backup.c causing first file of non-portable Win32 backup
7532 +-  to have wrong stream. Reported by Thorsten.
7533 +-- Move the -lcrypt for PostgreSQL after the PostgreSQL libs in
7534 +-  autoconf/bacula-macros/db.m4 as suggested by user.  Fixes bug #457.
7535 +-- Remove @STATIC_CONS@ from tray-monitor Makefile as suggested
7536 +-  by user. Fixes bug #456.
7537 +-
7538 +-Released 1.38.0 (28Oct05): 31 October 2005
7539 Index: patches/patches-1.38.0
7540 ===================================================================
7541 RCS file: patches/patches-1.38.0
7542 diff -N patches/patches-1.38.0
7543 Index: patches/patches-1.38.1
7544 ===================================================================
7545 RCS file: patches/patches-1.38.1
7546 diff -N patches/patches-1.38.1
7547 --- /dev/null   1 Jan 1970 00:00:00 -0000
7548 +++ patches/patches-1.38.1      22 Nov 2005 10:50:55 -0000      1.1.2.2
7549 @@ -0,0 +1,14 @@
7550 +20Nov05 1.38.1-to-1.38.2.patch
7551 + This patch fixes the following bugs:
7552 +
7553 +- Fix crash in tray-monitor when daemon disconnects. Bug #479.
7554 +- Fix bnet-server bug found on OpenBSD. Bug #486 (bug originator
7555 +  says this patch does not fix his problem)
7556 +- Fix cancel failure bug. Bug #481
7557 +- Fix failure when Pool name has spaces. Bug #487
7558 +- Fix SD crash in autochanger code. Mutex failure. Bug #488
7559 +- Fix a couple of free()s in src/filed/acl.c
7560 +- Fix memory overrun in bfile.c in building OS X resource
7561 +  fork filename. Bug #489
7562 +                         
7563 +  
7564 Index: src/version.h
7565 ===================================================================
7566 RCS file: /cvsroot/bacula/bacula/src/version.h,v
7567 retrieving revision 1.554.2.14
7568 retrieving revision 1.554.2.15
7569 diff -u -r1.554.2.14 -r1.554.2.15
7570 --- src/version.h       14 Nov 2005 14:21:58 -0000      1.554.2.14
7571 +++ src/version.h       22 Nov 2005 10:50:55 -0000      1.554.2.15
7572 @@ -1,11 +1,11 @@
7573  /*
7574 - *  Version $Id$
7575 + *  Version $Id$
7576   */
7577  
7578  #undef  VERSION
7579 -#define VERSION "1.38.1"
7580 -#define BDATE   "14 November 2005"
7581 -#define LSMDATE "14Nov05"
7582 +#define VERSION "1.38.2"
7583 +#define BDATE   "20 November 2005"
7584 +#define LSMDATE "20Nov05"
7585  
7586  /* Debug flags */
7587  #undef  DEBUG
7588 Index: src/dird/catreq.c
7589 ===================================================================
7590 RCS file: /cvsroot/bacula/bacula/src/dird/catreq.c,v
7591 retrieving revision 1.77.2.1
7592 retrieving revision 1.77.2.2
7593 diff -u -r1.77.2.1 -r1.77.2.2
7594 --- src/dird/catreq.c   26 Oct 2005 14:02:04 -0000      1.77.2.1
7595 +++ src/dird/catreq.c   22 Nov 2005 10:50:55 -0000      1.77.2.2
7596 @@ -10,7 +10,7 @@
7597   *  Basic tasks done here:
7598   *      Handle Catalog services.
7599   *
7600 - *   Version $Id$
7601 + *   Version $Id$
7602   */
7603  /*
7604     Copyright (C) 2001-2005 Kern Sibbald
7605 @@ -117,6 +117,7 @@
7606     if (sscanf(bs->msg, Find_media, &Job, &index, &pool_name, &mr.MediaType) == 4) {
7607        memset(&pr, 0, sizeof(pr));
7608        bstrncpy(pr.Name, pool_name, sizeof(pr.Name));
7609 +      unbash_spaces(pr.Name);
7610        ok = db_get_pool_record(jcr, jcr->db, &pr);
7611        if (ok) {
7612           mr.PoolId = pr.PoolId;
7613 Index: src/dird/ua_restore.c
7614 ===================================================================
7615 RCS file: /cvsroot/bacula/bacula/src/dird/ua_restore.c,v
7616 retrieving revision 1.101.2.1
7617 retrieving revision 1.101.2.2
7618 diff -u -r1.101.2.1 -r1.101.2.2
7619 --- src/dird/ua_restore.c       26 Oct 2005 14:02:04 -0000      1.101.2.1
7620 +++ src/dird/ua_restore.c       22 Nov 2005 10:50:55 -0000      1.101.2.2
7621 @@ -10,7 +10,7 @@
7622   *
7623   *     Kern Sibbald, July MMII
7624   *
7625 - *   Version $Id$
7626 + *   Version $Id$
7627   */
7628  /*
7629     Copyright (C) 2002-2005 Kern Sibbald
7630 @@ -409,7 +409,7 @@
7631        }
7632        done = true;
7633        switch (do_prompt(ua, "", _("Select item: "), NULL, 0)) {
7634 -      case -1:                        /* error */
7635 +      case -1:                        /* error or cancel */
7636           return 0;
7637        case 0:                         /* list last 20 Jobs run */
7638           gui_save = ua->jcr->gui;
7639 Index: src/dird/ua_run.c
7640 ===================================================================
7641 RCS file: /cvsroot/bacula/bacula/src/dird/ua_run.c,v
7642 retrieving revision 1.71
7643 retrieving revision 1.71.2.1
7644 diff -u -r1.71 -r1.71.2.1
7645 --- src/dird/ua_run.c   10 Aug 2005 16:35:19 -0000      1.71
7646 +++ src/dird/ua_run.c   22 Nov 2005 10:50:55 -0000      1.71.2.1
7647 @@ -4,7 +4,7 @@
7648   *
7649   *     Kern Sibbald, December MMI
7650   *
7651 - *   Version $Id$
7652 + *   Version $Id$
7653   */
7654  /*
7655     Copyright (C) 2001-2005 Kern Sibbald
7656 @@ -851,6 +851,8 @@
7657              bsendmsg(ua, _("You must set the bootstrap file to NULL to be able to specify a JobId.\n"));
7658           }
7659           goto try_again;
7660 +      case -1:                        /* error or cancel */
7661 +         goto bail_out;
7662        default:
7663           goto try_again;
7664        }
7665 Index: src/dird/ua_select.c
7666 ===================================================================
7667 RCS file: /cvsroot/bacula/bacula/src/dird/ua_select.c,v
7668 retrieving revision 1.65.2.1
7669 retrieving revision 1.65.2.2
7670 diff -u -r1.65.2.1 -r1.65.2.2
7671 --- src/dird/ua_select.c        12 Nov 2005 17:30:52 -0000      1.65.2.1
7672 +++ src/dird/ua_select.c        22 Nov 2005 10:50:55 -0000      1.65.2.2
7673 @@ -4,7 +4,7 @@
7674   *
7675   *     Kern Sibbald, October MMI
7676   *
7677 - *   Version  $Id$
7678 + *   Version  $Id$
7679   */
7680  /*
7681     Copyright (C) 2001-2005 Kern Sibbald
7682 @@ -149,7 +149,9 @@
7683        }
7684     }
7685     UnlockRes();
7686 -   do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name));
7687 +   if (do_prompt(ua, _("Storage"),  _("Select Storage resource"), name, sizeof(name)) < 0) {
7688 +      return NULL;
7689 +   }
7690     store = (STORE *)GetResWithName(R_STORAGE, name);
7691     return store;
7692  }
7693 @@ -170,7 +172,9 @@
7694        }
7695     }
7696     UnlockRes();
7697 -   do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name));
7698 +   if (do_prompt(ua, _("FileSet"), _("Select FileSet resource"), name, sizeof(name)) < 0) {
7699 +      return NULL;
7700 +   }
7701     fs = (FILESET *)GetResWithName(R_FILESET, name);
7702     return fs;
7703  }
7704 @@ -202,7 +206,9 @@
7705           }
7706        }
7707        UnlockRes();
7708 -      do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name));
7709 +      if (do_prompt(ua, _("Catalog"),  _("Select Catalog resource"), name, sizeof(name)) < 0) {
7710 +         return NULL;
7711 +      }
7712        catalog = (CAT *)GetResWithName(R_CATALOG, name);
7713     }
7714     return catalog;
7715 @@ -225,7 +231,9 @@
7716        }
7717     }
7718     UnlockRes();
7719 -   do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name));
7720 +   if (do_prompt(ua, _("Job"), _("Select Job resource"), name, sizeof(name)) < 0) {
7721 +      return NULL;
7722 +   }
7723     job = (JOB *)GetResWithName(R_JOB, name);
7724     return job;
7725  }
7726 @@ -246,7 +254,9 @@
7727        }
7728     }
7729     UnlockRes();
7730 -   do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name));
7731 +   if (do_prompt(ua, _("Job"), _("Select Restore Job"), name, sizeof(name)) < 0) {
7732 +      return NULL;
7733 +   }
7734     job = (JOB *)GetResWithName(R_JOB, name);
7735     return job;
7736  }
7737 @@ -269,7 +279,9 @@
7738        }
7739     }
7740     UnlockRes();
7741 -   do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name));
7742 +   if (do_prompt(ua, _("Client"),  _("Select Client (File daemon) resource"), name, sizeof(name)) < 0) {
7743 +      return NULL;
7744 +   }
7745     client = (CLIENT *)GetResWithName(R_CLIENT, name);
7746     return client;
7747  }
7748 @@ -551,7 +563,9 @@
7749        }
7750     }
7751     UnlockRes();
7752 -   do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name));
7753 +   if (do_prompt(ua, _("Pool"), _("Select Pool resource"), name, sizeof(name)) < 0) {
7754 +      return NULL;
7755 +   }
7756     pool = (POOL *)GetResWithName(R_POOL, name);
7757     return pool;
7758  }
7759 @@ -673,12 +687,16 @@
7760   *  Returns: -1 on error
7761   *            index base 0 on success, and choice
7762   *               is copied to prompt if not NULL
7763 + *             prompt is set to the chosen prompt item string
7764   */
7765  int do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt)
7766  {
7767     int i, item;
7768     char pmsg[MAXSTRING];
7769  
7770 +   if (prompt) {
7771 +      *prompt = 0;
7772 +   }
7773     if (ua->num_prompts == 2) {
7774        item = 1;
7775        if (prompt) {
7776 @@ -698,15 +716,11 @@
7777        bsendmsg(ua, "%6d: %s\n", i, ua->prompt[i]);
7778     }
7779  
7780 -   if (prompt) {
7781 -      *prompt = 0;
7782 -   }
7783 -
7784     for ( ;; ) {
7785        /* First item is the prompt string, not the items */
7786        if (ua->num_prompts == 1) {
7787           bsendmsg(ua, _("Selection is empty!\n"));
7788 -         item = 0;                    /* list is empty ! */
7789 +         item = -1;                    /* list is empty ! */
7790           break;
7791        }
7792        if (ua->num_prompts == 2) {
7793 @@ -741,7 +755,7 @@
7794        free(ua->prompt[i]);
7795     }
7796     ua->num_prompts = 0;
7797 -   return item - 1;
7798 +   return item>0 ? item-1 : item;
7799  }
7800  
7801  
7802 Index: src/dird/ua_update.c
7803 ===================================================================
7804 RCS file: /cvsroot/bacula/bacula/src/dird/ua_update.c,v
7805 retrieving revision 1.7
7806 retrieving revision 1.7.2.1
7807 diff -u -r1.7 -r1.7.2.1
7808 --- src/dird/ua_update.c        28 Aug 2005 12:22:02 -0000      1.7
7809 +++ src/dird/ua_update.c        22 Nov 2005 10:50:55 -0000      1.7.2.1
7810 @@ -5,7 +5,7 @@
7811   *
7812   *     Kern Sibbald, September MM
7813   *
7814 - *   Version $Id$
7815 + *   Version $Id$
7816   */
7817  /*
7818     Copyright (C) 2000-2005 Kern Sibbald
7819 @@ -590,7 +590,7 @@
7820           update_all_vols_from_pool(ua);
7821           return 1;
7822        default:                        /* Done or error */
7823 -         bsendmsg(ua, _("Selection done.\n"));
7824 +         bsendmsg(ua, _("Selection terminated.\n"));
7825           return 1;
7826        }
7827     }
7828 Index: src/filed/acl.c
7829 ===================================================================
7830 RCS file: /cvsroot/bacula/bacula/src/filed/acl.c,v
7831 retrieving revision 1.10.2.1
7832 retrieving revision 1.10.2.2
7833 diff -u -r1.10.2.1 -r1.10.2.2
7834 --- src/filed/acl.c     14 Nov 2005 20:20:38 -0000      1.10.2.1
7835 +++ src/filed/acl.c     22 Nov 2005 10:50:55 -0000      1.10.2.2
7836 @@ -26,7 +26,7 @@
7837   *
7838   *   Written by Preben 'Peppe' Guldberg, December MMIV
7839   *
7840 - *   Version $Id$
7841 + *   Version $Id$
7842   */
7843  /*
7844     Copyright (C) 2004-2005 Kern Sibbald
7845 @@ -140,7 +140,7 @@
7846  
7847     if ((acl_text = acl_get(jcr->last_fname)) != NULL) {
7848        len = pm_strcpy(jcr->acl_text, acl_text);
7849 -      free(acl_text);
7850 +      actuallyfree(acl_text);
7851        return len;
7852     }
7853     return -1;
7854 @@ -270,7 +270,7 @@
7855     if ((n = getacl(jcr->last_fname, n, acls)) > 0) {
7856        if ((acl_text = acltostr(n, acls, FORM_SHORT)) != NULL) {
7857           len = pm_strcpy(jcr->acl_text, acl_text);
7858 -         free(acl_text);
7859 +         actuallyfree(acl_text);
7860           return len;
7861        }
7862     }
7863 Index: src/findlib/bfile.c
7864 ===================================================================
7865 RCS file: /cvsroot/bacula/bacula/src/findlib/bfile.c,v
7866 retrieving revision 1.40
7867 retrieving revision 1.40.2.1
7868 diff -u -r1.40 -r1.40.2.1
7869 --- src/findlib/bfile.c 10 Aug 2005 16:35:19 -0000      1.40
7870 +++ src/findlib/bfile.c 22 Nov 2005 10:50:55 -0000      1.40.2.1
7871 @@ -5,7 +5,7 @@
7872   *
7873   *    Kern Sibbald, April MMIII
7874   *
7875 - *   Version $Id$
7876 + *   Version $Id$
7877   *
7878   */
7879  /*
7880 @@ -623,13 +623,10 @@
7881  int bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode)
7882  {
7883     POOLMEM *rsrc_fname;
7884 -   size_t fname_len;
7885  
7886 -   fname_len = strlen(fname);
7887     rsrc_fname = get_pool_memory(PM_FNAME);
7888 -   bstrncpy(rsrc_fname, fname, fname_len + 1);
7889 -   bstrncpy(rsrc_fname + fname_len, _PATH_RSRCFORKSPEC,
7890 -      strlen(_PATH_RSRCFORKSPEC) + 1);
7891 +   pm_strcpy(rsrc_fname, fname);
7892 +   pm_strcat(rsrc_fname, _PATH_RSRCFORKSPEC);
7893     bopen(bfd, rsrc_fname, flags, mode);
7894     free_pool_memory(rsrc_fname);
7895     return bfd->fid;
7896 Index: src/lib/bnet_server.c
7897 ===================================================================
7898 RCS file: /cvsroot/bacula/bacula/src/lib/bnet_server.c,v
7899 retrieving revision 1.39
7900 retrieving revision 1.39.2.1
7901 diff -u -r1.39 -r1.39.2.1
7902 --- src/lib/bnet_server.c       18 Aug 2005 15:37:40 -0000      1.39
7903 +++ src/lib/bnet_server.c       22 Nov 2005 10:50:55 -0000      1.39.2.1
7904 @@ -16,7 +16,7 @@
7905    * Originally written by Kern Sibbald for inclusion in apcupsd,
7906    *  but heavily modified for Bacula
7907    *
7908 -  *   Version $Id$
7909 +  *   Version $Id$
7910    */
7911  
7912  #include "bacula.h"
7913 @@ -153,7 +153,6 @@
7914           /* Error, get out */
7915           foreach_dlist(fd_ptr, &sockfds) {
7916              close(fd_ptr->fd);
7917 -            free((void *)fd_ptr);
7918           }
7919           Emsg1(M_FATAL, 0, _("Error in select: %s\n"), be.strerror());
7920           break;
7921 Index: src/stored/autochanger.c
7922 ===================================================================
7923 RCS file: /cvsroot/bacula/bacula/src/stored/autochanger.c,v
7924 retrieving revision 1.47.2.3
7925 retrieving revision 1.47.2.4
7926 diff -u -r1.47.2.3 -r1.47.2.4
7927 --- src/stored/autochanger.c    12 Nov 2005 17:30:53 -0000      1.47.2.3
7928 +++ src/stored/autochanger.c    22 Nov 2005 10:50:55 -0000      1.47.2.4
7929 @@ -4,7 +4,7 @@
7930   *
7931   *   Kern Sibbald, August MMII
7932   *                            
7933 - *   Version $Id$
7934 + *   Version $Id$
7935   */
7936  /*
7937     Copyright (C) 2002-2005 Kern Sibbald
7938 @@ -163,6 +163,7 @@
7939              rtn_stat = -1;            /* hard error */
7940           }
7941           Dmsg2(400, "load slot %d status=%d\n", slot, status);
7942 +         unlock_changer(dcr);
7943        } else {
7944           status = 0;                  /* we got what we want */
7945           dev->Slot = slot;            /* set currently loaded slot */
7946 @@ -174,7 +175,6 @@
7947     } else {
7948        rtn_stat = 0;                   /* no changer found */
7949     }
7950 -   unlock_changer(dcr);
7951     free_pool_memory(changer);
7952     return rtn_stat;
7953  
7954 Index: src/stored/status.c
7955 ===================================================================
7956 RCS file: /cvsroot/bacula/bacula/src/stored/status.c,v
7957 retrieving revision 1.44.2.1
7958 retrieving revision 1.44.2.2
7959 diff -u -r1.44.2.1 -r1.44.2.2
7960 --- src/stored/status.c 6 Oct 2005 07:04:13 -0000       1.44.2.1
7961 +++ src/stored/status.c 22 Nov 2005 10:50:55 -0000      1.44.2.2
7962 @@ -3,7 +3,7 @@
7963   *
7964   *     Kern Sibbald, May MMIII
7965   *
7966 - *   Version $Id$
7967 + *   Version $Id$
7968   *
7969   */
7970  /*
7971 @@ -264,6 +264,7 @@
7972     bool found = false;
7973     int bps, sec;
7974     JCR *jcr;
7975 +   DCR *dcr;
7976     char JobName[MAX_NAME_LENGTH];
7977     char b1[30], b2[30], b3[30];
7978  
7979 @@ -273,7 +274,8 @@
7980           bnet_fsend(user, _("%s Job %s waiting for Client connection.\n"),
7981              job_type_to_str(jcr->JobType), jcr->Job);
7982        }
7983 -      if (jcr->dcr && jcr->dcr->device) {
7984 +      dcr = jcr->dcr;
7985 +      if (dcr && dcr->device) {
7986           bstrncpy(JobName, jcr->Job, sizeof(JobName));
7987           /* There are three periods after the Job name */
7988           char *p;
7989 @@ -282,13 +284,16 @@
7990                 *p = 0;
7991              }
7992           }
7993 -         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\" device=\"%s\"\n"),
7994 +         bnet_fsend(user, _("%s %s job %s JobId=%d Volume=\"%s\"\n"
7995 +                            "    pool=\"%s\" device=\"%s\"\n"),
7996                     job_level_to_str(jcr->JobLevel),
7997                     job_type_to_str(jcr->JobType),
7998                     JobName,
7999                     jcr->JobId,
8000 -                   jcr->dcr->VolumeName,
8001 -                   jcr->dcr->device->device_name);
8002 +                   dcr->VolumeName,
8003 +                   dcr->pool_name,
8004 +                   dcr->dev?dcr->dev->print_name(): 
8005 +                            dcr->device->device_name);
8006           sec = time(NULL) - jcr->run_time;
8007           if (sec <= 0) {
8008              sec = 1;
8009 Index: src/stored/stored_conf.c
8010 ===================================================================
8011 RCS file: /cvsroot/bacula/bacula/src/stored/stored_conf.c,v
8012 retrieving revision 1.76
8013 retrieving revision 1.76.2.1
8014 diff -u -r1.76 -r1.76.2.1
8015 --- src/stored/stored_conf.c    9 Sep 2005 09:40:04 -0000       1.76
8016 +++ src/stored/stored_conf.c    22 Nov 2005 10:50:55 -0000      1.76.2.1
8017 @@ -3,7 +3,7 @@
8018   *
8019   *     Kern Sibbald, March MM
8020   *
8021 - *   Version $Id$
8022 + *   Version $Id$
8023   */
8024  /*
8025     Copyright (C) 2000-2005 Kern Sibbald
8026 @@ -222,16 +222,16 @@
8027           res->res_dev.hdr.name,
8028           res->res_dev.media_type, res->res_dev.device_name,
8029           res->res_dev.label_type);
8030 -      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d\n",
8031 +      sendit(sock, "        rew_wait=%d min_bs=%d max_bs=%d chgr_wait=%d\n",
8032           res->res_dev.max_rewind_wait, res->res_dev.min_block_size,
8033 -         res->res_dev.max_block_size);
8034 +         res->res_dev.max_block_size, res->res_dev.max_changer_wait);
8035        sendit(sock, "        max_jobs=%d max_files=%" lld " max_size=%" lld "\n",
8036           res->res_dev.max_volume_jobs, res->res_dev.max_volume_files,
8037           res->res_dev.max_volume_size);
8038        sendit(sock, "        max_file_size=%" lld " capacity=%" lld "\n",
8039           res->res_dev.max_file_size, res->res_dev.volume_capacity);
8040 -      sendit(sock, "         spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
8041 -      sendit(sock, "         max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
8042 +      sendit(sock, "        spool_directory=%s\n", NPRT(res->res_dev.spool_directory));
8043 +      sendit(sock, "        max_spool_size=%" lld " max_job_spool_size=%" lld "\n",
8044           res->res_dev.max_spool_size, res->res_dev.max_job_spool_size);
8045        if (res->res_dev.changer_res) {
8046           sendit(sock, "         changer=%p\n", res->res_dev.changer_res);
8047 Index: src/tray-monitor/tray-monitor.c
8048 ===================================================================
8049 RCS file: /cvsroot/bacula/bacula/src/tray-monitor/tray-monitor.c,v
8050 retrieving revision 1.25.2.1
8051 retrieving revision 1.25.2.2
8052 diff -u -r1.25.2.1 -r1.25.2.2
8053 --- src/tray-monitor/tray-monitor.c     1 Oct 2005 10:20:18 -0000       1.25.2.1
8054 +++ src/tray-monitor/tray-monitor.c     22 Nov 2005 10:50:55 -0000      1.25.2.2
8055 @@ -4,7 +4,7 @@
8056   *
8057   *     Nicolas Boichat, August MMIV
8058   *
8059 - *     Version $Id$
8060 + *     Version $Id$
8061   */
8062  
8063  /*
8064 @@ -881,7 +881,7 @@
8065        }
8066  
8067        if (item->D_sock == NULL) {
8068 -         g_slist_append(*list, (void *)_("Cannot connect to daemon.\n"));
8069 +         g_slist_append(*list, g_string_new(_("Cannot connect to daemon.\n")));
8070           changeStatusMessage(item, _("Cannot connect to daemon."));
8071           item->state = error;
8072           item->oldstate = error;
8073 Index: updatedb/kes-1.38
8074 ===================================================================
8075 RCS file: updatedb/kes-1.38
8076 diff -N updatedb/kes-1.38
8077 --- updatedb/kes-1.38   3 Nov 2005 14:54:28 -0000       1.1.2.1
8078 +++ /dev/null   1 Jan 1970 00:00:00 -0000
8079 @@ -1,19 +0,0 @@
8080 -              Technical notes on version 1.38  
8081 -                        Kern Sibbald
8082 -
8083 -General:
8084 -
8085 -Changes to 1.38.0:
8086 -- Modify configure.in to add execute option to sqlite3 catalog  
8087 -  scripts.
8088 -- Create update_xxx_table_8_to_9 scripts for updatedb
8089 -- Fix wrong variable in bpipe.c debug output reported by user.
8090 -- Fix improper placement of encode_and_send_attributes() in
8091 -  FD backup.c causing first file of non-portable Win32 backup
8092 -  to have wrong stream. Reported by Thorsten.
8093 -- Move the -lcrypt for PostgreSQL after the PostgreSQL libs in
8094 -  autoconf/bacula-macros/db.m4 as suggested by user.  Fixes bug #457.
8095 -- Remove @STATIC_CONS@ from tray-monitor Makefile as suggested
8096 -  by user. Fixes bug #456.
8097 -
8098 -Released 1.38.0 (28Oct05): 31 October 2005