From: Thomas Markwalder Date: Wed, 23 Apr 2025 18:45:04 +0000 (-0400) Subject: [#3830] Updated ARM X-Git-Tag: Kea-2.7.9~77 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=433593f23141e126114b7017ebd8d9f44586984f;p=thirdparty%2Fkea.git [#3830] Updated ARM modified: doc/sphinx/arm/hooks.rst modified: src/lib/hooks/tests/hooks_manager_unittest.cc modified: src/lib/util/tests/filesystem_unittests.cc --- diff --git a/doc/sphinx/arm/hooks.rst b/doc/sphinx/arm/hooks.rst index 7af13fd34f..a61b3ea811 100644 --- a/doc/sphinx/arm/hooks.rst +++ b/doc/sphinx/arm/hooks.rst @@ -222,10 +222,10 @@ configuration would be: because the parameters specified for the library (or the files those parameters point to) may have changed. -Since Kea-2.7.6, the server is able to load hook libraries specifying only the binary name, -if they reside in the default installation directory (the path is OS specific). -The default hook libraries installation path is provided in the config report as -"Hooks directory". +As of Kea 2.7.8, hook libriares may only be loaded from the default installation +directory which is provided in the config report as "Hooks directory". If a path +other than the default installation directory is specified Kea will emit an error +and refuse to load the library. For ease of use the path may simply be omitted. .. code-block:: json @@ -259,6 +259,7 @@ This snippet (on Debian 12) is equivalent to: } } + Libraries may have additional parameters that are not mandatory, in the sense that there may be libraries that do not require them. However, for any given library there is often a requirement to specify a certain diff --git a/src/lib/hooks/tests/hooks_manager_unittest.cc b/src/lib/hooks/tests/hooks_manager_unittest.cc index 90e0137dbe..ad139ad3ce 100644 --- a/src/lib/hooks/tests/hooks_manager_unittest.cc +++ b/src/lib/hooks/tests/hooks_manager_unittest.cc @@ -1079,6 +1079,7 @@ TEST_F(HooksManagerTest, UnloadBeforeUnpark) { EXPECT_FALSE(unparked); } +// Verifies HooksParser::validatePath() when enforce_path is true. TEST(HooksParser, validatePathEnforcePath) { std::string def_path(HooksLibrariesParser::default_hooks_path_); struct Scenario { @@ -1136,6 +1137,7 @@ TEST(HooksParser, validatePathEnforcePath) { } } +// Verifies HooksParser::validatePath() when enforce_path is false. TEST(HooksParser, validatePathEnforcePathFalse) { std::string def_path(HooksLibrariesParser::default_hooks_path_); struct Scenario { diff --git a/src/lib/util/tests/filesystem_unittests.cc b/src/lib/util/tests/filesystem_unittests.cc index fe35b2ac6e..295aa17981 100644 --- a/src/lib/util/tests/filesystem_unittests.cc +++ b/src/lib/util/tests/filesystem_unittests.cc @@ -138,6 +138,8 @@ TEST(PathTest, replaceParentPath) { } + +// Verifies FileManager::validatePath() when enforce_path is true. TEST(FileManager, validatePathEnforcePath) { std::string def_path(TEST_DATA_BUILDDIR); struct Scenario { @@ -195,6 +197,7 @@ TEST(FileManager, validatePathEnforcePath) { } } +// Verifies FileManager::validatePath() when enforce_path is false. TEST(FileManager, validatePathEnforcePathFalse) { std::string def_path(TEST_DATA_BUILDDIR); struct Scenario { @@ -252,5 +255,4 @@ TEST(FileManager, validatePathEnforcePathFalse) { } } - } // namespace