icinga2/lib/config
Julian Brost 0ebcd2662d No longer allow overriding the frozen attribute of containers
The Array, Dictionary, and Namespace types provide a Freeze() method that makes
them read-only. So far, there was the possibility to call some methods with
`overrideFrozen=true` which would then bypass the corresponding check and allow
modification of the data structures nonetheless.

With 24b57f0d3a, this possibility was already
removed from the Namespace type. However, for interface compatibility, it kept
the parameter and just ignores it, throwing an exception on any modification on
a frozen instance.

The only place using `overrideFrozen` was processing of the `-D`/`--define`
command line flag that allows setting additional variables in the DSL. At the
time it is evaluated, there are no user-created data structures yet that could
be frozen, so the only frozen objects that could be encountered are Namespaces
(Icinga doesn't freeze other types by itself) and for these, `overrideFrozen`
already has no effect.

Hence, there is no harm in removing `overrideFrozen` altogether. This
simplifies the code and also means that frozen objects are now indeed read-only
without exceptions, allowing further optimizations regarding locking in the
future.
2025-07-08 14:16:20 +02:00
..
activationcontext.cpp Fix file endings 2023-05-17 18:05:13 +02:00
activationcontext.hpp Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
applyrule-targeted.cpp ApplyRule::GetTarget*s(): support constant strings from variables 2023-12-13 16:02:50 +01:00
applyrule.cpp ApplyRule: Make m_HasMatches atomic 2022-11-28 14:13:58 +01:00
applyrule.hpp FilterUtility::GetFilterTargets(): don't run filter for specific object(s) for all objects 2023-12-13 16:02:50 +01:00
CMakeLists.txt Separately handle apply rules targetting only specific parent objects 2022-10-28 14:27:53 +02:00
config_lexer.ll Make ConfigCompiler#m_LexBuffer a String 2020-01-21 13:38:59 +01:00
config_parser.yy ApplyRule::GetTargetTypes(): return by const ref not to malloc() 2022-10-19 13:43:51 +02:00
configcompiler.cpp CONTEXT: use << everywhere to unify usages 2022-11-30 11:06:51 +01:00
configcompiler.hpp Use std::mutex, not boost::mutex 2021-02-03 09:54:57 +01:00
configcompilercontext.cpp Fix file endings 2023-05-17 18:05:13 +02:00
configcompilercontext.hpp Deduplicate and stabilize fragile filesystem transactions 2023-01-27 12:03:56 +01:00
configfragment.hpp INITIALIZE_ONCE_WITH_PRIORITY: use enum for priority values 2023-01-18 15:57:27 +01:00
configitem.cpp Merge pull request #9924 from ymartin-ovh/pr-9916 2025-06-06 15:15:51 +02:00
configitem.hpp Add ConfigType::BeforeOnAllConfigLoaded signal 2025-03-12 11:53:30 +01:00
configitembuilder.cpp Fix file endings 2023-05-17 18:05:13 +02:00
configitembuilder.hpp Replace std::shared_ptr<Expression> with Expression::Ptr 2019-10-21 17:10:51 +02:00
expression.cpp No longer allow overriding the frozen attribute of containers 2025-07-08 14:16:20 +02:00
expression.hpp No longer allow overriding the frozen attribute of containers 2025-07-08 14:16:20 +02:00
i2-config.hpp Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
objectrule.cpp Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
objectrule.hpp Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
vmops.hpp No longer allow overriding the frozen attribute of containers 2025-07-08 14:16:20 +02:00