diff options
author | Heiko Schlittermann (HS12-RIPE) <hs@schlittermann.de> | 2016-03-11 23:44:53 +0100 |
---|---|---|
committer | Heiko Schlittermann (HS12-RIPE) <hs@schlittermann.de> | 2016-03-16 00:07:45 +0100 |
commit | fe6dd00fbf56a21813419357f00be3e8c2116e00 (patch) | |
tree | 0ca58cd41e93437b11e93cc200ce69d70515bd96 | |
parent | 251e433f77625814bb88c8274cb047a55bfedc66 (diff) | |
download | exim4-exim-4_86+CVE-2016-1531.tar.gz |
Don't issue env warning if env is emptyexim-4_86+CVE-2016-1531
keep_environment needs to be mentioned in the runtime config.
Setting add_environment isn't enough to suppress the warning.
(cherry picked from commit 8e58ed807c77febfde61d3cf47928302f93cc99c)
-rw-r--r-- | doc/doc-docbook/spec.xfpt | 7 | ||||
-rw-r--r-- | src/src/readconf.c | 6 | ||||
-rw-r--r-- | test/confs/0615 | 1 | ||||
-rw-r--r-- | test/stderr/0615 | 20 |
4 files changed, 16 insertions, 18 deletions
diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index 046a17f3b..4e68571f0 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -14911,9 +14911,10 @@ FOO and having FOO_HOME in your &%keep_environment%& option may have unexpected results. You may work around this using a regular expression that does not match the macro name: ^[F]OO_HOME$. -Current versions of Exim issue a warning during startupif you do not mention -&%keep_environment%& or &%add_environment%& in your runtime configuration -file. +Current versions of Exim issue a warning during startup if you do not mention +&%keep_environment%& in your runtime configuration file and if there is +anything in your environment. Future versions may not issue that warning +anymore. .wen diff --git a/src/src/readconf.c b/src/src/readconf.c index 1de6bd72e..1687876f8 100644 --- a/src/src/readconf.c +++ b/src/src/readconf.c @@ -3456,10 +3456,10 @@ if (gnutls_require_kx || gnutls_require_mac || gnutls_require_proto) " are obsolete\n"); #endif /*SUPPORT_TLS*/ -if ((!add_environment || *add_environment == '\0') && !keep_environment) +if (!keep_environment && environ && *environ) log_write(0, LOG_MAIN, - "WARNING: purging the environment.\n" - " Suggested action: use keep_environment and add_environment.\n"); + "Warning: purging the environment.\n" + " Suggested action: use keep_environment."); } diff --git a/test/confs/0615 b/test/confs/0615 index bbfc4978a..86ecee108 100644 --- a/test/confs/0615 +++ b/test/confs/0615 @@ -1,6 +1,7 @@ # exim test configuration 0615 exim_path = EXIM_PATH tls_advertise_hosts = +spool_directory = DIR/spool perl_startup = $| = 1; \ print "Environment visible in Perl:\n"; \ print map { "$_=$ENV{$_}\n" } sort keys %ENV; diff --git a/test/stderr/0615 b/test/stderr/0615 index 85ee6f760..d8d0f8547 100644 --- a/test/stderr/0615 +++ b/test/stderr/0615 @@ -1,15 +1,11 @@ LOG: MAIN - WARNING: purging the environment. - Suggested action: use keep_environment and add_environment. - + Warning: purging the environment. + Suggested action: use keep_environment. LOG: MAIN - WARNING: purging the environment. - Suggested action: use keep_environment and add_environment. - + Warning: purging the environment. + Suggested action: use keep_environment. LOG: MAIN - WARNING: purging the environment. - Suggested action: use keep_environment and add_environment. - -1999-03-02 09:44:33 WARNING: purging the environment. - Suggested action: use keep_environment and add_environment. - + Warning: purging the environment. + Suggested action: use keep_environment. +1999-03-02 09:44:33 Warning: purging the environment. + Suggested action: use keep_environment. |