aboutsummaryrefslogtreecommitdiff
path: root/ex.c
diff options
context:
space:
mode:
Diffstat (limited to 'ex.c')
-rw-r--r--ex.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ex.c b/ex.c
index 73d990e..6437a42 100644
--- a/ex.c
+++ b/ex.c
@@ -136,6 +136,7 @@ launch_cgi(struct iri *iri, struct cgireq *req, struct vhost *vhost)
char *ex, *pwd;
char iribuf[GEMINI_URL_LEN];
char path[PATH_MAX];
+ struct envlist *e;
close(p[0]);
if (dup2(p[1], 1) == -1)
@@ -200,6 +201,10 @@ launch_cgi(struct iri *iri, struct cgireq *req, struct vhost *vhost)
setenv_time("TLS_CLIENT_NOT_AFTER", req->notafter);
setenv_time("TLS_CLIENT_NOT_BEFORE", req->notbefore);
+ TAILQ_FOREACH(e, &vhost->env, envs) {
+ safe_setenv(e->name, e->value);
+ }
+
strlcpy(path, ex, sizeof(path));
pwd = dirname(path);