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

20 Commits

Author SHA1 Message Date
Razvan Becheriu
d2245874c9 [#3779] fixed doxygen 2025-06-13 16:31:54 +03:00
Thomas Markwalder
ee89af66cc [#3902] More typos
modified:   doc/sphinx/arm/agent.rst
modified:   doc/sphinx/arm/ddns.rst
modified:   doc/sphinx/arm/dhcp4-srv.rst
modified:   doc/sphinx/arm/dhcp6-srv.rst
modified:   doc/sphinx/arm/security.rst
modified:   src/bin/agent/ca_messages.mes
modified:   src/lib/d2srv/d2_messages.mes
modified:   src/lib/util/filesystem.cc
modified:   src/lib/util/filesystem.h
2025-05-23 14:36:30 -04:00
Thomas Markwalder
9adef66837 [#3902] servers disable security on -X
modified:   doc/sphinx/arm/agent.rst
modified:   doc/sphinx/arm/ddns.rst
modified:   doc/sphinx/arm/dhcp4-srv.rst
modified:   doc/sphinx/arm/dhcp6-srv.rst
modified:   doc/sphinx/arm/security.rst
modified:   src/bin/agent/ca_messages.mes
modified:   src/bin/agent/ca_process.cc
modified:   src/bin/d2/d2_process.cc
modified:   src/bin/dhcp4/dhcp4_messages.mes
modified:   src/bin/dhcp4/main.cc
modified:   src/bin/dhcp6/dhcp6_messages.mes
modified:   src/bin/dhcp6/main.cc
modified:   src/lib/config/unix_command_config.cc
modified:   src/lib/config/unix_command_config.h
modified:   src/lib/d2srv/d2_messages.mes
modified:   src/lib/dhcpsrv/cfgmgr.cc
modified:   src/lib/dhcpsrv/cfgmgr.h
modified:   src/lib/dhcpsrv/legal_log_mgr.cc
modified:   src/lib/dhcpsrv/legal_log_mgr.h
modified:   src/lib/hooks/hooks_parser.cc
modified:   src/lib/hooks/hooks_parser.h
modified:   src/lib/hooks/tests/hooks_manager_unittest.cc
modified:   src/lib/process/d_controller.cc
modified:   src/lib/process/log_parser.cc
modified:   src/lib/process/log_parser.h
modified:   src/lib/util/filesystem.cc
modified:   src/lib/util/filesystem.h
modified:   src/lib/util/tests/filesystem_unittests.cc
2025-05-23 11:20:20 -04:00
Razvan Becheriu
5e21953fb9 [#3833] addressed review comments 2025-05-20 07:48:32 +03:00
Razvan Becheriu
0d2ff4ff5e [#3833] remove references to /tmp/ 2025-05-20 00:04:12 +03:00
Razvan Becheriu
5cf1a06cef [#3831] fix fuzz and permissions mask 2025-05-19 12:12:55 +00:00
Thomas Markwalder
16acf248d0 [#3831] Initial impl of restricted ctl sockets
Working, have some UTs that still need to be fixed

/doc/examples/kea4/advanced.json
/doc/examples/kea4/all-keys-netconf.json
/doc/examples/kea4/all-keys-netconf.json
/doc/examples/kea4/all-keys.json
/doc/examples/kea4/comments.json
/doc/examples/kea4/config-backend.json
/doc/examples/kea4/ha-load-balancing-server1-mt-with-tls.json
/doc/examples/kea4/ha-load-balancing-server2-mt.json
/doc/examples/kea6/advanced.json
/doc/examples/kea6/all-keys-netconf.json
/doc/examples/kea6/all-keys.json
/doc/examples/kea6/comments.json
/doc/examples/kea6/config-backend.json
/doc/examples/kea6/ha-hot-standby-server1-with-tls.json
/doc/examples/kea6/ha-hot-standby-server2.json
    removed /tmp path from socket-name

/src/bin/dhcp4/tests/config_parser_unittest.cc
/src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc
/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
/src/bin/dhcp4/tests/dhcp4_test_utils.cc
/src/bin/dhcp4/tests/dhcp4_test_utils.h
/src/bin/dhcp6/tests/config_parser_unittest.cc
/src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc
/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc
/src/bin/dhcp6/tests/dhcp6_test_utils.cc
/src/bin/dhcp6/tests/dhcp6_test_utils.h
    updated tests

/src/lib/config/Makefile.am
/src/lib/config/meson.build
    defined CONTROL_SOCKET_DIR

/src/lib/config/tests/unix_command_config_unittests.cc
/src/lib/config/tests/unix_command_mgr_unittests.cc
    updated tests

/src/lib/config/unix_command_config.*
    UnixCommandConfig - added PathChecker singleton and methods
    to set and validate socket path/permissions

/src/lib/util/filesystem.*
    Added getPermsissions() and hasPermsission()

/src/lib/util/tests/filesystem_unittests.cc
    new permissions tests
2025-05-19 12:12:55 +00:00
Francis Dupont
78c0cd0de3 [#3831] Checkpoint: fixes, still UTs to add 2025-05-16 23:08:02 +02:00
Francis Dupont
97c2226aa9
[#3831] Spelling 2025-05-16 12:20:44 +03:00
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