Kea: isc::hooks::HookLibraryScriptsChecker Class Reference

| Kea 3.2.0-git

isc::hooks::HookLibraryScriptsChecker Class Reference

`#include <hooks_parser.h>`

## Static Public Member Functions
static std::string | getHookScriptsPath (bool reset=false, const std::string explicit_path="")
| Fetches the supported script path.
static std::string | validatePath (const std::string libpath)
| Validates a script path (script loaded by a hook) against the supported path.

## Detailed Description

Definition at line 86 of file hooks_parser.h.

## Member Function Documentation

## ◆ getHookScriptsPath()

std::string isc::hooks::HookLibraryScriptsChecker::getHookScriptsPath | ( | bool | reset = false,
|  | const std::string | explicit_path = "" )
| static

Fetches the supported script path.

The first call to this function with no arguments will set the default hooks path to either the value of DEFAULT_HOOK_SCRIPTS_PATH or the environment variable KEA_HOOK_SCRIPTS_PATH if it is defined. Subsequent calls with no arguments will simply return this value.

Parameters

  reset | recalculate when true, defaults to false. This is for testing purposes only.
  explicit_path | set default hooks path to this value. This is for testing purposes only.

Returns
  String containing the default script path.

Definition at line 37 of file hooks_parser.cc.

Referenced by validatePath().

## ◆ validatePath()

std::string isc::hooks::HookLibraryScriptsChecker::validatePath | ( | const std::string | libpath | ) |
| static

Validates a script path (script loaded by a hook) against the supported path.

Parameters

  libpath | script path to validate.

Returns
  validated path

Definition at line 49 of file hooks_parser.cc.

References getHookScriptsPath().

Referenced by isc::legal_log::RotatingFile::apply(), and isc::run_script::RunScriptImpl::setName().

Here is the call graph for this function:

The documentation for this class was generated from the following files:

- hooks_parser.h
- hooks_parser.cc