From: Heiko Schlittermann (HS12-RIPE) Date: Tue, 7 May 2019 19:25:41 +0000 (+0200) Subject: Add main option exim_version X-Git-Url: https://git.exim.org/users/heiko/exim.git/commitdiff_plain/4202f1215e6e1cbcb66b82e514efcc21682e8ae1?ds=inline Add main option exim_version There might be reasons to cheat about the Exim version you're running. (Think of stupid security scanners.) --- diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index 783aeb429..5e2d7a5f6 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 &<>& 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 352833c4b..f6044b6c6 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 069a787d6..09045a40d 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 cac8fe5c2..b6c41bc65 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 },