OpenVPN
|
#include "syshead.h"
#include "buffer.h"
#include "error.h"
#include "platform.h"
#include "win32.h"
#include "memdbg.h"
#include "run_command.h"
Go to the source code of this file.
Functions | |
int | script_security (void) |
void | script_security_set (int level) |
static const char * | system_error_message (int stat, struct gc_arena *gc) |
bool | openvpn_execve_allowed (const unsigned int flags) |
int | openvpn_execve_check (const struct argv *a, const struct env_set *es, const unsigned int flags, const char *error_message) |
int | openvpn_popen (const struct argv *a, const struct env_set *es) |
Variables | |
static int | script_security_level = SSEC_BUILT_IN |
bool openvpn_execve_allowed | ( | const unsigned int | flags | ) |
Definition at line 110 of file run_command.c.
References S_SCRIPT, script_security(), SSEC_BUILT_IN, and SSEC_SCRIPTS.
Referenced by openvpn_execve().
int openvpn_execve_check | ( | const struct argv * | a, |
const struct env_set * | es, | ||
const unsigned int | flags, | ||
const char * | error_message | ||
) |
Definition at line 193 of file run_command.c.
References es, gc_free(), gc_new(), M_FATAL, M_WARN, msg, openvpn_execve(), platform_ret_code(), platform_system_ok(), S_EXITCODE, S_FATAL, and system_error_message().
Referenced by add_route(), add_route_ipv6(), cleanup(), delete_route(), delete_route_ipv6(), do_ifconfig_ipv4(), do_ifconfig_ipv6(), exec_command(), init(), ipconfig_register_dns(), openvpn_run_script(), set_lladdr(), undo_ifconfig_ipv4(), and undo_ifconfig_ipv6().
Definition at line 230 of file run_command.c.
References argv::argv, es, gc_free(), gc_new(), M_ERR, M_FATAL, M_WARN, make_env_array(), msg, OPENVPN_EXECVE_FAILURE, script_security(), SCRIPT_SECURITY_WARNING, SSEC_BUILT_IN, SSEC_SCRIPTS, and status.
int script_security | ( | void | ) |
Definition at line 43 of file run_command.c.
References script_security_level.
Referenced by do_option_warnings(), env_allowed(), openvpn_execve(), openvpn_execve_allowed(), and openvpn_popen().
void script_security_set | ( | int | level | ) |
Definition at line 49 of file run_command.c.
References script_security_level.
Referenced by add_option().
|
static |
Definition at line 58 of file run_command.c.
References alloc_buf_gc(), buf_printf(), buffer::data, OPENVPN_EXECVE_ERROR, OPENVPN_EXECVE_FAILURE, and OPENVPN_EXECVE_NOT_ALLOWED.
Referenced by openvpn_execve_check().
|
static |
Definition at line 40 of file run_command.c.
Referenced by script_security(), and script_security_set().