summaryrefslogtreecommitdiff
path: root/src/utils/browser-wpadebug.c
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2018-12-06 05:04:28 +0000
committerCy Schubert <cy@FreeBSD.org>2018-12-06 05:04:28 +0000
commit8a36c5c2ca4d1f8a900ca3d9ffde40b96463def7 (patch)
treeb9a3166587c75d5325dc46c7c83ca435f2e54917 /src/utils/browser-wpadebug.c
parent765ef8a7642d07aa9616f2b1a9cdebb8e3552f6a (diff)
Diffstat (limited to 'src/utils/browser-wpadebug.c')
-rw-r--r--src/utils/browser-wpadebug.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/utils/browser-wpadebug.c b/src/utils/browser-wpadebug.c
index 59ba4d1e02d86..dfb4b67977f87 100644
--- a/src/utils/browser-wpadebug.c
+++ b/src/utils/browser-wpadebug.c
@@ -52,7 +52,7 @@ static void http_req(void *ctx, struct http_request *req)
eloop_terminate();
return;
}
- wpabuf_put_str(resp, "User input completed");
+ wpabuf_put_str(resp, "HTTP/1.1\r\n\r\nUser input completed");
if (done) {
eloop_cancel_timeout(browser_timeout, NULL, NULL);
@@ -97,6 +97,7 @@ int hs20_web_browser(const char *url)
if (pid == 0) {
/* run the external command in the child process */
char *argv[14];
+ char *envp[] = { "PATH=/system/bin:/vendor/bin", NULL };
argv[0] = "browser-wpadebug";
argv[1] = "start";
@@ -113,8 +114,8 @@ int hs20_web_browser(const char *url)
argv[12] = "-3"; /* USER_CURRENT_OR_SELF */
argv[13] = NULL;
- execv("/system/bin/am", argv);
- wpa_printf(MSG_ERROR, "execv: %s", strerror(errno));
+ execve("/system/bin/am", argv, envp);
+ wpa_printf(MSG_ERROR, "execve: %s", strerror(errno));
exit(0);
return -1;
}