Bug 241680 - logrotate.d/httpd postrotate must use initscripts
Summary: logrotate.d/httpd postrotate must use initscripts
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: httpd
Version: 5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Joe Orton
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 606955
TreeView+ depends on / blocked
 
Reported: 2007-05-29 15:08 UTC by Joe Orton
Modified: 2010-06-22 19:43 UTC (History)
1 user (show)

Fixed In Version: RHSA-2007-0746
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 606955 (view as bug list)
Environment:
Last Closed: 2007-11-07 15:30:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2007:0746 0 normal SHIPPED_LIVE Moderate: httpd security, bug fix, and enhancement update 2007-11-07 16:27:47 UTC

Description Joe Orton 2007-05-29 15:08:47 UTC
+++ This bug was initially created as a clone of Bug #241407 +++

Description of problem:

The default /etc/logrotate.d/httpd incorrectly invokes kill directly, rather
than the more appropriate means of calling /sbin/service httpd restart. The
current behavior has a number of flaws -- it blindly assumes the location of the
PID file, even though the init script accommodates a configurable override of
"PIDFILE" via /etc/sysconfig/httpd. Additionally, there is no benefit from the
existing safeguards in the init script (namely configtest-before-signal).

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

Verified against both httpd-2.0.52-32.ent and httpd-2.2.3-6.el5.

How reproducible:

Define PIDFILE in /etc/sysconfig/httpd to be something other than
"/var/run/httpd.pid" and observe logs not being rotated properly.

Expected results:

The httpd package should be internally consistent. Instead, default values are
duplicated in multiple locations and configuration files are not handled
uniformly between logrotate and init.

-- Additional comment from jorton on 2007-05-29 09:27 EST --
Thanks for the report.

I notice that the httpd init script itself does not correctly the $PIDFILE
override, since it should be passing -p $pidfile to the killproc function also,
but the fallback in that case is usually sufficient.

-- Additional comment from pm-rhel on 2007-05-29 09:44 EST --
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 1 Joe Orton 2007-05-29 15:10:18 UTC
As per other httpd bugs, this will also need to be fixed in 5.1.

Comment 2 Daniel Riek 2007-06-01 14:37:55 UTC
httpd was added to the approved components.

PM ACK

Comment 7 errata-xmlrpc 2007-11-07 15:30:39 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2007-0746.html



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