cPanelSSP/SSP — pull request #16 by cPanelChrisD (2014-06-24 16:11:32+00:00)
Title: Add home permission check and update read-only filesystem check

Home permission check:
Added hard-coded /home and /home{1..5} paths, then also added code to pull the HOMEDIR value out of /etc/wwwacct.conf and add that to the list of paths to check, if it is found. The characters that will be matched in the HOMEDIR path are limited to alpha-numeric characters plus dash (-), underscore (_), and forward-slash (/). I'm not sure if this is strictly necessary but it felt like the safe thing to do. In the event that someone uses a HOMEDIR value with some weird characters it will simply not get checked, but shouldn't cause any other errors.

Read-only filesystem check:
Updated regexes to use m{}x for legibility, excluded /usr/share/cagefs-skeleton, and updated the regex that checks for the 'ro' option to only accept either the begging of the string or a comma before 'ro', and either the end of the string or a comma after it. This prevents options like 'errors=remount-ro' from matching. The old regular expression simply used a word-boundary match (\b) which wasn't strict enough.

Both changes have been locally tested.