aboutsummaryrefslogtreecommitdiff
path: root/win
diff options
context:
space:
mode:
authorJames Yonan <james@openvpn.net>2010-07-16 18:01:11 +0000
committerJames Yonan <james@openvpn.net>2010-07-16 18:01:11 +0000
commitb90c6f17b476b0ef1bd831f4a475425c94ba237f (patch)
treeba7a9f24437743b1c07ba8d396e0fbafadcc0762 /win
parentImplemented multi-address DNS expansion on the network field of route (diff)
downloadopenvpn-b90c6f17b476b0ef1bd831f4a475425c94ba237f.tar.xz
Added --register-dns option for Windows.
Fixed some issues on Windows with --log, subprocess creation for command execution, and stdout/stderr redirection. Version 2.1.1m. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6304 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to '')
-rw-r--r--win32.c8
-rw-r--r--win32.h1
2 files changed, 3 insertions, 6 deletions
diff --git a/win32.c b/win32.c
index 8fa898f..2a3350d 100644
--- a/win32.c
+++ b/win32.c
@@ -971,10 +971,8 @@ openvpn_execve (const struct argv *a, const struct env_set *es, const unsigned i
/* fill in STARTUPINFO struct */
GetStartupInfo(&start_info);
start_info.cb = sizeof(start_info);
- start_info.dwFlags = STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW;
+ start_info.dwFlags = STARTF_USESHOWWINDOW;
start_info.wShowWindow = SW_HIDE;
- start_info.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
- start_info.hStdOutput = start_info.hStdError = GetStdHandle(STD_OUTPUT_HANDLE);
if (CreateProcess (cmd, cl, NULL, NULL, FALSE, 0, env, NULL, &start_info, &proc_info))
{
@@ -1042,10 +1040,8 @@ fork_to_self (const char *cmdline)
/* fill in STARTUPINFO struct */
GetStartupInfo(&start_info);
start_info.cb = sizeof(start_info);
- start_info.dwFlags = STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW;
+ start_info.dwFlags = STARTF_USESHOWWINDOW;
start_info.wShowWindow = SW_HIDE;
- start_info.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
- start_info.hStdOutput = start_info.hStdError = GetStdHandle(STD_OUTPUT_HANDLE);
if (CreateProcess (self_exe, cl, NULL, NULL, FALSE, 0, NULL, NULL, &start_info, &proc_info))
{
diff --git a/win32.h b/win32.h
index b661169..f974b06 100644
--- a/win32.h
+++ b/win32.h
@@ -33,6 +33,7 @@
#define DEFAULT_WIN_SYS_PATH "C:\\WINDOWS" /* --win-sys default value */
#define NETSH_PATH_SUFFIX "\\system32\\netsh.exe"
#define WIN_ROUTE_PATH_SUFFIX "\\system32\\route.exe"
+#define WIN_IPCONFIG_PATH_SUFFIX "\\system32\\ipconfig.exe"
/*
* Win32-specific OpenVPN code, targetted at the mingw