-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
Problem
2.1.1 - 2.1.9 fail even if inetd is not installed.
Now
./linux-bench | grep -e '^2.1' -e '] 2.1'
[INFO] 2.1 inetd Services
[FAIL] 2.1.1.a Ensure chargen services are not enabled
[FAIL] 2.1.1.b Ensure chargen services are not enabled
[FAIL] 2.1.2.a Ensure daytime services are not enabled
[FAIL] 2.1.2.b Ensure daytime services are not enabled
[FAIL] 2.1.3.a Ensure discard services are not enabled
[FAIL] 2.1.3.b Ensure discard services are not enabled
[FAIL] 2.1.4.a Ensure echo services are not enabled
[FAIL] 2.1.4.b Ensure echo services are not enabled
[FAIL] 2.1.5.a Ensure time services are not enabled
[FAIL] 2.1.5.b Ensure time services are not enabled
[FAIL] 2.1.6.a Ensure rsh server is not enabled
[FAIL] 2.1.6.b Ensure rsh server is not enabled
[FAIL] 2.1.7.a Ensure talk server is not enabled
[FAIL] 2.1.7.b Ensure talk server is not enabled
[FAIL] 2.1.8.a Ensure telnet server is not enabled
[FAIL] 2.1.8.b Ensure telnet server is not enabled
[FAIL] 2.1.9.a Ensure tftp server is not enabled
[FAIL] 2.1.9.b Ensure tftp server is not enabled
[PASS] 2.1.10 Ensure xinetd service is not enabled
2.1.1.a grep: /etc/inetd.*: No such file or directory
2.1.1.b grep: /etc/xinetd.conf: No such file or directory
2.1.2.a grep: /etc/inetd.*: No such file or directory
2.1.2.b grep: /etc/xinetd.conf: No such file or directory
2.1.3.a grep: /etc/inetd.*: No such file or directory
2.1.3.b grep: /etc/xinetd.conf: No such file or directory
2.1.4.a grep: /etc/inetd.*: No such file or directory
2.1.4.b grep: /etc/xinetd.conf: No such file or directory
2.1.5.a grep: /etc/inetd.*: No such file or directory
2.1.5.b grep: /etc/xinetd.conf: No such file or directory
2.1.6.a grep: /etc/inetd.*: No such file or directory
2.1.6.b grep: /etc/xinetd.*: No such file or directory
2.1.7.a grep: /etc/inetd.*: No such file or directory
2.1.7.b grep: /etc/xinetd.*: No such file or directory
2.1.8.a grep: /etc/inetd.*: No such file or directory
2.1.8.b grep: /etc/xinetd.*: No such file or directory
2.1.9.a grep: /etc/inetd.*: No such file or directory
2.1.9.b grep: /etc/xinetd.*: No such file or directory
Want
All 2.1 checks should pass when there isn't inetd/xinetd file or directory.
Resolution
How about checking the existence of file or directory. The sample of 2.1.1.a is as below.
# before
grep -R "^chargen" /etc/inetd.*
# after
[ -e /etc/inetd.* ] && grep -R "^chargen" /etc/inetd.*Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels