mirror of https://github.com/OpenVPN/openvpn-gui
remove support for openvpn version < 2.0
parent
e16665bee6
commit
7c4bea3f7e
|
@ -226,7 +226,6 @@ BEGIN
|
||||||
IDS_ERR_CREATE_EDIT_LOGWINDOW "Erstellen des RichEdit LogWindow fehlgeschlagen!!"
|
IDS_ERR_CREATE_EDIT_LOGWINDOW "Erstellen des RichEdit LogWindow fehlgeschlagen!!"
|
||||||
IDS_ERR_SET_SIZE "Setzen der Grösse ist fehlgeschlagen!"
|
IDS_ERR_SET_SIZE "Setzen der Grösse ist fehlgeschlagen!"
|
||||||
IDS_ERR_AUTOSTART_CONF "Kann gewünschte Konfigurationdatei für Autostart nicht finden: %s"
|
IDS_ERR_AUTOSTART_CONF "Kann gewünschte Konfigurationdatei für Autostart nicht finden: %s"
|
||||||
IDS_ERR_VERSION_CREATE_EVENT "CreateEvent() beim überprüfen der OpenVPN version fehlgeschlagen."
|
|
||||||
IDS_ERR_CREATE_PIPE_IN_READ "CreatePipe an hInputRead fehlgeschlagen."
|
IDS_ERR_CREATE_PIPE_IN_READ "CreatePipe an hInputRead fehlgeschlagen."
|
||||||
IDS_NFO_STATE_CONNECTING "Aktueller Status: Verbinden"
|
IDS_NFO_STATE_CONNECTING "Aktueller Status: Verbinden"
|
||||||
IDS_NFO_CONNECTION_XXX "OpenVPN Verbindung (%s)"
|
IDS_NFO_CONNECTION_XXX "OpenVPN Verbindung (%s)"
|
||||||
|
|
|
@ -221,7 +221,6 @@ BEGIN
|
||||||
IDS_ERR_CREATE_EDIT_LOGWINDOW "Creating RichEdit LogWindow Failed!!"
|
IDS_ERR_CREATE_EDIT_LOGWINDOW "Creating RichEdit LogWindow Failed!!"
|
||||||
IDS_ERR_SET_SIZE "Set Size failed!"
|
IDS_ERR_SET_SIZE "Set Size failed!"
|
||||||
IDS_ERR_AUTOSTART_CONF "Cannot find requested config to autostart: %s"
|
IDS_ERR_AUTOSTART_CONF "Cannot find requested config to autostart: %s"
|
||||||
IDS_ERR_VERSION_CREATE_EVENT "CreateEvent() failed when checking openvpn version."
|
|
||||||
IDS_ERR_CREATE_PIPE_IN_READ "CreatePipe on hInputRead failed."
|
IDS_ERR_CREATE_PIPE_IN_READ "CreatePipe on hInputRead failed."
|
||||||
IDS_NFO_STATE_CONNECTING "Current State: Connecting"
|
IDS_NFO_STATE_CONNECTING "Current State: Connecting"
|
||||||
IDS_NFO_CONNECTION_XXX "OpenVPN Connection (%s)"
|
IDS_NFO_CONNECTION_XXX "OpenVPN Connection (%s)"
|
||||||
|
|
|
@ -208,7 +208,6 @@ BEGIN
|
||||||
IDS_ERR_CREATE_EDIT_LOGWINDOW "La creación de RichEdit LogWindow falló!!"
|
IDS_ERR_CREATE_EDIT_LOGWINDOW "La creación de RichEdit LogWindow falló!!"
|
||||||
IDS_ERR_SET_SIZE "Set Size falló!"
|
IDS_ERR_SET_SIZE "Set Size falló!"
|
||||||
IDS_ERR_AUTOSTART_CONF "No se encuentra la configuración requerida para el autoinicio: %s"
|
IDS_ERR_AUTOSTART_CONF "No se encuentra la configuración requerida para el autoinicio: %s"
|
||||||
IDS_ERR_VERSION_CREATE_EVENT "CreateEvent() falló al chequear la versión de OpenVPN."
|
|
||||||
IDS_ERR_CREATE_PIPE_IN_READ "CreatePipe on hInputRead falló."
|
IDS_ERR_CREATE_PIPE_IN_READ "CreatePipe on hInputRead falló."
|
||||||
IDS_NFO_STATE_CONNECTING "Estado actual: Conectando"
|
IDS_NFO_STATE_CONNECTING "Estado actual: Conectando"
|
||||||
IDS_NFO_CONNECTION_XXX "Conexión OpenVPN (%s)"
|
IDS_NFO_CONNECTION_XXX "Conexión OpenVPN (%s)"
|
||||||
|
|
|
@ -221,7 +221,6 @@ BEGIN
|
||||||
IDS_ERR_CREATE_EDIT_LOGWINDOW "RichEdit LogWindowin luonti epäonnistui!"
|
IDS_ERR_CREATE_EDIT_LOGWINDOW "RichEdit LogWindowin luonti epäonnistui!"
|
||||||
IDS_ERR_SET_SIZE "Koon määrittäminen epäonnistui!"
|
IDS_ERR_SET_SIZE "Koon määrittäminen epäonnistui!"
|
||||||
IDS_ERR_AUTOSTART_CONF "Ei löydetty automaattisesti käynnistettävää asetustiedostoa %s"
|
IDS_ERR_AUTOSTART_CONF "Ei löydetty automaattisesti käynnistettävää asetustiedostoa %s"
|
||||||
IDS_ERR_VERSION_CREATE_EVENT "CreateEvent() failed when checking openvpn version."
|
|
||||||
IDS_ERR_CREATE_PIPE_IN_READ "CreatePipe on hInputRead failed."
|
IDS_ERR_CREATE_PIPE_IN_READ "CreatePipe on hInputRead failed."
|
||||||
IDS_NFO_STATE_CONNECTING "Tila: Yhdistetään"
|
IDS_NFO_STATE_CONNECTING "Tila: Yhdistetään"
|
||||||
IDS_NFO_CONNECTION_XXX "OpenVPN-yhteys (%s)"
|
IDS_NFO_CONNECTION_XXX "OpenVPN-yhteys (%s)"
|
||||||
|
|
|
@ -219,7 +219,6 @@ BEGIN
|
||||||
IDS_ERR_CREATE_EDIT_LOGWINDOW "Creating RichEdit LogWindow échoué !"
|
IDS_ERR_CREATE_EDIT_LOGWINDOW "Creating RichEdit LogWindow échoué !"
|
||||||
IDS_ERR_SET_SIZE "Set Size échoué !"
|
IDS_ERR_SET_SIZE "Set Size échoué !"
|
||||||
IDS_ERR_AUTOSTART_CONF "Impossible de trouver la configuration pour démarrer automatiquement: %s"
|
IDS_ERR_AUTOSTART_CONF "Impossible de trouver la configuration pour démarrer automatiquement: %s"
|
||||||
IDS_ERR_VERSION_CREATE_EVENT "CreateEvent() échoué après vérification de la version OpenVPN."
|
|
||||||
IDS_ERR_CREATE_PIPE_IN_READ "CreatePipe sur hInputRead échoué."
|
IDS_ERR_CREATE_PIPE_IN_READ "CreatePipe sur hInputRead échoué."
|
||||||
IDS_NFO_STATE_CONNECTING "Etat actuel: En cours de connexion"
|
IDS_NFO_STATE_CONNECTING "Etat actuel: En cours de connexion"
|
||||||
IDS_NFO_CONNECTION_XXX "Connexion OpenVPN (%s)"
|
IDS_NFO_CONNECTION_XXX "Connexion OpenVPN (%s)"
|
||||||
|
|
|
@ -207,7 +207,6 @@ BEGIN
|
||||||
IDS_ERR_CREATE_EDIT_LOGWINDOW "Creazione RichEdit LogWindow Fallita!!"
|
IDS_ERR_CREATE_EDIT_LOGWINDOW "Creazione RichEdit LogWindow Fallita!!"
|
||||||
IDS_ERR_SET_SIZE "Set Size fallita!"
|
IDS_ERR_SET_SIZE "Set Size fallita!"
|
||||||
IDS_ERR_AUTOSTART_CONF "Non riesco a trovare una configurazione per partire in automatico: %s"
|
IDS_ERR_AUTOSTART_CONF "Non riesco a trovare una configurazione per partire in automatico: %s"
|
||||||
IDS_ERR_VERSION_CREATE_EVENT "CreateEvent() fallito quando ha cercato la versione di openvpn."
|
|
||||||
IDS_ERR_CREATE_PIPE_IN_READ "CreatePipe on hInputRead falito."
|
IDS_ERR_CREATE_PIPE_IN_READ "CreatePipe on hInputRead falito."
|
||||||
IDS_NFO_STATE_CONNECTING "Stato corrente: Connessione in corso"
|
IDS_NFO_STATE_CONNECTING "Stato corrente: Connessione in corso"
|
||||||
IDS_NFO_CONNECTION_XXX "Connessione OpenVPN (%s)"
|
IDS_NFO_CONNECTION_XXX "Connessione OpenVPN (%s)"
|
||||||
|
|
|
@ -207,7 +207,6 @@ BEGIN
|
||||||
IDS_ERR_CREATE_EDIT_LOGWINDOW "Creatie van RichEdit LogWindow mislukt!"
|
IDS_ERR_CREATE_EDIT_LOGWINDOW "Creatie van RichEdit LogWindow mislukt!"
|
||||||
IDS_ERR_SET_SIZE "Instellen afmetingen mislukt!"
|
IDS_ERR_SET_SIZE "Instellen afmetingen mislukt!"
|
||||||
IDS_ERR_AUTOSTART_CONF "Kan opgegeven configuratie voor automatische verbinding niet vinden: %s"
|
IDS_ERR_AUTOSTART_CONF "Kan opgegeven configuratie voor automatische verbinding niet vinden: %s"
|
||||||
IDS_ERR_VERSION_CREATE_EVENT "CreateEvent() mislukt tijdens verificatie OpenVPN versie."
|
|
||||||
IDS_ERR_CREATE_PIPE_IN_READ "CreatePipe tijdens hInputRead mislukt."
|
IDS_ERR_CREATE_PIPE_IN_READ "CreatePipe tijdens hInputRead mislukt."
|
||||||
IDS_NFO_STATE_CONNECTING "Huidige Status: Verbinden"
|
IDS_NFO_STATE_CONNECTING "Huidige Status: Verbinden"
|
||||||
IDS_NFO_CONNECTION_XXX "OpenVPN Verbinding (%s)"
|
IDS_NFO_CONNECTION_XXX "OpenVPN Verbinding (%s)"
|
||||||
|
|
|
@ -212,7 +212,6 @@ BEGIN
|
||||||
IDS_ERR_CREATE_EDIT_LOGWINDOW "Opprettelse av RichEdit LogWindow feilet!!"
|
IDS_ERR_CREATE_EDIT_LOGWINDOW "Opprettelse av RichEdit LogWindow feilet!!"
|
||||||
IDS_ERR_SET_SIZE "Set Size feilet!"
|
IDS_ERR_SET_SIZE "Set Size feilet!"
|
||||||
IDS_ERR_AUTOSTART_CONF "Følgende konfig kunne ikke starte automatisk: %s"
|
IDS_ERR_AUTOSTART_CONF "Følgende konfig kunne ikke starte automatisk: %s"
|
||||||
IDS_ERR_VERSION_CREATE_EVENT "CreateEvent() feilet under sjekk av openvpn version."
|
|
||||||
IDS_ERR_CREATE_PIPE_IN_READ "CreatePipe på hInputRead feilet."
|
IDS_ERR_CREATE_PIPE_IN_READ "CreatePipe på hInputRead feilet."
|
||||||
IDS_NFO_STATE_CONNECTING "Status: Kobler til"
|
IDS_NFO_STATE_CONNECTING "Status: Kobler til"
|
||||||
IDS_NFO_CONNECTION_XXX "OpenVPN Tilkoblet (%s)"
|
IDS_NFO_CONNECTION_XXX "OpenVPN Tilkoblet (%s)"
|
||||||
|
|
|
@ -208,7 +208,6 @@ BEGIN
|
||||||
IDS_ERR_CREATE_EDIT_LOGWINDOW "Creating RichEdit LogWindow falhou!!"
|
IDS_ERR_CREATE_EDIT_LOGWINDOW "Creating RichEdit LogWindow falhou!!"
|
||||||
IDS_ERR_SET_SIZE "Set Size falhou!"
|
IDS_ERR_SET_SIZE "Set Size falhou!"
|
||||||
IDS_ERR_AUTOSTART_CONF "Impossível encontrar configurações para autostart: %s"
|
IDS_ERR_AUTOSTART_CONF "Impossível encontrar configurações para autostart: %s"
|
||||||
IDS_ERR_VERSION_CREATE_EVENT "CreateEvent() falhou ao verificar a versão do openvpn."
|
|
||||||
IDS_ERR_CREATE_PIPE_IN_READ "CreatePipe em hInputRead falhou."
|
IDS_ERR_CREATE_PIPE_IN_READ "CreatePipe em hInputRead falhou."
|
||||||
IDS_NFO_STATE_CONNECTING "Estado atual: Conectando"
|
IDS_NFO_STATE_CONNECTING "Estado atual: Conectando"
|
||||||
IDS_NFO_CONNECTION_XXX "Conexão OpenVPN (%s)"
|
IDS_NFO_CONNECTION_XXX "Conexão OpenVPN (%s)"
|
||||||
|
|
|
@ -213,7 +213,6 @@ BEGIN
|
||||||
IDS_ERR_CREATE_EDIT_LOGWINDOW "Skapande av RichEdit LogWindow misslyckades!!"
|
IDS_ERR_CREATE_EDIT_LOGWINDOW "Skapande av RichEdit LogWindow misslyckades!!"
|
||||||
IDS_ERR_SET_SIZE "Set Size misslyckades!"
|
IDS_ERR_SET_SIZE "Set Size misslyckades!"
|
||||||
IDS_ERR_AUTOSTART_CONF "Följande konfig gick inte att automatiskt starta: %s"
|
IDS_ERR_AUTOSTART_CONF "Följande konfig gick inte att automatiskt starta: %s"
|
||||||
IDS_ERR_VERSION_CREATE_EVENT "CreateEvent() misslyckades vid kontroll av openvpn version."
|
|
||||||
IDS_ERR_CREATE_PIPE_IN_READ "CreatePipe på hInputRead misslyckades."
|
IDS_ERR_CREATE_PIPE_IN_READ "CreatePipe på hInputRead misslyckades."
|
||||||
IDS_NFO_STATE_CONNECTING "Status: Ansluter"
|
IDS_NFO_STATE_CONNECTING "Status: Ansluter"
|
||||||
IDS_NFO_CONNECTION_XXX "OpenVPN Anslutning (%s)"
|
IDS_NFO_CONNECTION_XXX "OpenVPN Anslutning (%s)"
|
||||||
|
|
|
@ -152,7 +152,6 @@
|
||||||
#define IDS_ERR_CREATE_EDIT_LOGWINDOW 1236
|
#define IDS_ERR_CREATE_EDIT_LOGWINDOW 1236
|
||||||
#define IDS_ERR_SET_SIZE 1237
|
#define IDS_ERR_SET_SIZE 1237
|
||||||
#define IDS_ERR_AUTOSTART_CONF 1238
|
#define IDS_ERR_AUTOSTART_CONF 1238
|
||||||
#define IDS_ERR_VERSION_CREATE_EVENT 1239
|
|
||||||
#define IDS_ERR_CREATE_PIPE_IN_READ 1240
|
#define IDS_ERR_CREATE_PIPE_IN_READ 1240
|
||||||
#define IDS_NFO_STATE_CONNECTING 1241
|
#define IDS_NFO_STATE_CONNECTING 1241
|
||||||
#define IDS_NFO_CONNECTION_XXX 1242
|
#define IDS_NFO_CONNECTION_XXX 1242
|
||||||
|
|
467
openvpn.c
467
openvpn.c
|
@ -2,6 +2,7 @@
|
||||||
* OpenVPN-GUI -- A Windows GUI for OpenVPN.
|
* OpenVPN-GUI -- A Windows GUI for OpenVPN.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2004 Mathias Sundman <mathias@nilings.se>
|
* Copyright (C) 2004 Mathias Sundman <mathias@nilings.se>
|
||||||
|
* 2010 Heiko Hund <heikoh@users.sf.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -23,7 +24,6 @@
|
||||||
* <jim@yonan.net>.
|
* <jim@yonan.net>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -51,47 +51,17 @@ extern options_t o;
|
||||||
* Creates a unique exit_event name based on the
|
* Creates a unique exit_event name based on the
|
||||||
* config file number.
|
* config file number.
|
||||||
*/
|
*/
|
||||||
int CreateExitEvent(int config)
|
static BOOL
|
||||||
{
|
CreateExitEvent(int config)
|
||||||
o.conn[config].exit_event = NULL;
|
|
||||||
if (o.oldversion == 1)
|
|
||||||
{
|
|
||||||
_sntprintf_0(o.conn[config].exit_event_name, _T("openvpn_exit"));
|
|
||||||
o.conn[config].exit_event = CreateEvent (NULL,
|
|
||||||
TRUE,
|
|
||||||
FALSE,
|
|
||||||
o.conn[config].exit_event_name);
|
|
||||||
if (o.conn[config].exit_event == NULL)
|
|
||||||
{
|
|
||||||
if (GetLastError() == ERROR_ACCESS_DENIED)
|
|
||||||
{
|
|
||||||
/* service mustn't be running, while using old version */
|
|
||||||
ShowLocalizedMsg(IDS_ERR_STOP_SERV_OLD_VER);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* error creating exit event */
|
|
||||||
ShowLocalizedMsg(IDS_ERR_CREATE_EVENT, o.conn[config].exit_event_name);
|
|
||||||
}
|
|
||||||
return(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
_sntprintf_0(o.conn[config].exit_event_name, _T("openvpngui_exit_event_%d"), config);
|
_sntprintf_0(o.conn[config].exit_event_name, _T("openvpngui_exit_event_%d"), config);
|
||||||
o.conn[config].exit_event = CreateEvent (NULL,
|
o.conn[config].exit_event = CreateEvent(NULL, TRUE, FALSE, o.conn[config].exit_event_name);
|
||||||
TRUE,
|
if (o.conn[config].exit_event == NULL) {
|
||||||
FALSE,
|
|
||||||
o.conn[config].exit_event_name);
|
|
||||||
if (o.conn[config].exit_event == NULL)
|
|
||||||
{
|
|
||||||
/* error creating exit event */
|
/* error creating exit event */
|
||||||
ShowLocalizedMsg(IDS_ERR_CREATE_EVENT, o.conn[config].exit_event_name);
|
ShowLocalizedMsg(IDS_ERR_CREATE_EVENT, o.conn[config].exit_event_name);
|
||||||
return(false);
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
return TRUE;
|
||||||
|
|
||||||
return(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -124,16 +94,69 @@ int SetProcessPriority(DWORD *priority)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static BOOL
|
||||||
|
GetPipeHandles(PHANDLE phInputRead, PHANDLE phInputWrite,
|
||||||
|
PHANDLE phOutputRead, PHANDLE phOutputWrite)
|
||||||
|
{
|
||||||
|
HANDLE hProc = GetCurrentProcess();
|
||||||
|
HANDLE hOutputReadTmp, hInputWriteTmp;
|
||||||
|
SECURITY_DESCRIPTOR sd;
|
||||||
|
SECURITY_ATTRIBUTES sa;
|
||||||
|
|
||||||
|
CLEAR(sa);
|
||||||
|
CLEAR(sd);
|
||||||
|
|
||||||
|
/* Make security attributes for the pipes so they can be inherited */
|
||||||
|
sa.nLength = sizeof(sa);
|
||||||
|
sa.lpSecurityDescriptor = &sd;
|
||||||
|
sa.bInheritHandle = TRUE;
|
||||||
|
if (!InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION)) {
|
||||||
|
ShowLocalizedMsg(IDS_ERR_INIT_SEC_DESC);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
if (!SetSecurityDescriptorDacl(&sd, TRUE, NULL, FALSE)) {
|
||||||
|
ShowLocalizedMsg(IDS_ERR_SET_SEC_DESC_ACL);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Create the stdin pipe with uninheritable write end */
|
||||||
|
if (!CreatePipe(phInputRead, &hInputWriteTmp, &sa, 0)) {
|
||||||
|
ShowLocalizedMsg(IDS_ERR_CREATE_PIPE_IN_READ);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
if (!DuplicateHandle(hProc, hInputWriteTmp, hProc, phInputWrite, 0, FALSE,
|
||||||
|
DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS)) {
|
||||||
|
ShowLocalizedMsg(IDS_ERR_DUP_HANDLE_IN_WRITE);
|
||||||
|
CloseHandle(*phInputRead);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Create the stdout pipe with uninheritable read end */
|
||||||
|
if (!CreatePipe(&hOutputReadTmp, phOutputWrite, &sa, 0)) {
|
||||||
|
ShowLocalizedMsg(IDS_ERR_CREATE_PIPE_OUTPUT);
|
||||||
|
CloseHandle(*phInputRead);
|
||||||
|
CloseHandle(*phInputWrite);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
if (!DuplicateHandle(hProc, hOutputReadTmp, hProc, phOutputRead, 0, FALSE,
|
||||||
|
DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS)) {
|
||||||
|
ShowLocalizedMsg(IDS_ERR_DUP_HANDLE_OUT_READ);
|
||||||
|
CloseHandle(*phInputRead);
|
||||||
|
CloseHandle(*phInputWrite);
|
||||||
|
CloseHandle(*phOutputWrite);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Launch an OpenVPN process
|
* Launch an OpenVPN process
|
||||||
*/
|
*/
|
||||||
int StartOpenVPN(int config)
|
int StartOpenVPN(int config)
|
||||||
{
|
{
|
||||||
|
|
||||||
HANDLE hOutputReadTmp = NULL;
|
|
||||||
HANDLE hOutputRead = NULL;
|
HANDLE hOutputRead = NULL;
|
||||||
HANDLE hOutputWrite = NULL;
|
HANDLE hOutputWrite = NULL;
|
||||||
HANDLE hInputWriteTmp = NULL;
|
|
||||||
HANDLE hInputRead = NULL;
|
HANDLE hInputRead = NULL;
|
||||||
HANDLE hInputWrite = NULL;
|
HANDLE hInputWrite = NULL;
|
||||||
HANDLE hErrorWrite = NULL;
|
HANDLE hErrorWrite = NULL;
|
||||||
|
@ -143,37 +166,11 @@ int StartOpenVPN(int config)
|
||||||
DWORD priority;
|
DWORD priority;
|
||||||
STARTUPINFO start_info;
|
STARTUPINFO start_info;
|
||||||
PROCESS_INFORMATION proc_info;
|
PROCESS_INFORMATION proc_info;
|
||||||
SECURITY_ATTRIBUTES sa;
|
|
||||||
SECURITY_DESCRIPTOR sd;
|
|
||||||
TCHAR command_line[256];
|
TCHAR command_line[256];
|
||||||
TCHAR proxy_string[100];
|
TCHAR proxy_string[100];
|
||||||
int i, is_connected=0;
|
|
||||||
|
|
||||||
CLEAR (start_info);
|
CLEAR (start_info);
|
||||||
CLEAR (proc_info);
|
CLEAR (proc_info);
|
||||||
CLEAR (sa);
|
|
||||||
CLEAR (sd);
|
|
||||||
|
|
||||||
|
|
||||||
/* If oldversion, allow only ONE connection */
|
|
||||||
if (o.oldversion == 1)
|
|
||||||
{
|
|
||||||
for (i=0; i < o.num_configs; i++)
|
|
||||||
{
|
|
||||||
if ((o.conn[i].state != disconnected) &&
|
|
||||||
(o.conn[i].state != disconnecting))
|
|
||||||
{
|
|
||||||
is_connected=1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (is_connected)
|
|
||||||
{
|
|
||||||
/* only one simultanious connection on old version */
|
|
||||||
ShowLocalizedMsg(IDS_ERR_ONE_CONN_OLD_VER);
|
|
||||||
return(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Warn if "log" or "log-append" option is found in config file */
|
/* Warn if "log" or "log-append" option is found in config file */
|
||||||
if ((ConfigFileOptionExist(config, "log ")) ||
|
if ((ConfigFileOptionExist(config, "log ")) ||
|
||||||
|
@ -207,46 +204,13 @@ int StartOpenVPN(int config)
|
||||||
ConstructProxyCmdLine(proxy_string, _tsizeof(proxy_string));
|
ConstructProxyCmdLine(proxy_string, _tsizeof(proxy_string));
|
||||||
|
|
||||||
/* construct command line */
|
/* construct command line */
|
||||||
if (o.oldversion == 1)
|
|
||||||
{
|
|
||||||
_sntprintf_0(command_line, _T("openvpn --config \"%s\" %s"),
|
|
||||||
o.conn[config].config_file, proxy_string);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_sntprintf_0(command_line, _T("openvpn --service %s 0 --config \"%s\" %s"),
|
_sntprintf_0(command_line, _T("openvpn --service %s 0 --config \"%s\" %s"),
|
||||||
o.conn[config].exit_event_name,
|
o.conn[config].exit_event_name,
|
||||||
o.conn[config].config_file,
|
o.conn[config].config_file,
|
||||||
proxy_string);
|
proxy_string);
|
||||||
}
|
|
||||||
|
|
||||||
|
if (!GetPipeHandles(&hInputRead, &hInputWrite, &hOutputRead, &hOutputWrite))
|
||||||
/* Make security attributes struct for logfile handle so it can
|
return false;
|
||||||
be inherited. */
|
|
||||||
sa.nLength = sizeof (sa);
|
|
||||||
sa.lpSecurityDescriptor = &sd;
|
|
||||||
sa.bInheritHandle = TRUE;
|
|
||||||
if (!InitializeSecurityDescriptor (&sd, SECURITY_DESCRIPTOR_REVISION))
|
|
||||||
{
|
|
||||||
/* Init Sec. Desc. failed */
|
|
||||||
ShowLocalizedMsg(IDS_ERR_INIT_SEC_DESC);
|
|
||||||
goto failed;
|
|
||||||
}
|
|
||||||
if (!SetSecurityDescriptorDacl (&sd, TRUE, NULL, FALSE))
|
|
||||||
{
|
|
||||||
/* set Dacl failed */
|
|
||||||
ShowLocalizedMsg(IDS_ERR_SET_SEC_DESC_ACL);
|
|
||||||
goto failed;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Create the child output pipe. */
|
|
||||||
if (!CreatePipe(&hOutputReadTmp,&hOutputWrite,&sa,0))
|
|
||||||
{
|
|
||||||
/* CreatePipe failed. */
|
|
||||||
ShowLocalizedMsg(IDS_ERR_CREATE_PIPE_OUTPUT);
|
|
||||||
goto failed;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create a duplicate of the output write handle for the std error
|
// Create a duplicate of the output write handle for the std error
|
||||||
// write handle. This is necessary in case the child application
|
// write handle. This is necessary in case the child application
|
||||||
|
@ -260,50 +224,6 @@ int StartOpenVPN(int config)
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the child input pipe.
|
|
||||||
if (!CreatePipe(&hInputRead,&hInputWriteTmp,&sa,0))
|
|
||||||
{
|
|
||||||
/* CreatePipe failed. */
|
|
||||||
ShowLocalizedMsg(IDS_ERR_CREATE_PIPE_INPUT);
|
|
||||||
goto failed;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create new output read handle and the input write handles. Set
|
|
||||||
// the Properties to FALSE. Otherwise, the child inherits the
|
|
||||||
// properties and, as a result, non-closeable handles to the pipes
|
|
||||||
// are created.
|
|
||||||
if (!DuplicateHandle(GetCurrentProcess(),hOutputReadTmp,
|
|
||||||
GetCurrentProcess(),
|
|
||||||
&hOutputRead, // Address of new handle.
|
|
||||||
0,FALSE, // Make it uninheritable.
|
|
||||||
DUPLICATE_SAME_ACCESS))
|
|
||||||
{
|
|
||||||
/* Duplicate Handle failed. */
|
|
||||||
ShowLocalizedMsg(IDS_ERR_DUP_HANDLE_OUT_READ);
|
|
||||||
goto failed;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!DuplicateHandle(GetCurrentProcess(),hInputWriteTmp,
|
|
||||||
GetCurrentProcess(),
|
|
||||||
&hInputWrite, // Address of new handle.
|
|
||||||
0,FALSE, // Make it uninheritable.
|
|
||||||
DUPLICATE_SAME_ACCESS))
|
|
||||||
{
|
|
||||||
/* DuplicateHandle failed */
|
|
||||||
ShowLocalizedMsg(IDS_ERR_DUP_HANDLE_IN_WRITE);
|
|
||||||
goto failed;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Close inheritable copies of the handles */
|
|
||||||
if (!CloseHandle(hOutputReadTmp) || !CloseHandle(hInputWriteTmp))
|
|
||||||
{
|
|
||||||
/* Close Handle failed */
|
|
||||||
ShowLocalizedMsg(IDS_ERR_CLOSE_HANDLE_TMP);
|
|
||||||
CloseHandle (o.conn[config].exit_event);
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
hOutputReadTmp=NULL;
|
|
||||||
hInputWriteTmp=NULL;
|
|
||||||
|
|
||||||
/* fill in STARTUPINFO struct */
|
/* fill in STARTUPINFO struct */
|
||||||
GetStartupInfo(&start_info);
|
GetStartupInfo(&start_info);
|
||||||
|
@ -623,241 +543,66 @@ int VerifyAutoConnections()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int CheckVersion()
|
BOOL
|
||||||
|
CheckVersion()
|
||||||
{
|
{
|
||||||
HANDLE hOutputReadTmp = NULL;
|
HANDLE hOutputRead;
|
||||||
HANDLE hOutputRead = NULL;
|
HANDLE hOutputWrite;
|
||||||
HANDLE hOutputWrite = NULL;
|
HANDLE hInputRead;
|
||||||
HANDLE hInputWriteTmp = NULL;
|
HANDLE hInputWrite;
|
||||||
HANDLE hInputRead = NULL;
|
|
||||||
HANDLE hInputWrite = NULL;
|
|
||||||
HANDLE exit_event;
|
|
||||||
|
|
||||||
STARTUPINFO start_info;
|
BOOL retval = FALSE;
|
||||||
PROCESS_INFORMATION proc_info;
|
STARTUPINFO si;
|
||||||
SECURITY_ATTRIBUTES sa;
|
PROCESS_INFORMATION pi;
|
||||||
SECURITY_DESCRIPTOR sd;
|
TCHAR cmdline[] = _T("openvpn --version");
|
||||||
TCHAR command_line[256];
|
char match_version[] = "OpenVPN 2.";
|
||||||
|
TCHAR pwd[MAX_PATH];
|
||||||
char line[1024];
|
char line[1024];
|
||||||
TCHAR bin_path[MAX_PATH];
|
TCHAR *p;
|
||||||
char *p;
|
|
||||||
int oldversion, i;
|
|
||||||
|
|
||||||
CLEAR (start_info);
|
CLEAR(si);
|
||||||
CLEAR (proc_info);
|
CLEAR(pi);
|
||||||
CLEAR (sa);
|
|
||||||
CLEAR (sd);
|
|
||||||
|
|
||||||
exit_event = CreateEvent (NULL, TRUE, FALSE, _T("openvpn_exit"));
|
if (!GetPipeHandles(&hInputRead, &hInputWrite, &hOutputRead, &hOutputWrite))
|
||||||
if (exit_event == NULL)
|
return FALSE;
|
||||||
{
|
|
||||||
#ifdef DEBUG
|
|
||||||
PrintErrorDebug("CreateEvent(openvpn_exit) failed.");
|
|
||||||
#endif
|
|
||||||
if (GetLastError() == ERROR_ACCESS_DENIED)
|
|
||||||
{
|
|
||||||
/* Assume we're running OpenVPN 1.5/1.6 and the service is started. */
|
|
||||||
o.oldversion=1;
|
|
||||||
strncpy(o.connect_string, "Successful ARP Flush", sizeof(o.connect_string));
|
|
||||||
return(true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* CreateEvent failed */
|
|
||||||
ShowLocalizedMsg(IDS_ERR_VERSION_CREATE_EVENT);
|
|
||||||
return(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
/* Construct the process' working directory */
|
||||||
PrintErrorDebug("CreateEvent(openvpn_exit) succeded.");
|
_tcsncpy(pwd, o.exe_path, _tsizeof(pwd));
|
||||||
#endif
|
p = _tcsrchr(pwd, _T('\\'));
|
||||||
|
if (p != NULL)
|
||||||
|
*p = _T('\0');
|
||||||
|
|
||||||
/* construct command line */
|
/* Fill in STARTUPINFO struct */
|
||||||
_sntprintf_0(command_line, _T("openvpn --version"));
|
si.cb = sizeof(si);
|
||||||
|
si.dwFlags = STARTF_USESTDHANDLES;
|
||||||
/* construct bin path */
|
si.hStdInput = hInputRead;
|
||||||
_tcsncpy(bin_path, o.exe_path, _tsizeof(bin_path));
|
si.hStdOutput = hOutputWrite;
|
||||||
for (i=_tcslen(bin_path) - 1; i > 0; i--)
|
si.hStdError = hOutputWrite;
|
||||||
if (bin_path[i] == '\\') break;
|
|
||||||
bin_path[i] = '\0';
|
|
||||||
|
|
||||||
/* Make security attributes struct for logfile handle so it can
|
|
||||||
be inherited. */
|
|
||||||
sa.nLength = sizeof (sa);
|
|
||||||
sa.lpSecurityDescriptor = &sd;
|
|
||||||
sa.bInheritHandle = TRUE;
|
|
||||||
if (!InitializeSecurityDescriptor (&sd, SECURITY_DESCRIPTOR_REVISION))
|
|
||||||
{
|
|
||||||
/* Init Sec. Desc. failed */
|
|
||||||
ShowLocalizedMsg(IDS_ERR_INIT_SEC_DESC);
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
if (!SetSecurityDescriptorDacl (&sd, TRUE, NULL, FALSE))
|
|
||||||
{
|
|
||||||
/* Set Dacl failed */
|
|
||||||
ShowLocalizedMsg(IDS_ERR_SET_SEC_DESC_ACL);
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Create the child input pipe. */
|
|
||||||
if (!CreatePipe(&hInputRead,&hInputWriteTmp,&sa,0))
|
|
||||||
{
|
|
||||||
/* create pipe failed */
|
|
||||||
ShowLocalizedMsg(IDS_ERR_CREATE_PIPE_IN_READ);
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Create the child output pipe. */
|
|
||||||
if (!CreatePipe(&hOutputReadTmp,&hOutputWrite,&sa,0))
|
|
||||||
{
|
|
||||||
/* CreatePipe failed */
|
|
||||||
ShowLocalizedMsg(IDS_ERR_CREATE_PIPE_OUTPUT);
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!DuplicateHandle(GetCurrentProcess(),hOutputReadTmp,
|
|
||||||
GetCurrentProcess(),
|
|
||||||
&hOutputRead, // Address of new handle.
|
|
||||||
0,FALSE, // Make it uninheritable.
|
|
||||||
DUPLICATE_SAME_ACCESS))
|
|
||||||
{
|
|
||||||
/* DuplicateHandle failed */
|
|
||||||
ShowLocalizedMsg(IDS_ERR_DUP_HANDLE_OUT_READ);
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!DuplicateHandle(GetCurrentProcess(),hInputWriteTmp,
|
|
||||||
GetCurrentProcess(),
|
|
||||||
&hInputWrite, // Address of new handle.
|
|
||||||
0,FALSE, // Make it uninheritable.
|
|
||||||
DUPLICATE_SAME_ACCESS))
|
|
||||||
{
|
|
||||||
/* DuplicateHandle failed */
|
|
||||||
ShowLocalizedMsg(IDS_ERR_DUP_HANDLE_IN_WRITE);
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Close inheritable copies of the handles */
|
|
||||||
if (!CloseHandle(hOutputReadTmp) || !CloseHandle(hInputWriteTmp))
|
|
||||||
{
|
|
||||||
/* CloseHandle failed */
|
|
||||||
ShowLocalizedMsg(IDS_ERR_CLOSE_HANDLE_TMP);
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* fill in STARTUPINFO struct */
|
|
||||||
GetStartupInfo(&start_info);
|
|
||||||
start_info.cb = sizeof(start_info);
|
|
||||||
start_info.dwFlags = STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW;
|
|
||||||
start_info.wShowWindow = SW_HIDE;
|
|
||||||
start_info.hStdInput = hInputRead;
|
|
||||||
start_info.hStdOutput = hOutputWrite;
|
|
||||||
start_info.hStdError = hOutputWrite;
|
|
||||||
|
|
||||||
/* Start OpenVPN to check version */
|
/* Start OpenVPN to check version */
|
||||||
if (!CreateProcess(o.exe_path,
|
if (!CreateProcess(o.exe_path, cmdline, NULL, NULL, TRUE,
|
||||||
command_line,
|
CREATE_NO_WINDOW, NULL, pwd, &si, &pi)) {
|
||||||
NULL,
|
ShowLocalizedMsg(IDS_ERR_CREATE_PROCESS, o.exe_path, cmdline, pwd);
|
||||||
NULL,
|
|
||||||
TRUE,
|
|
||||||
CREATE_NEW_CONSOLE,
|
|
||||||
NULL,
|
|
||||||
bin_path,
|
|
||||||
&start_info,
|
|
||||||
&proc_info))
|
|
||||||
{
|
|
||||||
/* CreateProcess failed */
|
|
||||||
ShowLocalizedMsg(IDS_ERR_CREATE_PROCESS,
|
|
||||||
o.exe_path,
|
|
||||||
command_line,
|
|
||||||
bin_path);
|
|
||||||
return(0);
|
|
||||||
}
|
}
|
||||||
|
else if (ReadLineFromStdOut(hOutputRead, 0, line)) {
|
||||||
/* Default value for oldversion */
|
|
||||||
oldversion=0;
|
|
||||||
|
|
||||||
/* Default string to look for to report "Connected". */
|
|
||||||
strncpy(o.connect_string, "Successful ARP Flush", sizeof(o.connect_string));
|
|
||||||
|
|
||||||
if (ReadLineFromStdOut(hOutputRead, 0, line) == 1)
|
|
||||||
{
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
PrintDebug("VersionString: %s", line);
|
PrintDebug("VersionString: %s", line);
|
||||||
#endif
|
#endif
|
||||||
if (line[8] == '2') /* Majorversion = 2 */
|
CloseHandle(pi.hThread);
|
||||||
{
|
CloseHandle(pi.hProcess);
|
||||||
if (line[10] == '0') /* Minorversion = 0 */
|
|
||||||
{
|
|
||||||
p=strstr(line, "beta");
|
|
||||||
if (p != NULL)
|
|
||||||
{
|
|
||||||
if (p[5] == ' ') /* 2.0-beta1 - 2.0-beta9 */
|
|
||||||
{
|
|
||||||
if (p[4] >= '6') /* 2.0-beta6 - 2.0-beta9 */
|
|
||||||
{
|
|
||||||
oldversion=0;
|
|
||||||
}
|
|
||||||
else /* < 2.0-beta6 */
|
|
||||||
{
|
|
||||||
oldversion=1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else /* >= 2.0-beta10 */
|
|
||||||
{
|
|
||||||
if (strncmp(&p[6], "ms", 2) == 0) /* 2.0-betaXXms */
|
|
||||||
strncpy(o.connect_string, "Initialization Sequence Completed",
|
|
||||||
sizeof(o.connect_string));
|
|
||||||
if ( !((p[4] == 1) && (p[5] == 0)) ) /* >= 2.0-beta11 */
|
|
||||||
strncpy(o.connect_string, "Initialization Sequence Completed",
|
|
||||||
sizeof(o.connect_string));
|
|
||||||
|
|
||||||
oldversion=0;
|
/* OpenVPN version 2.x */
|
||||||
|
if (strstr(line, match_version))
|
||||||
|
retval = TRUE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else /* 2.0 non-beta */
|
|
||||||
{
|
|
||||||
strncpy(o.connect_string, "Initialization Sequence Completed",
|
|
||||||
sizeof(o.connect_string));
|
|
||||||
oldversion=0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else /* > 2.0 */
|
|
||||||
{
|
|
||||||
strncpy(o.connect_string, "Initialization Sequence Completed",
|
|
||||||
sizeof(o.connect_string));
|
|
||||||
oldversion=0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (line[8] == '1') /* Majorversion = 1 */
|
|
||||||
{
|
|
||||||
oldversion=1;
|
|
||||||
}
|
|
||||||
else /* Majorversion != (1 || 2) */
|
|
||||||
{
|
|
||||||
oldversion=0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else return(0);
|
|
||||||
|
|
||||||
o.oldversion = oldversion;
|
if (!CloseHandle(hInputRead) || !CloseHandle(hInputWrite)
|
||||||
|
|| !CloseHandle(hOutputRead) || !CloseHandle(hOutputWrite))
|
||||||
|
|
||||||
if(!CloseHandle (proc_info.hThread) || !CloseHandle (hOutputWrite)
|
|
||||||
|| !CloseHandle (hInputRead) || !CloseHandle(exit_event))
|
|
||||||
{
|
|
||||||
/* CloseHandle failed */
|
|
||||||
ShowLocalizedMsg(IDS_ERR_CLOSE_HANDLE);
|
ShowLocalizedMsg(IDS_ERR_CLOSE_HANDLE);
|
||||||
return(0);
|
|
||||||
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
return(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CheckAndSetTrayIcon()
|
void CheckAndSetTrayIcon()
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,7 +32,7 @@ int ReadLineFromStdOut(HANDLE hStdOut, int config, char line[1024]);
|
||||||
BOOL CALLBACK StatusDialogFunc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
|
BOOL CALLBACK StatusDialogFunc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||||
int AutoStartConnections();
|
int AutoStartConnections();
|
||||||
int VerifyAutoConnections();
|
int VerifyAutoConnections();
|
||||||
int CheckVersion();
|
BOOL CheckVersion();
|
||||||
void CheckAndSetTrayIcon();
|
void CheckAndSetTrayIcon();
|
||||||
void SetStatusWinIcon(HWND hwndDlg, int IconID);
|
void SetStatusWinIcon(HWND hwndDlg, int IconID);
|
||||||
void ThreadOpenVPNStatus(int status) __attribute__ ((noreturn));
|
void ThreadOpenVPNStatus(int status) __attribute__ ((noreturn));
|
||||||
|
|
|
@ -40,6 +40,8 @@
|
||||||
|
|
||||||
extern options_t o;
|
extern options_t o;
|
||||||
|
|
||||||
|
static const char connect_string[] = "Initialization Sequence Completed";
|
||||||
|
|
||||||
/* Wait for a complete line (CR/LF) and return it.
|
/* Wait for a complete line (CR/LF) and return it.
|
||||||
* Return values:
|
* Return values:
|
||||||
* 1 - Successful. Line is available in *line.
|
* 1 - Successful. Line is available in *line.
|
||||||
|
@ -197,7 +199,7 @@ void monitor_openvpnlog_while_connecting(int config, char *line)
|
||||||
char *linepos;
|
char *linepos;
|
||||||
|
|
||||||
/* Check for Connected message */
|
/* Check for Connected message */
|
||||||
if (strstr(line, o.connect_string) != NULL)
|
if (strstr(line, connect_string) != NULL)
|
||||||
{
|
{
|
||||||
/* Run Connect Script */
|
/* Run Connect Script */
|
||||||
RunConnectScript(config, false);
|
RunConnectScript(config, false);
|
||||||
|
@ -317,7 +319,7 @@ void monitor_openvpnlog_while_reconnecting(int config, char *line)
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
/* Check for Connected message */
|
/* Check for Connected message */
|
||||||
if (strstr(line, o.connect_string) != NULL)
|
if (strstr(line, connect_string) != NULL)
|
||||||
{
|
{
|
||||||
o.conn[config].state = connected;
|
o.conn[config].state = connected;
|
||||||
SetTrayIcon(connected);
|
SetTrayIcon(connected);
|
||||||
|
|
|
@ -97,9 +97,7 @@ typedef struct {
|
||||||
connection_t conn[MAX_CONFIGS]; /* Connection structure */
|
connection_t conn[MAX_CONFIGS]; /* Connection structure */
|
||||||
int num_configs; /* Number of configs */
|
int num_configs; /* Number of configs */
|
||||||
|
|
||||||
BOOL oldversion; /* OpenVPN version below 2.0-beta6 if TRUE */
|
|
||||||
service_state_t service_state; /* State of the OpenVPN Service */
|
service_state_t service_state; /* State of the OpenVPN Service */
|
||||||
char connect_string[100]; /* String to look for to report connected */
|
|
||||||
int psw_attempts; /* Number of psw attemps to allow */
|
int psw_attempts; /* Number of psw attemps to allow */
|
||||||
int connectscript_timeout; /* Connect Script execution timeout (sec) */
|
int connectscript_timeout; /* Connect Script execution timeout (sec) */
|
||||||
int disconnectscript_timeout; /* Disconnect Script execution timeout (sec) */
|
int disconnectscript_timeout; /* Disconnect Script execution timeout (sec) */
|
||||||
|
|
Loading…
Reference in New Issue