>Number: 1888
>Category: mod_env
>Synopsis: Apache adds SetEnv TZ to parent environment TZ instead of
>replacing
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache
>State: open
>Class: change-request
>Submitter-Id: apache
>Arrival-Date: Fri Feb 27 19:50:01 PST 1998
>Last-Modified:
>Originator: [EMAIL PROTECTED]
>Organization:
apache
>Release: 1.3_b5
>Environment:
Linux redshift.cimedia.com 2.0.32 #19 Fri Jan 9 21:46:10 EST 1998 i686 unknown
>Description:
We have virtual hosts that serve content to audiences in specific areas of
the U.S. We'd like the ability to set TZ appropriately for each VirtualHost.
However, apache adds the TZ environment variable w/o checked to see if it
has already been set via mod_env. I propose the following patch to
util_script.c:
*** util_script.c.orig Fri Feb 27 22:31:50 1998
--- util_script.c Fri Feb 27 22:32:44 1998
***************
*** 151,159 ****
char *whack;
j = 0;
! tz = getenv("TZ");
! if (tz != NULL)
! env[j++] = pstrcat(p, "TZ=", tz, NULL);
for (i = 0; i < env_arr->nelts; ++i) {
if (!elts[i].key)
continue;
--- 151,161 ----
char *whack;
j = 0;
! if (!table_get(t, "TZ")) {
! tz = getenv("TZ");
! if (tz != NULL)
! env[j++] = pstrcat(p, "TZ=", tz, NULL);
! }
for (i = 0; i < env_arr->nelts; ++i) {
if (!elts[i].key)
continue;
This would allow us to override the TZ environment variable in the child
environment.
>How-To-Repeat:
>Fix:
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <[EMAIL PROTECTED]> in the Cc line ]
[and leave the subject line UNCHANGED. This is not done]
[automatically because of the potential for mail loops. ]