OpenVPN
|
#include "service.h"
#include <stdio.h>
#include <stdarg.h>
#include <stdbool.h>
#include <process.h>
Go to the source code of this file.
Data Structures | |
struct | security_attributes |
Macros | |
#define | CLEAR(x) memset(&(x), 0, sizeof(x)) |
Functions | |
bool | init_security_attributes_allow_all (struct security_attributes *obj) |
HANDLE | create_event (LPCTSTR name, bool allow_all, bool initial_state, bool manual_reset) |
void | close_if_open (HANDLE h) |
static bool | match (const WIN32_FIND_DATA *find, LPCTSTR ext) |
static bool | modext (LPTSTR dest, size_t size, LPCTSTR src, LPCTSTR newext) |
static DWORD WINAPI | ServiceCtrlAutomatic (DWORD ctrl_code, DWORD event, LPVOID data, LPVOID ctx) |
VOID WINAPI | ServiceStartAutomaticOwn (DWORD dwArgc, LPTSTR *lpszArgv) |
VOID WINAPI | ServiceStartAutomatic (DWORD dwArgc, LPTSTR *lpszArgv) |
Variables | |
static SERVICE_STATUS_HANDLE | service |
static SERVICE_STATUS | status = { .dwServiceType = SERVICE_WIN32_SHARE_PROCESS } |
openvpn_service_t | automatic_service |
static HANDLE | exit_event = NULL |
#define CLEAR | ( | x | ) | memset(&(x), 0, sizeof(x)) |
Definition at line 62 of file automatic.c.
Referenced by init_security_attributes_allow_all(), and ServiceStartAutomatic().
void close_if_open | ( | HANDLE | h | ) |
Definition at line 103 of file automatic.c.
HANDLE create_event | ( | LPCTSTR | name, |
bool | allow_all, | ||
bool | initial_state, | ||
bool | manual_reset | ||
) |
Definition at line 85 of file automatic.c.
References init_security_attributes_allow_all(), and security_attributes::sa.
Referenced by ServiceStartAutomatic().
bool init_security_attributes_allow_all | ( | struct security_attributes * | obj | ) |
Definition at line 66 of file automatic.c.
References CLEAR, security_attributes::sa, and security_attributes::sd.
Referenced by create_event(), and ServiceStartAutomatic().
|
static |
Definition at line 112 of file automatic.c.
Referenced by buf_string_match_head(), read_key_file(), RemoveListItem(), and ServiceStartAutomatic().
|
static |
Definition at line 134 of file automatic.c.
Referenced by ServiceStartAutomatic().
|
static |
Definition at line 167 of file automatic.c.
References exit_event, ReportStatusToSCMgr(), service, and status.
Referenced by ServiceStartAutomatic().
VOID WINAPI ServiceStartAutomatic | ( | DWORD | dwArgc, |
LPTSTR * | lpszArgv | ||
) |
Definition at line 199 of file automatic.c.
References settings_t::append, CLEAR, settings_t::config_dir, create_event(), settings_t::exe_path, exit_event, settings_t::ext_string, finish(), GetOpenvpnSettings(), init_security_attributes_allow_all(), settings_t::log_dir, M_ERR, M_SYSERR, match(), modext(), MsgToEventLog(), openvpn_service_t::name, openvpn_sntprintf(), PACKAGE, settings_t::priority, ReportStatusToSCMgr(), security_attributes::sa, service, service_instance, ServiceCtrlAutomatic(), settings, and status.
Referenced by _tmain(), and ServiceStartAutomaticOwn().
VOID WINAPI ServiceStartAutomaticOwn | ( | DWORD | dwArgc, |
LPTSTR * | lpszArgv | ||
) |
Definition at line 191 of file automatic.c.
References ServiceStartAutomatic(), and status.
Referenced by _tmain().
openvpn_service_t automatic_service |
Definition at line 45 of file automatic.c.
Referenced by _tmain().
|
static |
Definition at line 59 of file automatic.c.
Referenced by ServiceCtrlAutomatic(), and ServiceStartAutomatic().
|
static |
Definition at line 42 of file automatic.c.
Referenced by CmdInstallServices(), CmdRemoveServices(), CmdStartService(), port_from_servname(), ServiceCtrlAutomatic(), and ServiceStartAutomatic().
|
static |
Definition at line 43 of file automatic.c.
Referenced by add_route(), add_route_ipapi(), add_route_ipv6(), close_tun(), CmdRemoveServices(), cmprintf_group_finish_tap(), del_route_ipapi(), delete_route(), delete_temp_addresses(), dhcp_release_by_adapter_index(), dhcp_renew_by_adapter_index(), do_preresolve(), do_preresolve_host(), do_route_ipv6_service(), establish_http_proxy_passthru(), finish(), fork_to_self(), get_adapter_info_list(), get_console_input_win32(), get_default_gateway_ipv6(), get_device_instance_id_interface(), get_interface_info_list(), get_pa_var(), get_panel_reg(), get_per_adapter_info(), get_tap_reg(), get_windows_routing_table(), getaddr(), GetOpenvpnSettings(), GetRegString(), helper_client_server(), in_extra_dispatch(), in_src_get(), incoming_push_message(), init_route(), io_wait_dowork(), link_socket_write_win32(), man_block(), man_client_deny(), man_client_kill(), man_connect(), man_kill(), man_proxy(), man_record_peer_info(), man_remote(), man_send_cc_message(), man_settings_init(), man_standalone_event_loop(), management_callback_send_cc_message(), management_io(), msg_test(), multi_get_create_instance_udp(), multi_process_io_udp(), multi_tcp_wait(), net_event_win32_reset_write(), netsh_command(), openvpn_connect(), openvpn_getaddrinfo(), openvpn_plugin_func_v1(), openvpn_plugin_open_v3(), openvpn_popen(), pam_auth(), platform_ret_code(), plugin_call_item(), plugin_call_ssl(), print_sockaddr_ex(), priv_enc_CNG(), process_io(), read_incoming_link(), recv_line(), recv_socks_reply(), resolve_bind_local(), resolve_remote(), schedule_remove_entry(), sd_close(), semaphore_lock(), send_push_options(), send_push_reply(), ServiceCtrlAutomatic(), ServiceStartAutomatic(), ServiceStartAutomaticOwn(), set_win_sys_path_via_env(), socket_connect(), socket_finalize(), socket_listen_accept(), socket_recv_queue(), socket_send_queue(), socks_handshake(), socks_username_password_auth(), strerror_win32(), tap_allow_nonadmin_access_handle(), test_adapter_ip_netmask(), tls_pre_decrypt_lite(), tls_process(), tun_finalize(), tun_read_queue(), tun_write_queue(), tun_write_win32(), tunnel_server_tcp(), tuntap_set_connected(), tuntap_set_ip_addr(), tuntap_set_ptp(), we_wait(), win_wfp_block_dns(), and write_tun_buffered().