RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1208402 - Mark web.xml in tomcat-admin-webapps as config file
Summary: Mark web.xml in tomcat-admin-webapps as config file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: tomcat
Version: 7.1
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Coty Sutherland
QA Contact: fgoldefu
Lucie Vařáková
URL:
Whiteboard:
: 1211109 (view as bug list)
Depends On:
Blocks: 1203710 1298191 1313485
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:
Environment:
Last Closed: 2016-11-03 21:08:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
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:-

%{appdir}/host-manager/WEB-INF/web.xml
%{appdir}/manager/WEB-INF/web.xml

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):

tomcat-admin-webapps-7.0.54-1.el7.noarch.rpm

How reproducible:


Steps to Reproduce:
1. yum update tomcat
2.
3.

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
%{appdir}/host-manager/WEB-INF/web.xml
%{appdir}/manager/WEB-INF/web.xml

Expected results:
The new configuration files should be
%{appdir}/host-manager/WEB-INF/web.xml.rpmnew
%{appdir}/manager/WEB-INF/web.xml.rpmnew


Additional info:
This is already working in the tomcat package:
rpm -q -c tomcat
...
/etc/tomcat/web.xml

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.

https://rhn.redhat.com/errata/RHSA-2016-2599.html


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