Merge lp://qastaging/~shaner/charm-helpers/lp1712203 into lp://qastaging/charm-helpers

Proposed by Shane Peters
Status: Merged
Approved by: Alex Kavanagh
Approved revision: 786
Merged at revision: 788
Proposed branch: lp://qastaging/~shaner/charm-helpers/lp1712203
Merge into: lp://qastaging/charm-helpers
Diff against target: 35 lines (+11/-2)
2 files modified
charmhelpers/contrib/hardening/audits/apache.py (+2/-2)
tests/contrib/hardening/audits/test_apache_audits.py (+9/-0)
To merge this branch: bzr merge lp://qastaging/~shaner/charm-helpers/lp1712203
Reviewer Review Type Date Requested Status
Alex Kavanagh Approve
Review via email: mp+329376@code.qastaging.launchpad.net
To post a comment you must log in.
Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

Added improvement comment to the code. Please see inline.

786. By Shane Peters

[shaner,r=] Fixes parsing of currently loaded apache modules

When hardening apache, the returned list of currently
enabled modules is always empty.

This change splits on linefeeds from the output of
'apachectl -M' instead of spaces which allows the
regex to match.

Since the returned list of modules could potentitialy
be used as input to '_disable_module' the regex was tweaked
to truncate the module name, removing the '_module' since
this is what a2dismod expects.

Closes-Bug: #1712203

Revision history for this message
Shane Peters (shaner) wrote :

Thanks Alex, testing this, it seems using splitlines() removes the need for 'strip()' as well.

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches