Bug 1208402 - Mark web.xml in tomcat-admin-webapps as config file
Summary: Mark web.xml in tomcat-admin-webapps as config file
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: tomcat
Version: 7.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Coty Sutherland
QA Contact: fgoldefu
Lucie Maňásková
: 1211109 (view as bug list)
Depends On:
Blocks: 1203710 1313485 1298191
TreeView+ depends on / blocked
Reported: 2015-04-02 07:50 UTC by Hisanobu Okuda
Modified: 2019-11-14 06:41 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Release Note
Doc Text:
Update for marking tomcat-admin-webapps package configration files Previously, the _tomcat-admin-webapps_ `web.xml` files were not marked as the configuration files. Consequently, upgrading the _tomcat-admin-webapps_ package overwrote the `/usr/share/tomcat/webapps/host-manager/WEB-INF/web.xml` and `/usr/share/tomcat/webapps/manager/WEB-INF/web.xml` files, causing custom user configuration to be automatically removed. This update fixes classification of these files, thus preventing this problem.
Clone Of:
Last Closed: 2016-11-03 21:08:28 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1054817 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Product Errata RHSA-2016:2599 0 normal SHIPPED_LIVE Moderate: tomcat security, bug fix, and enhancement update 2016-11-03 12:12:12 UTC

Internal Links: 1211109

Description Hisanobu Okuda 2015-04-02 07:50:07 UTC
Description of problem:
Upgrading the tomcat-admin-webapps package overwrites the following 2 files:-


When these files are modified, yum update should not overwrite them. Just in case the files are modified, please mark the files as config adding the following 2 lines into tomcat.spec:-

%config(noreplace) %{appdir}/host-manager/WEB-INF/web.xml
%config(noreplace) %{appdir}/manager/WEB-INF/web.xml

Version-Release number of selected component (if applicable):


How reproducible:

Steps to Reproduce:
1. yum update tomcat

Actual results:

Expected results:

Additional info:

Comment 1 ileppala 2015-08-18 06:33:44 UTC
We are also suffering from this issue. (RHEL 7)

Steps to Reproduce:
1. yum update tomcat

Actual results:
The following config files got overwritten

Expected results:
The new configuration files should be

Additional info:
This is already working in the tomcat package:
rpm -q -c tomcat

So it is already known that the file is a configuration file.

Comment 3 Coty Sutherland 2015-11-10 19:35:58 UTC
*** Bug 1211109 has been marked as a duplicate of this bug. ***

Comment 5 Coty Sutherland 2016-01-19 15:30:31 UTC
This behavior is intentional. Sometimes security updates affect the manager webapps web.xml and those changes need to be put in place. The config is overwritten to accept security updates instead of omitting them causing the user's installation to be vulnerable until the user manually updates them.

An option to override this behavior would be to use a yum-post-transaction action to overwrite the updated web.xml with your web.xml.rpmsave file. Note that this may cause you to miss security updates to the manager app's web.xml.

Comment 6 Hisanobu Okuda 2016-01-21 01:40:21 UTC
Coty, Thank you for your suggestion. I second what you mentioned. Security should have priority. However, the current rpm just overwrites the web.xml files and does not make .rpmsave files. I think it is a bad idea because changes are lost upgrading the package. Please consider marking them as %config (...not %config(noreplace)...) so that .saverpm files are made.

Comment 7 Coty Sutherland 2016-01-21 14:30:26 UTC
That I can do :) Sorry about that; I made an assumption.

Actually, it's marked as config(noreplace) for tomcat6 in rhel-6. Let me see if the fedora tomcat maintainer has an opinion on the topic and if we removed that from the spec intentionally.

Comment 8 Coty Sutherland 2016-06-02 12:47:24 UTC
The rhel-6.7 release addressed this issue in https://bugzilla.redhat.com/1054817. After further investigation into potential security issues, I see that only one CVE listed in the upstream security documentation for all three currently supported versions of tomcat updated the web.xml of the manager/host-manager application (CVE-2015-5351). Even though it was only one recently, I still think that it is a legitimate security concern, so instead of going along with the fix from rhel-6 I'm going to mark the manager/host-manager application's web.xml as config, not config(noreplace). If a user updates tomcat and needs to put their changes back in place, they can simply copy the .rpmsave file back over the web.xml thereby taking responsibility for checking the web.xml for updates.

Comment 15 errata-xmlrpc 2016-11-03 21:08:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.