]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix #7079 About a segfault in a copyjob when the fileset is no longer defined
authorEric Bollengier <eric@baculasystems.com>
Wed, 25 Nov 2020 12:39:09 +0000 (13:39 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 4 Feb 2021 14:51:49 +0000 (15:51 +0100)
Bug #7079
=========

Description
-----------

The user has renamed a FileSet (previously used by backup jobs) and the crash
happened during a copy job execution that tried to copy one of the jobs that
used a non existent FileSet.

Workaround
----------

Do a copy of the FileSet instead of renaming it.

**Fixed in version 12.4.4**

bacula/src/dird/mac.c

index f49b8508e6aabcd29964ac49aac86e86e8764c27..b043359f1814be559bf0e5e9725b0bdbfd80d4c4 100644 (file)
@@ -929,15 +929,19 @@ void mac_cleanup(JCR *jcr, int TermCode, int writeTermCode)
         edit_uint64(jcr->jr.JobId, ec8),
         jcr->jr.Job,
         level_to_str(edl, sizeof(edl), jcr->getJobLevel()), jcr->since,
-        jcr->client->name(),
-        jcr->fileset->name(), jcr->FSCreateTime,
-        jcr->rpool->name(), jcr->rpool_source,
+        jcr->client?jcr->client->name():"*None*",
+        jcr->fileset?jcr->fileset->name():"*None*",
+        jcr->FSCreateTime,
+        jcr->rpool?jcr->rpool->name():"*None*",
+        jcr->rpool_source,
         jcr->rstore?jcr->rstore->name():"*None*",
         NPRT(jcr->rstore_source),
-        jcr->pool->name(), jcr->pool_source,
+        jcr->pool?jcr->pool->name():"*None*",
+        jcr->pool_source,
         jcr->wstore?jcr->wstore->name():"*None*",
         NPRT(jcr->wstore_source),
-        jcr->catalog->name(), jcr->catalog_source,
+        jcr->catalog?jcr->catalog->name():"*None*",
+        jcr->catalog_source,
         sdt,
         edt,
         edit_utime(RunTime, elapsed, sizeof(elapsed)),