mirror of
https://github.com/apache/httpd.git
synced 2025-09-01 02:02:06 +03:00
Make a copy of getenv("PATH") before storing for later use. Some
getenv() implementations use the same storage for successive calls. CGIs on OS/390 had a bad PATH due to this. (Believe it or not, ANSI says getenv() can do this.) Some similar getenv() usage was left alone as it was specific to a certain platform, and I assume that getenv() doesn't have the "issue" on those platforms. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85427 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -258,6 +258,7 @@ API_EXPORT(void) ap_add_common_vars(request_rec *r)
|
||||
if (!(env_path = getenv("PATH"))) {
|
||||
env_path = DEFAULT_PATH;
|
||||
}
|
||||
ap_table_addn(e, "PATH", ap_pstrdup(r->pool, env_path));
|
||||
|
||||
#ifdef WIN32
|
||||
if (env_temp = getenv("SystemRoot")) {
|
||||
@@ -286,7 +287,6 @@ API_EXPORT(void) ap_add_common_vars(request_rec *r)
|
||||
}
|
||||
#endif
|
||||
|
||||
ap_table_addn(e, "PATH", env_path);
|
||||
ap_table_addn(e, "SERVER_SIGNATURE", ap_psignature("", r));
|
||||
ap_table_addn(e, "SERVER_SOFTWARE", ap_get_server_version());
|
||||
ap_table_addn(e, "SERVER_NAME", ap_get_server_name(r));
|
||||
|
Reference in New Issue
Block a user