[exim-cvs] Add main option exim_version

Inizio della pagina
Delete this message
Reply to this message
Autore: Exim Git Commits Mailing List
Data:  
To: exim-cvs
Oggetto: [exim-cvs] Add main option exim_version
Gitweb: https://git.exim.org/exim.git/commitdiff/4202f1215e6e1cbcb66b82e514efcc21682e8ae1
Commit:     4202f1215e6e1cbcb66b82e514efcc21682e8ae1
Parent:     4a1bd6b935ca5c5b70408a60036312d4825fd24e
Author:     Heiko Schlittermann (HS12-RIPE) <hs@???>
AuthorDate: Tue May 7 21:25:41 2019 +0200
Committer:  Heiko Schlittermann (HS12-RIPE) <hs@???>
CommitDate: Tue May 7 21:25:41 2019 +0200


    Add main option exim_version


    There might be reasons to cheat about the Exim version you're running.
    (Think of stupid security scanners.)
---
 doc/doc-docbook/spec.xfpt   | 12 +++++++++++-
 doc/doc-txt/NewStuff        |  3 +++
 doc/doc-txt/OptionLists.txt |  1 +
 src/src/readconf.c          |  1 +
 4 files changed, 16 insertions(+), 1 deletion(-)


diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt
index 783aeb4..5e2d7a5 100644
--- a/doc/doc-docbook/spec.xfpt
+++ b/doc/doc-docbook/spec.xfpt
@@ -12182,6 +12182,7 @@ This variable contains the version string of the Exim build.
The first character is a major version number, currently 4.
Then after a dot, the next group of digits is a minor version number.
There may be other characters following the minor version.
+This value may be overridden by the &%exim_version%& main config option.

.vitem &$header_$&<&'name'&>
This is not strictly an expansion variable. It is expansion syntax for
@@ -13513,7 +13514,8 @@ Otherwise, empty.

.vitem &$version_number$&
.vindex "&$version_number$&"
-The version number of Exim.
+The version number of Exim. Same as &$exim_version$&, may be overridden
+by the &%exim_version%& main config option.

.vitem &$warn_message_delay$&
.vindex "&$warn_message_delay$&"
@@ -15344,6 +15346,14 @@ not also supplied, the gid is taken from the result of &[getpwnam()]& if it is
used. See chapter &<<CHAPsecurity>>& for a discussion of security issues.


+.option exim_version main string "current version"
+.cindex "Exim version"
+.cindex customizing "version number"
+.cindex "version number of Exim" override
+This option allows to override the &$version_number$&/&$exim_version$& Exim reports in
+various places.  Use with care, this may fool stupid security scanners.
+
+
 .option extra_local_interfaces main "string list" unset
 This option defines network interfaces that are to be considered local when
 routing, but which are not used for listening by the daemon. See section
diff --git a/doc/doc-txt/NewStuff b/doc/doc-txt/NewStuff
index 352833c..f6044b6 100644
--- a/doc/doc-txt/NewStuff
+++ b/doc/doc-txt/NewStuff
@@ -23,6 +23,9 @@ Version 4.93
  6. EXPERIMENTAL_TLS_RESUME optional build feature.  See the experimental.spec
     file.


+ 7. A main option exim_version to override the version Exim
+    reports in verious places ($exim_version, $version_number).
+


 Version 4.92
 --------------
diff --git a/doc/doc-txt/OptionLists.txt b/doc/doc-txt/OptionLists.txt
index 069a787..09045a4 100644
--- a/doc/doc-txt/OptionLists.txt
+++ b/doc/doc-txt/OptionLists.txt
@@ -213,6 +213,7 @@ escape_string                        string          ">From "      appendfile
 exim_group                           string          ++            main
 exim_path                            string          ++            main
 exim_user                            string          ++            main
+exim_version                         string          ++            main              4.93
 expn                                 boolean         true          routers
 extra_local_interfaces               string          unset         main              4.21
 extract_addresses_remove_arguments   boolean         true          main              1.92
diff --git a/src/src/readconf.c b/src/src/readconf.c
index cac8fe5..b6c41bc 100644
--- a/src/src/readconf.c
+++ b/src/src/readconf.c
@@ -149,6 +149,7 @@ static optionlist optionlist_config[] = {
   { "exim_group",               opt_gid,         &exim_gid },
   { "exim_path",                opt_stringptr,   &exim_path },
   { "exim_user",                opt_uid,         &exim_uid },
+  { "exim_version",             opt_stringptr,   &version_string },
   { "extra_local_interfaces",   opt_stringptr,   &extra_local_interfaces },
   { "extract_addresses_remove_arguments", opt_bool, &extract_addresses_remove_arguments },
   { "finduser_retries",         opt_int,         &finduser_retries },