]> git.sur5r.net Git - bacula/bacula/blob - bacula/patches/2.4.3-purge-bug.patch
4682962e445429faadf9cafbe02e0f2984b99269
[bacula/bacula] / bacula / patches / 2.4.3-purge-bug.patch
1
2  This patch corrects appears to fix bug #1188, where a Volume can
3  be purged while it is being written.
4
5  Apply it to Bacula 2.4.3 (possibly earlier versions)
6  with:
7
8  cd <bacula-source>
9  patch -p0 <2.4.3-purge-bug.patch
10  ./configure <your-options>
11  make
12  ...
13  make install
14
15
16 Index: src/dird/ua_purge.c
17 ===================================================================
18 --- src/dird/ua_purge.c (revision 8054)
19 +++ src/dird/ua_purge.c (working copy)
20 @@ -463,6 +463,9 @@
21     bool purged = false;
22     char ed1[50];
23  
24 +   if (mr->FirstWritten == 0 || mr->LastWritten == 0) {
25 +      goto bail_out;               /* not written cannot purge */
26 +   }
27     if (strcmp(mr->VolStatus, "Purged") == 0) {
28        purged = true;
29        goto bail_out;