]> granicus.if.org Git - apache/commitdiff
Enable SetEnv to set PATH
authorNick Kew <niq@apache.org>
Mon, 19 Jul 2010 23:40:25 +0000 (23:40 +0000)
committerNick Kew <niq@apache.org>
Mon, 19 Jul 2010 23:40:25 +0000 (23:40 +0000)
PR 43906

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@965679 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
server/util_script.c

diff --git a/CHANGES b/CHANGES
index 70de85207c00b67d7feb01926ea7df0b8871ea92..6b82bb6c40011c3712e58a218e99ac1f06259975 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -29,6 +29,9 @@ Changes with Apache 2.3.7
   *) mod_include: recognise "text/html; parameters" as text/html
      PR 49616 [Andrey Chernov <ache nagual.pp.ru>]
 
+  *) CGI vars: allow PATH to be set by SetEnv, consistent with LD_LIBRARY_PATH
+     PR 43906 [Nick Kew]
+
 Changes with Apache 2.3.6
 
   *) SECURITY: CVE-2009-3555 (cve.mitre.org)
index bf70a9f0d32f7ddccff3b088dc06788d7ebd2bc1..de6d4440ba5b9503b6eb6a1d9bfadf76f4c876da 100644 (file)
@@ -182,7 +182,11 @@ AP_DECLARE(void) ap_add_common_vars(request_rec *r)
         }
     }
 
-    if (!(env_path = getenv("PATH"))) {
+    env_path = apr_table_get(r->subprocess_env, "PATH");
+    if (env_path == NULL) {
+        env_path = getenv("PATH");
+    }
+    if (env_path == NULL) {
         env_path = DEFAULT_PATH;
     }
     apr_table_addn(e, "PATH", apr_pstrdup(r->pool, env_path));