bareos: master a2014835

Author Committer Branch Timestamp Parent
arogge_adm arogge_adm master 2019-03-14 10:28 master a3affbea Pending
Affected Issues  0001056: NDMP restore on 16.2.5 and above does not fill NDMP environment correctly
Changeset dird: redesign GetNdmpEnvironmentString() API

Fixes 0001056: NDMP restore on 16.2.5 and above does
             not fill NDMP environment correctly

Previously one overload of the function
GetNdmpEnvironmentString() wanted a JobDbRecord*
and expected jr->VolSessionId and jr->VolSessionTime
to contain the values for the volume from which the
restore happens. These had to be filled manually
before calling GetNdmlEnvironmentString() which had
not been done since 16.2.5 resulting in 0001056.

This patch now redesigns the API for all overloads
of GetNdmpEnviromentString() to make it harder
to misuse.

We also add a new struct VolumeSessionInfo to wrap
a pair of VolumeSessionId and VolumeSessionTime.
These two numbers are only meaningful together, so
they now have their own container.
mod - core/src/cats/cats.h Diff File
mod - core/src/cats/sql_get.cc Diff File
mod - core/src/dird/ndmp_dma_restore_NDMP_BAREOS.cc Diff File
mod - core/src/dird/ndmp_dma_restore_NDMP_NATIVE.cc Diff File
add - core/src/lib/volume_session_info.h Diff File