bareos: master 6822b3ba

Author Committer Branch Timestamp Parent
mvwieringen mvwieringen master 2014-10-05 11:45 master e7ecf5ca Pending
Affected Issues  0000343: Print config should suppress data from JobDefs
Changeset Print config should suppress data from JobDefs

Some specific config items in the Job resource could be coming from a
JobDef so we should not print those values in the actual Job resource.

We add a new bitmap analog to item_present bitmap already existing in
the RES class. When we mark that bit when we populate the jobdef in the
populate_jobdefs() function in src/dird/dird_conf.c we can check this
bit in the printing function. (Overhead is currently 80 / 8 = 10 bytes)

We also use the same bitmap for defaults so we can use some shortcut
logic when printing the config as we then know that the default was
set and never replaced by an other setting. We clear the bit in all
other parse functions so we know the default is cleared. If the default
is replaced with the same value as the original default that is still
detected. Only real exception is when omit defaults is set to true
then we just like before always print the defaults (but not the data
populated from a JobDef.)

Fixes 0000343: Print config should suppress data from JobDefs
mod - src/dird/dird_conf.c Diff File
mod - src/dird/inc_conf.c Diff File
mod - src/dird/run_conf.c Diff File
mod - src/filed/filed_conf.c Diff File
mod - src/lib/parse_conf.c Diff File
mod - src/lib/parse_conf.h Diff File
mod - src/lib/res.c Diff File
mod - src/stored/stored_conf.c Diff File