2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-28 12:37:55 +00:00

11 Commits

Author SHA1 Message Date
Thomas Markwalder
5eee7d180e
[#3831] Initial pieces for legal log restriction
/src/lib/dhcpsrv/Makefile.am
   Changed LEGAL_LOG_DIR to use log vs lib

/src/lib/dhcpsrv/legal_log_mgr.*
    LegalLogMgr - added PathChecker singleton and funcs

/src/lib/dhcpsrv/meson.build
   Defined LEGAL_LOG_DIR

/src/lib/util/filesystem.*
    PathChecker::validateDirectory() - new func

/src/lib/util/tests/filesystem_unittests.cc
    TEST(PathChecker, validateDirectoryEnforcePath)
    TEST(PathChecker, validateDirectoryEnforcePathFalse) - new tests
2025-05-16 12:20:43 +03:00
Thomas Markwalder
c745954d52
[#3831] Addressed further comments
/doc/examples/kea6/all-keys-netconf.json
/doc/examples/kea6/all-keys.json
    removed data-directory

/doc/sphinx/arm/dhcp6-srv.rst
    Updated ARM

/src/bin/dhcp6/dhcp6_messages.*
    Changed DHCP6_DATA_DIRECTORY_DEPRECATED

/src/bin/dhcp6/json_config_parser.cc
    Removed dirExists() function
    parsing logic errors on invalid data-directory

/src/bin/dhcp6/tests/config_parser_unittest.cc
    Updated data-directory tests

Other minor cleanups
2025-05-16 12:20:43 +03:00
Francis Dupont
1cc999a1d2
[#3831] spelling 2025-05-16 12:20:43 +03:00
Thomas Markwalder
2f304f6ca7
[#3831] Refactored FileManager into PathChecker
Refactored to internally support env variable and explicit paths
modified:
    src/lib/hooks/hooks_parser.cc
    src/lib/hooks/hooks_parser.h
    src/lib/util/filesystem.cc
    src/lib/util/filesystem.h
    src/lib/util/tests/filesystem_unittests.cc
2025-05-16 12:20:43 +03:00
Francis Dupont
d91aa4203c
[#3832] Added umask 0027 setting 2025-05-16 12:20:43 +03:00
Francis Dupont
923990b389
[#3832] Checkpoint: removed #3050 and fixes 2025-05-16 12:20:43 +03:00
Thomas Markwalder
4afdeb7719
[#3830] Hook libraries must load from default hook dir
/src/lib/util/filesystem.*
    FileManager::validatePath() - new class and function

/src/lib/hooks/hooks_parser.*
    HooksLibrariesParser::validatePath() - new wrapper around FileManager::validatePath()
    HooksLibrariesParser::parse() - now uses validatePath()

/src/lib/hooks/tests/hooks_manager_unittest.cc
    TEST(HooksParser, validatePathEnforcePath)
    TEST(HooksParser, validatePathEnforcePathFalse) - new tests

/src/lib/util/tests/filesystem_unittests.cc
    TEST(FileManager, validatePathEnforcePath)
    TEST(FileManager, validatePathEnforcePathFalse) - new tests
2025-05-16 12:20:42 +03:00
Andrei Pavel
58d4caa865
[#3605] Prepare existing code for fuzzing
- Separate ENABLE_AFL into ENABLE_FUZZING and HAVE_AFL.
- Add the --disable-unicode flag required in the oss-fuzz container.
- Add checking of support for C++17.
- Make Kea compile with afl++.
- Rotate ports in `getServerPort()` functions under an env var.
- Fix some destruction issues that would result in crashes when fuzzing.
- Add some checks in the UnixControlClient that prevent some crashes when fuzzing.
- Add `isc::util::isSocket()` function.
- Change `isc::util::file::Path` to not append a trailing slash to allow
  chained calls of `parentPath()`.
- Add `isc::util::file::TemporaryDirectory` useful when fuzzing.
2024-10-23 16:37:31 +03:00
Francis Dupont
84c437e30f [#3050] Added Umask RAII and use it 2024-06-27 14:47:52 +02:00
Andrei Pavel
fc59957aef
[#3210] address review 2024-03-21 18:30:04 +02:00
Andrei Pavel
a6935b0d55
[#3210] refactor file utilities
- Unify filename.h and file_utilities.h under filesystem.h.
- Rename Filename class to Path since it more accurately represents
  it.
- Make its interface as close as possible to that of std::filesystem::path.
- Remove unused method expandWithDefault.
- Rename useAsDefault to replaceExtension since it was only used in the
  purpose of replacing extension.
- Unroll the split method in the constructor.
2024-03-21 18:30:04 +02:00