Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 752618 - mod_ssl post install script can cause failures
mod_ssl post install script can cause failures
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: httpd (Show other bugs)
5.7
i386 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Joe Orton
Aleš Mareček
:
: 867736 (view as bug list)
Depends On:
Blocks: 867745
  Show dependency treegraph
 
Reported: 2011-11-09 19:41 EST by Steve
Modified: 2013-01-08 00:03 EST (History)
4 users (show)

See Also:
Fixed In Version: httpd-2.2.3-74.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 867745 (view as bug list)
Environment:
Last Closed: 2013-01-08 00:03:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0130 normal SHIPPED_LIVE Low: httpd security, bug fix, and enhancement update 2013-01-08 04:33:40 EST

  None (edit)
Description Steve 2011-11-09 19:41:43 EST
Description of problem:
Upgrading httpd and mod_ssl when an invalid key is present in /etc/pki/tls/private/localhost.key could cause an upgrade failure in mod_ssl's post routine.  This will occur if /etc/pki/tls/certs/localhost.crt does not exist.

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


How reproducible:
every time

Steps to Reproduce:
1. make sure /etc/pki/tls/certs/localhost.crt does not exist
2. make sure /etc/pki/tls/private/localhost.key does exist but is not a proper key file (can be a zero length file)
3. upgrade httpd and mod_ssl from 2.2.3-43.el5 to 2.2.3-53.el5_7.3
  

Actual results:
[root@b1sp3-cm pub]# rpm -qa | grep -e mod_ssl -e httpd
httpd-2.2.3-43.el5
mod_ssl-2.2.3-43.el5
[root@b1sp3-cm private]# ll /etc/pki/tls/private
total 0
-rw------- 1 root root   0 Nov  2  2010 localhost.key
[root@b1sp3-cm private]# ll /etc/pki/tls/certs
total 444
-rw-r--r-- 1 root root   2240 Mar 12  2010 Makefile
-rw-r--r-- 1 root root 441017 Mar 12  2010 ca-bundle.crt
-rwxr-xr-x 1 root root    610 Mar 12  2010 make-dummy-cert
[root@b1sp3-cm pub]# rpm -Uvh mod_ssl-2.2.3-53.el5_7.3.i386.rpm httpd-2.2.3-53.el5_7.3.i386.rpm
Preparing...                ########################################### [100%]
   1:httpd                  ########################################### [ 50%]
   2:mod_ssl                ########################################### [100%]
error: %post(mod_ssl-2.2.3-53.el5_7.3.i386) scriptlet failed, exit status 1
[root@b1sp3-cm pub]# rpm -qa | grep -e mod_ssl -e httpd
httpd-2.2.3-53.el5_7.3
mod_ssl-2.2.3-43.el5
mod_ssl-2.2.3-53.el5_7.3


Expected results:
[root@b1sp3-cm pub]# rpm -qa | grep -e mod_ssl -e httpd
httpd-2.2.3-43.el5
mod_ssl-2.2.3-43.el5
[root@b1sp3-cm pub]# rpm -Uvh mod_ssl-2.2.3-53.el5_7.3.i386.rpm httpd-2.2.3-53.el5_7.3.i386.rpm
Preparing...                ########################################### [100%]
   1:httpd                  ########################################### [ 50%]
   2:mod_ssl                ########################################### [100%]
[root@b1sp3-cm pub]# rpm -qa | grep -e mod_ssl -e httpd
httpd-2.2.3-53.el5_7.3
mod_ssl-2.2.3-53.el5_7.3



Additional info:
Patch the spec like so?

build-2:/SPECS:30$ diff -u httpd.spec.orig httpd.spec
--- httpd.spec.orig     2011-11-09 19:29:15.708095000 -0500
+++ httpd.spec  2011-11-09 19:33:37.465072000 -0500
@@ -580,6 +580,8 @@
 fi

 if [ ! -f %{sslcert} ] ; then
+    openssl rsa -check -in /etc/pki/tls/private/localhost.key 2>/dev/null
+    if [ $? -eq 0 ]
 cat << EOF | %{_bindir}/openssl req -new -key %{sslkey} \
          -x509 -days 365 -set_serial $RANDOM \
          -out %{sslcert} 2>/dev/null
@@ -591,6 +593,7 @@
 ${FQDN}
 root@${FQDN}
 EOF
+    fi
 fi

 %check
Comment 1 Joe Orton 2012-03-23 05:14:54 EDT
Thanks for the report.
Comment 3 RHEL Product and Program Management 2012-04-19 07:51:17 EDT
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.
Comment 10 Joe Orton 2012-10-18 12:07:45 EDT
*** Bug 867736 has been marked as a duplicate of this bug. ***
Comment 17 errata-xmlrpc 2013-01-08 00:03:55 EST
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.

http://rhn.redhat.com/errata/RHSA-2013-0130.html

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