aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelva Nair2023-05-18 13:33:45 -0400
committerGert Doering2023-05-19 09:27:10 +0200
commit9e112be5dde043cdc1f073f33ada0a1810b730a6 (patch)
tree910b4e1c27f430bbd08718df24d987216ea42a1f
parentea9382d7b41849a92a9d18fa3f5420925277144e (diff)
downloadopenvpn-9e112be5dde043cdc1f073f33ada0a1810b730a6.zip
openvpn-9e112be5dde043cdc1f073f33ada0a1810b730a6.tar.gz
Interactive service: do not force a target desktop for openvpn.exe
Setting the desktop as "winsta0\default" does not always work when run from a non-interactive session which may not have access to the the window station "Winsta0". Leave this as NULL to let the system automatically assign a window station and desktop. Test runs on Win10 confirm that "Winsta0\Default" still gets selected when run interactively (e.g., using the GUI or from task scheduler as an interactive job). This is the same behaviour as now. The change allows "interactive service" to be used for launching OpenVPN from non-interactive sessions. For example, when service client is a non-interactive task from the task scheduler, the default desktop in a custom window station gets assigned to openvpn.exe. Note that we already run openvpn.exe in a non-interactive window station when directly launched by "automatic service". Github: Fixes OpenVPN/openvpn-gui#626 Signed-off-by: Selva Nair <selva.nair@gmail.com> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <20230518173345.2722530-1-selva.nair@gmail.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26705.html Signed-off-by: Gert Doering <gert@greenie.muc.de> (cherry picked from commit 244d9b7942dabf0297c8f689457eeb0f9fa0aa1e)
-rw-r--r--src/openvpnserv/interactive.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c
index ec19627..d73cef0 100644
--- a/src/openvpnserv/interactive.c
+++ b/src/openvpnserv/interactive.c
@@ -1868,7 +1868,6 @@ RunOpenvpn(LPVOID p)
}
startup_info.cb = sizeof(startup_info);
- startup_info.lpDesktop = L"winsta0\\default";
startup_info.dwFlags = STARTF_USESTDHANDLES;
startup_info.hStdInput = stdin_read;
startup_info.hStdOutput = stdout_write;