From: Kevin Cernekee Date: Sun, 28 Oct 2012 04:42:25 +0000 (-0700) Subject: csd: Export some useful environment variables X-Git-Tag: v4.99~26^2~6 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=5d87d8d28e5bd286d3c743952813bb3aed1ef615;p=users%2Fdwmw2%2Fopenconnect.git csd: Export some useful environment variables CSD_HOSTNAME is a known-valid hostname on which (hopefully) our script won't have to perform too much input validation to know it's safe. CSD_TOKEN is passed in as the "sdesktop" cookie from host scan. Signed-off-by: Kevin Cernekee --- diff --git a/http.c b/http.c index 1c59a73b..d3eca469 100644 --- a/http.c +++ b/http.c @@ -603,6 +603,11 @@ static int run_csd_script(struct openconnect_info *vpninfo, char *buf, int bufle csd_argv[i++]= (char *)"-langselen"; csd_argv[i++] = NULL; + if (setenv("CSD_TOKEN", vpninfo->csd_token, 1)) + goto out; + if (setenv("CSD_HOSTNAME", vpninfo->hostname, 1)) + goto out; + execv(csd_argv[0], csd_argv); out: