summaryrefslogtreecommitdiff
path: root/src/openvpn/win32.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2020-04-10 23:10:07 +0200
committerJörg Frings-Fürst <debian@jff.email>2020-04-10 23:10:07 +0200
commit4f3065b441a19ac8661a487a1f87c25d7173ac03 (patch)
treeccf4fa15d6322e1c080d29500261cc7dc0be042a /src/openvpn/win32.c
parenta351f71e82badcc71a2ce881bbb97eccfcebc06b (diff)
parent8a3450ef8682b9085637d7b94afc5c7e6f92e64b (diff)
Update upstream source from tag 'upstream/2.4.8'
Update to upstream version '2.4.8' with Debian dir 00c9c7e7fdd8b0a1729f9102507c151f67ca8c5d
Diffstat (limited to 'src/openvpn/win32.c')
-rw-r--r--src/openvpn/win32.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/openvpn/win32.c b/src/openvpn/win32.c
index 29bbb84..f13807f 100644
--- a/src/openvpn/win32.c
+++ b/src/openvpn/win32.c
@@ -685,11 +685,10 @@ win32_pause(struct win32_signal *ws)
{
if (ws->mode == WSO_MODE_CONSOLE && HANDLE_DEFINED(ws->in.read))
{
- int status;
msg(M_INFO|M_NOPREFIX, "Press any key to continue...");
do
{
- status = WaitForSingleObject(ws->in.read, INFINITE);
+ WaitForSingleObject(ws->in.read, INFINITE);
} while (!win32_keyboard_get(ws));
}
}
@@ -1088,7 +1087,7 @@ wide_cmd_line(const struct argv *a, struct gc_arena *gc)
int
openvpn_execve(const struct argv *a, const struct env_set *es, const unsigned int flags)
{
- int ret = -1;
+ int ret = OPENVPN_EXECVE_ERROR;
static bool exec_warn = false;
if (a && a->argv[0])
@@ -1137,10 +1136,14 @@ openvpn_execve(const struct argv *a, const struct env_set *es, const unsigned in
free(env);
gc_free(&gc);
}
- else if (!exec_warn && (script_security < SSEC_SCRIPTS))
+ else
{
- msg(M_WARN, SCRIPT_SECURITY_WARNING);
- exec_warn = true;
+ ret = OPENVPN_EXECVE_NOT_ALLOWED;
+ if (!exec_warn && (script_security < SSEC_SCRIPTS))
+ {
+ msg(M_WARN, SCRIPT_SECURITY_WARNING);
+ exec_warn = true;
+ }
}
}
else