OpenVPN
|
Go to the source code of this file.
Functions | |
static char * | construct_name_value (const char *name, const char *value, struct gc_arena *gc) |
static bool | env_string_equal (const char *s1, const char *s2) |
static bool | remove_env_item (const char *str, const bool do_free, struct env_item **list) |
static void | add_env_item (char *str, const bool do_alloc, struct env_item **list, struct gc_arena *gc) |
static bool | env_set_del_nolock (struct env_set *es, const char *str) |
static void | env_set_add_nolock (struct env_set *es, const char *str) |
struct env_set * | env_set_create (struct gc_arena *gc) |
void | env_set_destroy (struct env_set *es) |
bool | env_set_del (struct env_set *es, const char *str) |
void | env_set_add (struct env_set *es, const char *str) |
const char * | env_set_get (const struct env_set *es, const char *name) |
void | env_set_print (int msglevel, const struct env_set *es) |
void | env_set_inherit (struct env_set *es, const struct env_set *src) |
void | setenv_counter (struct env_set *es, const char *name, counter_type value) |
void | setenv_int (struct env_set *es, const char *name, int value) |
void | setenv_long_long (struct env_set *es, const char *name, long long value) |
void | setenv_str (struct env_set *es, const char *name, const char *value) |
void | setenv_str_safe (struct env_set *es, const char *name, const char *value) |
void | setenv_str_incr (struct env_set *es, const char *name, const char *value) |
Store the supplied name value pair in the env_set. More... | |
void | setenv_del (struct env_set *es, const char *name) |
void | setenv_str_ex (struct env_set *es, const char *name, const char *value, const unsigned int name_include, const unsigned int name_exclude, const char name_replace, const unsigned int value_include, const unsigned int value_exclude, const char value_replace) |
static const char * | setenv_format_indexed_name (const char *name, const int i, struct gc_arena *gc) |
void | setenv_int_i (struct env_set *es, const char *name, const int value, const int i) |
void | setenv_str_i (struct env_set *es, const char *name, const char *value, const int i) |
bool | env_allowed (const char *str) |
const char ** | make_env_array (const struct env_set *es, const bool check_allowed, struct gc_arena *gc) |
|
static |
Definition at line 127 of file env_set.c.
References ALLOC_OBJ_GC, ASSERT, env_item::next, env_item::string, and string_alloc().
Referenced by env_set_add_nolock().
|
static |
Definition at line 48 of file env_set.c.
References alloc_buf_gc(), ASSERT, BSTR, and buf_printf().
Referenced by setenv_str_ex().
bool env_allowed | ( | const char * | str | ) |
Definition at line 413 of file env_set.c.
References is_password_env_var(), script_security(), and SSEC_PW_ENV.
Referenced by env_block(), and make_env_array().
void env_set_add | ( | struct env_set * | es, |
const char * | str | ||
) |
Definition at line 193 of file env_set.c.
References ASSERT, env_set_add_nolock(), and es.
Referenced by do_ifconfig_ipv4(), do_ifconfig_ipv6(), output_peer_info_env(), and setenv_str_ex().
|
static |
Definition at line 149 of file env_set.c.
References add_env_item(), es, env_set::gc, env_set::list, and remove_env_item().
Referenced by env_set_add(), and env_set_inherit().
Definition at line 156 of file env_set.c.
References ALLOC_OBJ_CLEAR_GC, es, env_set::gc, and env_set::list.
Referenced by do_ifconfig_ipv4(), do_ifconfig_ipv6(), do_inherit_env(), init(), learn_address_script(), man_output_extra_env(), openvpn_main(), and tls_crypt_v2_verify_metadata().
bool env_set_del | ( | struct env_set * | es, |
const char * | str | ||
) |
Definition at line 183 of file env_set.c.
References ASSERT, env_set_del_nolock(), and es.
Referenced by setenv_str_ex(), tls_x509_clear_env(), and verify_cert_cert_delete_env().
|
static |
Definition at line 143 of file env_set.c.
References es, env_set::gc, env_set::list, and remove_env_item().
Referenced by env_set_del().
void env_set_destroy | ( | struct env_set * | es | ) |
Definition at line 166 of file env_set.c.
References es, env_set::gc, env_set::list, env_item::next, and env_item::string.
Referenced by cleanup(), do_env_set_destroy(), do_ifconfig_ipv4(), do_ifconfig_ipv6(), openvpn_main(), and tls_crypt_v2_verify_metadata().
const char* env_set_get | ( | const struct env_set * | es, |
const char * | name | ||
) |
Definition at line 201 of file env_set.c.
References env_string_equal(), es, env_set::list, env_item::next, and env_item::string.
Referenced by setenv_str_incr().
Definition at line 238 of file env_set.c.
References ASSERT, env_set_add_nolock(), es, env_set::list, env_item::next, and env_item::string.
Referenced by do_inherit_env().
void env_set_print | ( | int | msglevel, |
const struct env_set * | es | ||
) |
Definition at line 212 of file env_set.c.
References check_debug_level(), env_safe_to_print(), es, env_set::list, msg, env_item::next, and env_item::string.
|
static |
Definition at line 63 of file env_set.c.
References ASSERT.
Referenced by env_set_get(), and remove_env_item().
const char** make_env_array | ( | const struct env_set * | es, |
const bool | check_allowed, | ||
struct gc_arena * | gc | ||
) |
Definition at line 421 of file env_set.c.
References ALLOC_ARRAY_CLEAR_GC, ASSERT, env_allowed(), es, env_set::list, env_item::next, and env_item::string.
Referenced by openvpn_popen(), plugin_call_ssl(), and plugin_common_open().
|
static |
Definition at line 94 of file env_set.c.
References ASSERT, env_string_equal(), env_item::next, secure_memzero(), and env_item::string.
Referenced by env_set_add_nolock(), and env_set_del_nolock().
void setenv_counter | ( | struct env_set * | es, |
const char * | name, | ||
counter_type | value | ||
) |
Definition at line 259 of file env_set.c.
References counter_format, es, and setenv_str().
Referenced by setenv_stats().
void setenv_del | ( | struct env_set * | es, |
const char * | name | ||
) |
Definition at line 328 of file env_set.c.
References ASSERT, es, and setenv_str().
Referenced by ccs_delete_config_file(), ccs_delete_deferred_ret_file(), export_user_keying_material(), key_method_2_read(), multi_set_virtual_addr_env(), plugin_call_ssl(), verify_crresponse_plugin(), verify_user_pass_management(), verify_user_pass_plugin(), and verify_user_pass_script().
|
static |
Definition at line 380 of file env_set.c.
References alloc_buf_gc(), BSTR, and buf_printf().
Referenced by setenv_int_i(), and setenv_str_i().
void setenv_int | ( | struct env_set * | es, |
const char * | name, | ||
int | value | ||
) |
Definition at line 267 of file env_set.c.
References es, and setenv_str().
Referenced by do_ifconfig_setenv(), do_route(), man_output_extra_env(), multi_set_virtual_addr_env(), run_up_down(), setenv_int_i(), setenv_route(), setenv_route_ipv6(), setenv_settings(), and setenv_sockaddr().
void setenv_int_i | ( | struct env_set * | es, |
const char * | name, | ||
const int | value, | ||
const int | i | ||
) |
Definition at line 395 of file env_set.c.
References es, gc_free(), gc_new(), setenv_format_indexed_name(), and setenv_int().
void setenv_long_long | ( | struct env_set * | es, |
const char * | name, | ||
long long | value | ||
) |
Definition at line 275 of file env_set.c.
References es, and setenv_str().
Referenced by multi_client_connect_setenv(), multi_client_disconnect_setenv(), and setenv_settings().
void setenv_str | ( | struct env_set * | es, |
const char * | name, | ||
const char * | value | ||
) |
Definition at line 283 of file env_set.c.
Referenced by add_option(), add_session_token_env(), ccs_gen_config_file(), ccs_gen_deferred_ret_file(), do_ifconfig_setenv(), do_route(), do_setenv_x509(), export_user_keying_material(), init(), init_route_ipv6_list(), key_state_gen_auth_control_files(), learn_address_script(), link_socket_connection_initiated(), multi_client_connect_call_script(), multi_client_connect_setenv(), multi_client_disconnect_script(), run_up_down(), set_common_name(), set_verify_user_pass_env(), set_win_sys_path(), setenv_counter(), setenv_del(), setenv_dns_option(), setenv_int(), setenv_long_long(), setenv_route_addr(), setenv_route_ipv6(), setenv_settings(), setenv_sockaddr(), setenv_str_i(), setenv_str_incr(), setenv_str_safe(), tls_crypt_v2_verify_metadata(), verify_cert_call_command(), verify_cert_cert_export_env(), verify_cert_set_env(), verify_crresponse_plugin(), verify_crresponse_script(), verify_user_pass_management(), verify_user_pass_plugin(), and verify_user_pass_script().
void setenv_str_ex | ( | struct env_set * | es, |
const char * | name, | ||
const char * | value, | ||
const unsigned int | name_include, | ||
const unsigned int | name_exclude, | ||
const char | name_replace, | ||
const unsigned int | value_include, | ||
const unsigned int | value_exclude, | ||
const char | value_replace | ||
) |
Definition at line 335 of file env_set.c.
References ASSERT, construct_name_value(), env_set_add(), env_set_del(), es, gc_free(), gc_new(), M_INFO, msg, and string_mod_const().
Referenced by setenv_str().
void setenv_str_i | ( | struct env_set * | es, |
const char * | name, | ||
const char * | value, | ||
const int | i | ||
) |
Definition at line 404 of file env_set.c.
References es, gc_free(), gc_new(), setenv_format_indexed_name(), and setenv_str().
Referenced by setenv_connection_entry().
void setenv_str_incr | ( | struct env_set * | es, |
const char * | name, | ||
const char * | value | ||
) |
Store the supplied name value pair in the env_set.
If the variable with the supplied name already exists, append _N to the name, starting at N=1.
Definition at line 305 of file env_set.c.
References ASSERT, D_TLS_DEBUG_MED, env_set_get(), es, gc_malloc(), msg, and setenv_str().
Referenced by x509_setenv().
void setenv_str_safe | ( | struct env_set * | es, |
const char * | name, | ||
const char * | value | ||
) |
Definition at line 289 of file env_set.c.
References BSTR, buf_printf(), buf_set_write(), es, M_WARN, msg, and setenv_str().
Referenced by add_option().