cPanelSSP/SSP — pull request #29 by cPanelChrisD (2014-08-20 19:24:58+00:00)
Title: Many minor bugfixes, added lockfile check and account_suspensions.conf include check

===

UPDATED - Default modsec2.conf has grown again from 1447 to 1500 bytes, increase size in the check to prevent false-positive warnings.

===

UPDATED - Cron "interesting commands" check now ignores harmless /etc/cron.daily/rpm which is found on CentOS 5 systems.

===

UPDATED - Latest default version of /var/cpanel/rpm.versions.d/easy.versions is now ignored in rpm.versions.d check.

===

UPDATED - PRM killed-process check now checks 3 possible log files instead of one.

===

FIXED - Old staffwiki link updated to new wiki link location.

Patch provided by:
Mary Wior

===

UPDATED - Added info to /etc/hosts sanity check when hostname is missing that this can break EA/Apache when mod_unique_id is enabled:

[WARN] * /etc/hosts: no entry found for the server's hostname! [server.mydomain.tld] (Can break EA or Apache when mod_unique_id is enabled)

Requested By:
Jesse Asklund

===

UPDATED - Mention that PHP checks will be skipped if php.conf.yaml is missing:

[INFO] * PHP: /usr/local/apache/conf/php.conf.yaml missing. PHP checks will be skipped.

Requested by:
Peter Elsner

===

FIXED - Multiple tech check wouldn't trigger when a pseudo-terminal value was listed after the IP or hostname, updated regex to handle this.

Reported by:
Peter Elsner

===

ADDED - Lockfile check routine. For now, it just checks for existence of these lockfiles which can prevent modifying system account info, including things like modifying the user shell (chsh, or WHM Manage Shell Access):

/etc/digestshadow
/etc/group.lock
/etc/gshadow.lock
/etc/gtmp
/etc/passwd
/etc/ptmp
/etc/shadow.lock

[WARN] * Lockfile exists: /etc/gtmp (Can prevent modifying system group file, check if active with lsof and MOVE ONLY IF STALE.)
[WARN] * Lockfile exists: /etc/ptmp (Can prevent modifying system passwd file, check if active with lsof and MOVE ONLY IF STALE. See ticket 5315853.)

Requested by:
Peter Elsner

===

UPDATED - Custom apache templates check was only looking for custom templates in /var/cpanel/templates/apache2. Now it will check every apache template dir we have, and the output has been reformatted to reflect this:

[WARN] * Custom templates (/var/cpanel/templates/apache2): main.local
[WARN] * Custom templates (/var/cpanel/templates/apache2_4): main.local

===

ADDED - Check for missing account_suspensions.conf in custom local apache templates:

[WARN] * Custom templates: /var/cpanel/templates/apache2/main.local is missing include for account_suspensions.conf!
\_ Use predefined "03 - Suspensions Template Update"

Requested By:
Chris Borsheim

===