OpenVPN
|
#include "openvpn.h"
Go to the source code of this file.
Macros | |
#define | BASE_N_EVENTS 5 |
#define | IVM_LEVEL_1 (1<<0) |
#define | IVM_LEVEL_2 (1<<1) |
#define | CC_GC_FREE (1<<0) |
#define | CC_USR1_TO_HUP (1<<1) |
#define | CC_HARD_USR1_TO_HUP (1<<2) |
#define | CC_NO_CLOSE (1<<3) |
#define | ISC_ERRORS (1<<0) |
#define | ISC_SERVER (1<<1) |
#define | ISC_ROUTE_ERRORS (1<<2) |
Functions | |
void | context_clear (struct context *c) |
void | context_clear_1 (struct context *c) |
void | context_clear_2 (struct context *c) |
void | context_init_1 (struct context *c) |
void | context_clear_all_except_first_time (struct context *c) |
bool | init_static (void) |
void | uninit_static (void) |
void | init_verb_mute (struct context *c, unsigned int flags) |
void | init_options_dev (struct options *options) |
bool | print_openssl_info (const struct options *options) |
bool | do_genkey (const struct options *options) |
bool | do_persist_tuntap (struct options *options, openvpn_net_ctx_t *ctx) |
bool | possibly_become_daemon (const struct options *options) |
void | pre_setup (const struct options *options) |
void | init_instance_handle_signals (struct context *c, const struct env_set *env, const unsigned int flags) |
void | init_instance (struct context *c, const struct env_set *env, const unsigned int flags) |
void | init_query_passwords (const struct context *c) |
Query for private key and auth-user-pass username/passwords. More... | |
bool | do_route (const struct options *options, struct route_list *route_list, struct route_ipv6_list *route_ipv6_list, const struct tuntap *tt, const struct plugin_list *plugins, struct env_set *es, openvpn_net_ctx_t *ctx) |
void | close_instance (struct context *c) |
bool | do_test_crypto (const struct options *o) |
void | context_gc_free (struct context *c) |
bool | do_up (struct context *c, bool pulled_options, unsigned int option_types_found) |
unsigned int | pull_permission_mask (const struct context *c) |
const char * | format_common_name (struct context *c, struct gc_arena *gc) |
void | reset_coarse_timers (struct context *c) |
bool | do_deferred_options (struct context *c, const unsigned int found) |
void | inherit_context_child (struct context *dest, const struct context *src) |
void | inherit_context_top (struct context *dest, const struct context *src) |
void | close_context (struct context *c, int sig, unsigned int flags) |
struct context_buffers * | init_context_buffers (const struct frame *frame) |
void | free_context_buffers (struct context_buffers *b) |
void | initialization_sequence_completed (struct context *c, const unsigned int flags) |
void | init_management (void) |
bool | open_management (struct context *c) |
void | close_management (void) |
void | management_show_net_callback (void *arg, const int msglevel) |
void | init_management_callback_p2p (struct context *c) |
void | uninit_management_callback (void) |
void | init_plugins (struct context *c) |
void | open_plugins (struct context *c, const bool import_options, int init_point) |
void | tun_abort (void) |
void | write_pid_file (const char *filename, const char *chroot_dir) |
void | remove_pid_file (void) |
void | persist_client_stats (struct context *c) |
void close_context | ( | struct context * | c, |
int | sig, | ||
unsigned int | flags | ||
) |
Definition at line 4914 of file init.c.
References ASSERT, CC_GC_FREE, CC_HARD_USR1_TO_HUP, CC_NO_CLOSE, CC_USR1_TO_HUP, close_instance(), context_gc_free(), register_signal(), context::sig, SIG_SOURCE_HARD, signal_info::signal_received, and signal_info::source.
Referenced by init_instance(), multi_close_instance(), and multi_top_free().
void close_instance | ( | struct context * | c | ) |
Definition at line 4711 of file init.c.
References context::c2, CM_CHILD_TCP, CM_CHILD_UDP, CM_P2P, CM_TOP, dco_remove_peer(), do_close_event_set(), do_close_fragment(), do_close_free_buf(), do_close_free_key_schedule(), do_close_ifconfig_pool_persist(), do_close_link_socket(), do_close_packet_id(), do_close_plugins(), do_close_status_output(), do_close_tls(), do_close_tun(), do_env_set_destroy(), context_2::gc, gc_free(), management_notify_client_close(), context_2::mda_context, context::mode, and uninit_proxy().
Referenced by close_context(), tunnel_point_to_point(), tunnel_server_tcp(), and tunnel_server_udp().
void close_management | ( | void | ) |
Definition at line 4345 of file init.c.
References management_close().
Referenced by open_management(), and openvpn_main().
void context_clear | ( | struct context * | c | ) |
Definition at line 76 of file init.c.
References CLEAR.
Referenced by context_clear_all_except_first_time(), and do_test_crypto().
void context_clear_1 | ( | struct context * | c | ) |
Definition at line 82 of file init.c.
References context::c1, and CLEAR.
Referenced by context_init_1().
void context_clear_2 | ( | struct context * | c | ) |
Definition at line 88 of file init.c.
References context::c2, and CLEAR.
Referenced by tunnel_point_to_point(), tunnel_server_tcp(), and tunnel_server_udp().
void context_clear_all_except_first_time | ( | struct context * | c | ) |
Definition at line 94 of file init.c.
References context_clear(), context::first_time, and context::persist.
Referenced by openvpn_main().
void context_gc_free | ( | struct context * | c | ) |
Definition at line 777 of file init.c.
References context::c2, context_2::gc, options::gc, context::gc, gc_free(), and context::options.
Referenced by close_context(), openvpn_main(), and test_crypto_thread().
void context_init_1 | ( | struct context * | c | ) |
Definition at line 730 of file init.c.
References context::c1, CLEAR, context_clear_1(), context::first_time, get_user_pass(), GET_USER_PASS_MANAGEMENT, GET_USER_PASS_NEED_OK, init_connection_list(), M_INFO, MAX_PARMS, msg, context::options, packet_id_persist_init(), user_pass::password, context_1::pid_persist, and user_pass::username.
Referenced by openvpn_main(), and test_crypto_thread().
bool do_deferred_options | ( | struct context * | c, |
const unsigned int | found | ||
) |
Definition at line 2593 of file init.c.
References context::c2, options::ce, check_compression_settings_valid(), check_pull_client_ncp(), options::comp, D_PUSH, D_PUSH_DEBUG, D_PUSH_ERRORS, dco_check_pull_options(), dco_enabled(), do_init_timers(), do_init_traffic_shaper(), connection_entry::explicit_exit_notification, context_2::frame, init_verb_mute(), IVM_LEVEL_1, IVM_LEVEL_2, context_2::link_socket, link_socket_update_buffer_sizes(), link_socket_update_flags(), min_int(), msg, OPT_P_COMP, OPT_P_DHCPDNS, OPT_P_EXPLICIT_NOTIFY, OPT_P_MESSAGES, OPT_P_PEER_ID, OPT_P_PERSIST, OPT_P_PUSH_MTU, OPT_P_ROUTE, OPT_P_ROUTE_EXTRAS, OPT_P_SETENV, OPT_P_SHAPER, OPT_P_SOCKBUF, OPT_P_SOCKFLAGS, OPT_P_TIMER, OPT_P_UP, context::options, tls_multi::peer_id, options::peer_id, connection_entry::proto, proto_is_udp(), options::pull, options::rcvbuf, options::sndbuf, options::sockflags, context_2::tls_multi, frame::tun_max_mtu, connection_entry::tun_mtu, frame::tun_mtu, and tls_multi::use_peer_id.
Referenced by do_up(), and multi_client_connect_late_setup().
bool do_genkey | ( | const struct options * | options | ) |
Definition at line 1012 of file init.c.
References auth_token_write_server_key_file(), D_GENKEY, options::genkey, GENKEY_AUTH_TOKEN, options::genkey_extra_data, options::genkey_filename, GENKEY_SECRET, GENKEY_TLS_CRYPTV2_CLIENT, GENKEY_TLS_CRYPTV2_SERVER, options::genkey_type, M_FATAL, M_NOPREFIX, M_USAGE, M_WARN, options::mlock, msg, platform_mlockall(), options::shared_secret_file, options::tls_crypt_v2_file, options::tls_crypt_v2_file_inline, tls_crypt_v2_write_client_key_file(), tls_crypt_v2_write_server_key_file(), and write_key_file().
Referenced by openvpn_main().
bool do_persist_tuntap | ( | struct options * | options, |
openvpn_net_ctx_t * | ctx | ||
) |
Definition at line 1095 of file init.c.
References options::ce, dco_enabled(), options::dev, options::dev_node, options::dev_type, dev_type_enum(), DEV_TYPE_TUN, tuntap_options::disable_dco, options::groupname, options::ifconfig_local, options::ifconfig_remote_netmask, options::lladdr, M_FATAL, M_OPTERR, M_WARN, msg, notnull(), options::persist_config, options::persist_mode, connection_entry::remote, set_lladdr(), options::shared_secret_file, options::tls_client, options::tls_server, tuncfg(), options::tuntap_options, and options::username.
Referenced by openvpn_main().
bool do_route | ( | const struct options * | options, |
struct route_list * | route_list, | ||
struct route_ipv6_list * | route_ipv6_list, | ||
const struct tuntap * | tt, | ||
const struct plugin_list * | plugins, | ||
struct env_set * | es, | ||
openvpn_net_ctx_t * | ctx | ||
) |
Definition at line 1686 of file init.c.
References add_routes(), argv_free(), argv_new(), argv_parse_cmd(), check_debug_level(), D_SHOW_NET, es, M_INFO, M_NOPREFIX, M_WARN, management_up_down(), msg, OPENVPN_PLUGIN_FUNC_SUCCESS, OPENVPN_PLUGIN_ROUTE_UP, openvpn_run_script(), plugin_call(), plugin_defined(), route_did_redirect_default_gateway(), options::route_noexec, ROUTE_OPTION_FLAGS, options::route_script, setenv_int(), setenv_str(), show_adapters(), options::show_net_up, and show_routes().
Referenced by check_add_routes_action(), and do_open_tun().
bool do_test_crypto | ( | const struct options * | o | ) |
Definition at line 5013 of file init.c.
References context_clear(), context::first_time, M_INFO, msg, context::options, options_detach(), options::test_crypto, test_crypto_thread(), and title_string.
Referenced by openvpn_main().
bool do_up | ( | struct context * | c, |
bool | pulled_options, | ||
unsigned int | option_types_found | ||
) |
Definition at line 2372 of file init.c.
References context::c1, context::c2, CAS_CONNECT_DONE, CAS_RECONNECT_PENDING, D_DCO, D_PUSH_ERRORS, D_TLS_ERRORS, dco_p2p_add_new_peer(), context_2::did_open_tun, do_close_tun(), do_deferred_options(), do_deferred_options_part2(), do_deferred_p2p_ncp(), do_open_tun(), context_2::do_up_ran, event_timeout_init(), initialization_sequence_completed(), context_2::link_socket, M_INFO, M_NONFATAL, management_sleep(), options::mode, context::mode, MODE_POINT_TO_POINT, msg, tls_multi::multi_state, now, context::options, options_hash_changed_or_zero(), p2p_set_dco_keepalive(), PULL_DEFINED, context_2::pulled_options_digest, context_1::pulled_options_digest_save, reset_coarse_timers(), ROUTE_AFTER_TUN, options::route_delay, options::route_delay_defined, options::route_delay_window, route_order(), context_2::route_wakeup, context_2::route_wakeup_expire, link_socket::sd, SOCKET_UNDEFINED, context_2::tls_multi, tls_print_deferred_options_results(), tun_standby_init(), context_1::tuntap, tuntap_is_dco_win(), options::up_delay, and update_time().
Referenced by check_connection_established(), and incoming_push_message().
Definition at line 1284 of file init.c.
References alloc_buf_gc(), BSTR, buf_printf(), context::c2, tls_common_name(), and context_2::tls_multi.
Referenced by trigger_ping_timeout_signal().
void free_context_buffers | ( | struct context_buffers * | b | ) |
Definition at line 3667 of file init.c.
References context_buffers::aux_buf, context_buffers::decrypt_buf, context_buffers::encrypt_buf, free_buf(), context_buffers::read_link_buf, and context_buffers::read_tun_buf.
Referenced by do_close_free_buf(), and multi_top_free().
Definition at line 4786 of file init.c.
References context_2::accept_from, ALLOC_OBJ_CLEAR_GC, ALLOC_OBJ_GC, key_schedule::auth_token_key, options::authname, context_2::buffers, context::c1, context::c2, CC_NO_CLOSE, CC_USR1_TO_HUP, options::ce, options::ciphername, CLEAR, CM_CHILD_TCP, CM_CHILD_UDP, link_socket_info::connection_established, do_inherit_plugins(), context_2::es, context::gc, gc_new(), link_socket::info, init_instance(), IS_SIG, key_schedule::key_type, context_1::ks, context_2::link_socket, context_1::link_socket_addr, context_2::link_socket_info, link_socket_info::lsa, context::mode, context::options, options_detach(), packet_id_persist_init(), context_1::pid_persist, connection_entry::proto, proto_is_dgram(), context::sig, key_schedule::ssl_ctx, key_schedule::tls_auth_key_type, key_schedule::tls_crypt_v2_server_key, key_schedule::tls_wrap_key, and context_1::tuntap.
Referenced by multi_create_instance().
Definition at line 4864 of file init.c.
References context_2::buffers_owned, context::c0, context::c1, context::c2, options::ce, CM_TOP_CLONE, do_event_set_init(), context_2::es_owned, context_2::event_set, context_2::event_set_owned, context::first_time, context_2::gc, context::gc, gc_detach(), context_1::ifconfig_pool_persist_owned, context_2::link_socket_owned, context::mode, context::options, options_detach(), context::plugins_owned, connection_entry::proto, proto_is_dgram(), context_1::status_output_owned, context_2::tls_multi, and context_1::tuntap_owned.
Referenced by multi_top_init().
struct context_buffers* init_context_buffers | ( | const struct frame * | frame | ) |
Definition at line 3642 of file init.c.
References alloc_buf(), ALLOC_OBJ_CLEAR, context_buffers::aux_buf, BUF_SIZE, context_buffers::decrypt_buf, context_buffers::encrypt_buf, context_buffers::read_link_buf, and context_buffers::read_tun_buf.
Referenced by do_init_buffers(), and multi_top_init().
Definition at line 4406 of file init.c.
References AR_INTERACT, auth_retry_get(), context::c1, context::c2, options::ce, CF_INIT_TLS_AUTH_STANDALONE, CF_INIT_TLS_MULTI, CF_LOAD_PERSISTED_PACKET_ID, close_context(), CM_CHILD_TCP, CM_CHILD_UDP, CM_P2P, CM_TOP, options::comp, context_2::did_open_tun, do_compute_occ_strings(), do_event_set_init(), do_inherit_env(), do_init_buffers(), do_init_crypto(), do_init_first_time(), do_init_fragment(), do_init_frame(), do_init_frame_tls(), do_init_server_poll_timeout(), do_init_timers(), do_init_traffic_shaper(), do_link_socket_new(), do_open_ifconfig_pool_persist(), do_open_status_output(), do_open_tun(), do_option_warnings(), do_preresolve(), do_print_data_channel_mtu_parms(), do_setup_fast_io(), do_signal_on_tls_errors(), do_startup_pause(), do_uid_gid_chroot(), context::first_time, connection_entry::fragment, context_2::fragment, fragment_init(), context_2::frame, frame_calculate_dynamic(), context_2::gc, gc_init(), get_link_socket_info(), init_management_callback_p2p(), init_proxy(), init_query_passwords(), init_verb_mute(), IS_SIG, IVM_LEVEL_2, key_schedule::key_type, context_1::ks, link_socket_init_phase1(), link_socket_init_phase2(), LS_MODE_DEFAULT, LS_MODE_TCP_ACCEPT_FROM, LS_MODE_TCP_LISTEN, options::mlock, context::mode, next_connection_entry(), context_2::occ_op, occ_reset_op(), open_plugins(), OPENVPN_PLUGIN_INIT_POST_DAEMON, OPENVPN_PLUGIN_INIT_POST_UID_CHANGE, OPENVPN_PLUGIN_INIT_PRE_DAEMON, context::options, P2P_ERROR_DELAY_MS, platform_mlockall(), pre_connect_restore(), connection_entry::proto, PROTO_TCP_SERVER, PULL_DEFINED, options::resolve_in_advance, set_check_status_error_delay(), SHAPER_DEFINED, context::sig, signal_info::signal_text, and options::up_delay.
Referenced by inherit_context_child(), and init_instance_handle_signals().
void init_instance_handle_signals | ( | struct context * | c, |
const struct env_set * | env, | ||
const unsigned int | flags | ||
) |
Definition at line 4384 of file init.c.
References management_callback::flags, init_instance(), IS_SIG, post_init_signal_catch(), pre_init_signal_catch(), remap_signal(), and uninit_management_callback().
Referenced by tunnel_point_to_point(), tunnel_server_tcp(), and tunnel_server_udp().
void init_management | ( | void | ) |
void init_management_callback_p2p | ( | struct context * | c | ) |
Definition at line 4260 of file init.c.
References management_callback::arg, CLEAR, management_callback_proxy_cmd(), management_callback_remote_cmd(), management_callback_remote_entry_count(), management_callback_remote_entry_get(), management_callback_send_cc_message(), management_callback_status_p2p(), management_set_callback(), management_show_net_callback(), management_callback::proxy_cmd, management_callback::remote_cmd, management_callback::remote_entry_count, management_callback::remote_entry_get, management_callback::send_cc_message, management_callback::show_net, and management_callback::status.
Referenced by init_instance().
void init_options_dev | ( | struct options * | options | ) |
Definition at line 963 of file init.c.
References basename(), options::dev, options::dev_node, and string_alloc().
Referenced by openvpn_main().
void init_plugins | ( | struct context * | c | ) |
Definition at line 4128 of file init.c.
References context::options, options::plugin_list, plugin_list_init(), context::plugins, and context::plugins_owned.
Referenced by openvpn_main().
void init_query_passwords | ( | const struct context * | c | ) |
Query for private key and auth-user-pass username/passwords.
Definition at line 641 of file init.c.
References options::auth_user_pass_file, options::auth_user_pass_file_inline, auth_user_pass_setup(), enable_auth_user_pass(), options::key_pass_file, context::options, pem_password_setup(), and options::sc_info.
Referenced by init_instance(), and openvpn_main().
bool init_static | ( | void | ) |
Definition at line 816 of file init.c.
References error_reset(), gc_free(), gc_new(), init_ssl_lib(), init_win32(), M_INFO, M_WARN, msg, platform_create_temp_file(), reset_check_status(), sleep, srandom, status_close(), status_open(), STATUS_OUTPUT_WRITE, status_printf(), time_test(), and update_time().
Referenced by openvpn_main().
void init_verb_mute | ( | struct context * | c, |
unsigned int | flags | ||
) |
Definition at line 940 of file init.c.
References context::c2, check_debug_level(), D_LINK_ERRORS, D_LOG_RW, D_READ_WRITE, status_output::flags, IVM_LEVEL_1, IVM_LEVEL_2, context_2::log_rw, options::mute, context::options, SDL_CONSTRAIN, set_check_status(), set_debug_level(), set_mute_cutoff(), and options::verbosity.
Referenced by do_deferred_options(), init_early(), init_instance(), openvpn_main(), and test_crypto_thread().
void initialization_sequence_completed | ( | struct context * | c, |
const unsigned int | flags | ||
) |
Definition at line 1571 of file init.c.
References link_socket_addr::actual, openvpn_sockaddr::addr, addr_defined(), context::c1, context::c2, CLEAR, link_socket_actual::dest, do_uid_gid_chroot(), fork_register_dns_action(), get_link_socket_info(), openvpn_sockaddr::in4, openvpn_sockaddr::in6, ISC_ERRORS, ISC_ROUTE_ERRORS, ISC_SERVER, context_2::link_socket, tuntap::local, tuntap::local_ipv6, link_socket_info::lsa, M_INFO, M_NOPREFIX, management_post_tunnel_open(), management_set_state(), msg, options::no_advance, OPENVPN_STATE_CONNECTED, context::options, openvpn_sockaddr::sa, link_socket::sd, show_adapters(), show_routes(), context_1::tuntap, and options::unsuccessful_attempts.
Referenced by check_add_routes_action(), do_up(), tunnel_server_tcp(), and tunnel_server_udp().
void management_show_net_callback | ( | void * | arg, |
const int | msglevel | ||
) |
Definition at line 4207 of file init.c.
References msg, show_adapters(), and show_routes().
Referenced by init_management_callback_multi(), and init_management_callback_p2p().
bool open_management | ( | struct context * | c | ) |
Definition at line 4295 of file init.c.
References close_management(), do_hold(), management_callback::flags, IS_SIG, M_WARN, options::management_addr, options::management_client_group, options::management_client_user, options::management_echo_buffer_size, options::management_flags, options::management_log_history_cache, management_open(), options::management_port, management_set_state(), options::management_state_buffer_size, options::management_user_pass, MF_SERVER, options::mode, MODE_SERVER, msg, OPENVPN_STATE_CONNECTING, context::options, and options::remap_sigusr1.
Referenced by openvpn_main().
void open_plugins | ( | struct context * | c, |
const bool | import_options, | ||
int | init_point | ||
) |
Definition at line 4138 of file init.c.
References context::c2, D_IMPORT_ERRORS, context_2::es, context::es, plugin_return::list, M_OPTERR, plugin_return::n, OPT_P_DEFAULT, OPT_P_PLUGIN, context::options, options_string_import(), options::plugin_list, plugin_list_open(), plugin_return_defined(), plugin_return_free(), plugin_return_get_column(), plugin_return_init(), context::plugins, context::plugins_owned, and openvpn_plugin_string_list::value.
Referenced by init_instance(), and openvpn_main().
void persist_client_stats | ( | struct context * | c | ) |
Definition at line 4369 of file init.c.
References man_persist_client_stats().
Referenced by tunnel_point_to_point().
bool possibly_become_daemon | ( | const struct options * | options | ) |
Definition at line 1158 of file init.c.
References daemon(), options::daemon, options::log, M_ERR, msg, restore_signal_state(), and set_std_files_to_null().
Referenced by openvpn_main().
void pre_setup | ( | const struct options * | options | ) |
Definition at line 1295 of file init.c.
References options::config, options::exit_event_initial_state, options::exit_event_name, win32_signal::mode, win32_signal_open(), window_title_generate(), window_title_save(), WSO_FORCE_CONSOLE, WSO_FORCE_SERVICE, and WSO_MODE_CONSOLE.
Referenced by openvpn_main().
bool print_openssl_info | ( | const struct options * | options | ) |
Definition at line 973 of file init.c.
References options::cipher_list, options::cipher_list_tls13, show_available_ciphers(), show_available_curves(), show_available_digests(), show_available_engines(), show_available_tls_ciphers(), options::show_ciphers, options::show_curves, options::show_digests, options::show_engines, options::show_tls_ciphers, and options::tls_cert_profile.
Referenced by openvpn_main().
unsigned int pull_permission_mask | ( | const struct context * | c | ) |
Definition at line 2516 of file init.c.
References OPT_P_COMP, OPT_P_DHCPDNS, OPT_P_ECHO, OPT_P_EXPLICIT_NOTIFY, OPT_P_MESSAGES, OPT_P_NCP, OPT_P_PEER_ID, OPT_P_PERSIST, OPT_P_PULL_MODE, OPT_P_PUSH_MTU, OPT_P_ROUTE, OPT_P_ROUTE_EXTRAS, OPT_P_SETENV, OPT_P_SHAPER, OPT_P_SOCKBUF, OPT_P_SOCKFLAGS, OPT_P_TIMER, OPT_P_UP, context::options, and options::route_nopull.
Referenced by incoming_push_message().
void remove_pid_file | ( | void | ) |
Definition at line 4976 of file init.c.
References platform_unlink(), and saved_pid_file_name.
Referenced by openvpn_exit().
void reset_coarse_timers | ( | struct context * | c | ) |
Definition at line 1323 of file init.c.
References context::c2, and context_2::coarse_timer_wakeup.
Referenced by check_connection_established(), check_tls(), do_init_timers(), do_up(), process_explicit_exit_notification_init(), and schedule_exit().
void tun_abort | ( | void | ) |
Definition at line 2154 of file init.c.
References do_close_tun(), and static_context.
Referenced by openvpn_exit().
void uninit_management_callback | ( | void | ) |
Definition at line 4358 of file init.c.
References management_clear_callback().
Referenced by init_instance_handle_signals(), tunnel_point_to_point(), tunnel_server_tcp(), and tunnel_server_udp().
void uninit_static | ( | void | ) |
void write_pid_file | ( | const char * | filename, |
const char * | chroot_dir | ||
) |
Definition at line 4946 of file init.c.
References options::chroot_dir, M_ERR, msg, platform_fopen(), platform_getpid(), and saved_pid_file_name.
Referenced by openvpn_main().