bareos: master 88765d11

Author Committer Branch Timestamp Parent Ported
mvwieringen mvwieringen master 2015-08-04 10:07:04 master 9d303b21 Pending
Affected Issues  0000499: Director state file gets truncated
Changeset Fix state file truncation when running bareos-dir -t

When bareos-dir -t is run (which is done from the systemd startup) we
never read the state-file nor create a pid-file but in the
terminate_dird() function we unconditionally write a new state-file
which means we clobber its content.

We now keep track of the test_config flag using a static global variable
and don't try updating the state-file nor removing the pid-file in
terminate_dird() when we are in test_config mode.

Also made the terminate_dird() and terminate_stored() static as they are
not referenced from anywhere else anyway so lets not clobber the
namespace with it.

Fixes 0000499: Director state file gets truncated
mod - src/dird/dird.c Diff File
mod - src/stored/stored.c Diff File