Note that I did something similar to you in this patch, where the
previously suggested regex would work, but is not the "standard" used
in the other 3 checks.
Of course, the other checks are STILL not standard, with the telnet
check using path and file elements, the rest using filepath. I didn't
want to get too crazy standardizing things. ;)
If we want to push this for a build soon, let me know.
Andrew
On Fri, Jul 19, 2013 at 12:47 PM, Andrew Gilmore <agilmore2(a)gmail.com> wrote:
---
RHEL6/input/checks/service_telnetd_disabled.xml | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/RHEL6/input/checks/service_telnetd_disabled.xml
b/RHEL6/input/checks/service_telnetd_disabled.xml
index 55623fc..b02fe67 100644
--- a/RHEL6/input/checks/service_telnetd_disabled.xml
+++ b/RHEL6/input/checks/service_telnetd_disabled.xml
@@ -8,11 +8,11 @@
</affected>
<description>Disable telnet Service</description>
</metadata>
- <criteria operator="AND">
+ <criteria comment="package telnet-server removed or service telnetd is not
configured to start" operator="OR">
+ <extend_definition comment="rpm package telnet-server removed"
definition_ref="package_telnet-server_removed" />
<criterion comment="Disable telnet Service"
test_ref="test_disable_telnet_service" />
</criteria>
</definition>
-
<ind:textfilecontent54_test check="all"
check_existence="all_exist" comment="Disable Telnet Service"
id="test_disable_telnet_service" version="1">
@@ -22,7 +22,7 @@
id="obj_disable_telnet_service" version="1">
<ind:path>/etc/xinetd.d</ind:path>
<ind:filename>telnet</ind:filename>
- <ind:pattern operation="pattern
match">disable\s=\syes</ind:pattern>
+ <ind:pattern operation="pattern
match">^\s*disable\s+=\s+yes\s*$</ind:pattern>
<ind:instance datatype="int">1</ind:instance>
</ind:textfilecontent54_object>
</def-group>
--
1.7.1