mirror of https://github.com/Icinga/icinga2.git
Implement the escape_shell_arg and escape_shell_cmd functions
fixes #10004
This commit is contained in:
parent
32dcd106fb
commit
a530bb955d
|
@ -21,6 +21,8 @@ get_time() | Returns the current UNIX timestamp.
|
|||
parse_performance_data(pd) | Parses a performance data string and returns an array describing the values.
|
||||
dirname(path) | Returns the directory portion of the specified path.
|
||||
basename(path) | Returns the filename portion of the specified path.
|
||||
escape\_shell\_arg(text) | Escapes a string for use as a single shell argument.
|
||||
escape\_shell\_cmd(text) | Escapes shell meta characters in a string.
|
||||
escape\_create\_process\_arg(text)| (Windows only) Escapes a string for use as an argument for CreateProcess().
|
||||
exit(integer) | Terminates the application.
|
||||
|
||||
|
|
|
@ -58,10 +58,11 @@ REGISTER_SCRIPTFUNCTION(get_time, &Utility::GetTime);
|
|||
REGISTER_SCRIPTFUNCTION(basename, &Utility::BaseName);
|
||||
REGISTER_SCRIPTFUNCTION(dirname, &Utility::DirName);
|
||||
REGISTER_SCRIPTFUNCTION(msi_get_component_path, &ScriptUtils::MsiGetComponentPathShim);
|
||||
REGISTER_SCRIPTFUNCTION(escape_shell_cmd, &Utility::EscapeShellCmd);
|
||||
REGISTER_SCRIPTFUNCTION(escape_shell_arg, &Utility::EscapeShellArg);
|
||||
#ifdef _WIN32
|
||||
REGISTER_SCRIPTFUNCTION(escape_create_process_arg, &Utility::EscapeCreateProcessArg);
|
||||
#endif /* _WIN32 */
|
||||
>>>>>>> 08ccb4e... Build fix
|
||||
|
||||
String ScriptUtils::CastString(const Value& value)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue