aboutsummaryrefslogtreecommitdiff
path: root/ex.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-01-24 09:15:05 +0000
committerOmar Polo <op@omarpolo.com>2021-01-24 09:15:05 +0000
commit05748e49fed64039616d4bb06a7e09388b0f5467 (patch)
tree30126884a807e297001cbe965368b6a73147ee6a /ex.c
parente7a2a99b5acfd15f0a0bba63344ec028a36700b3 (diff)
chdir to the vhost root before exec'ing the CGI script
Diffstat (limited to 'ex.c')
-rw-r--r--ex.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ex.c b/ex.c
index b9a9f7a..7979949 100644
--- a/ex.c
+++ b/ex.c
@@ -237,6 +237,8 @@ launch_cgi(const char *spath, const char *relpath, const char *query,
safe_setenv("TLS_CLIENT_HASH", chash);
}
+ fchdir(vhost->dir);
+
execvp(ex, argv);
goto childerr;
}