bareos: master 1055f104

Author Committer Branch Timestamp Parent
Marco van Wieringen Marco van Wieringen master 2014-04-05 12:10 master d0cd5589 Pending
Changeset Rewrite config engine to use integer types.

Instead of using function pointers for storing the config parser function
to call use integer types which are translated at runtime to the correct
function to call. This should work around hardening being performed on
shared libraries on some Linux platforms. On those platforms the actual
comparing of the function pointers fail, using integers for the different
data types makes it also possible to use an elegant switch to jump to the
correct parsing function instead of using an endless set of ifs needed when
comparing memory addresses of functions.

An extra side effect of not using function pointers is that the store functions
don't need to be global so the parse_conf.c in the shared library only exports
10 instead of 32 symbols and also the daemon specific store function can be
local only functions. The only thing needed is a callback to a dispatch function
in the daemon when it has no standard config items which are not of a generic
type (e.g. not bool, integer etc but things like protocol etc.) which leads to a
very small extra payload which is probably not even measurable.
mod - src/console/console_conf.c Diff File
mod - src/dird/dird.c Diff File
mod - src/dird/dird_conf.c Diff File
mod - src/dird/dird_conf.h Diff File
mod - src/dird/inc_conf.c Diff File
mod - src/filed/filed_conf.c Diff File
mod - src/filed/filed_conf.h Diff File
mod - src/lib/ini.c Diff File
mod - src/lib/ini.h Diff File
mod - src/lib/parse_conf.c Diff File
mod - src/lib/parse_conf.h Diff File
mod - src/plugins/filed/test-plugin-fd.c Diff File
mod - src/qt-console/bat_conf.cpp Diff File
mod - src/qt-tray-monitor/tray_conf.cpp Diff File
mod - src/stored/stored_conf.c Diff File
mod - src/stored/stored_conf.h Diff File