diff --git a/tests/1_host_configuration.sh b/tests/1_host_configuration.sh index 37a984b..157c9a8 100644 --- a/tests/1_host_configuration.sh +++ b/tests/1_host_configuration.sh @@ -114,7 +114,7 @@ fi # 1.11 check_1_11="1.11 - Audit Docker files and directories - docker-registry.service" -file="/usr/lib/systemd/system/docker-registry.service" +file="$(get_systemd_service_file docker-registry.service)" if [ -f "$file" ]; then command -v auditctl >/dev/null 2>&1 if [ $? -eq 0 ]; then @@ -134,7 +134,7 @@ fi # 1.12 check_1_12="1.12 - Audit Docker files and directories - docker.service" -file="/usr/lib/systemd/system/docker.service" +file="$(get_systemd_service_file docker.service)" if [ -f "$file" ]; then command -v auditctl >/dev/null 2>&1 if [ $? -eq 0 ]; then diff --git a/tests/3_docker_daemon_configuration_files.sh b/tests/3_docker_daemon_configuration_files.sh index b3ff542..dc2fdbc 100644 --- a/tests/3_docker_daemon_configuration_files.sh +++ b/tests/3_docker_daemon_configuration_files.sh @@ -5,7 +5,7 @@ info "3 - Docker Daemon Configuration Files" # 3.1 check_3_1="3.1 - Verify that docker.service file ownership is set to root:root" -file="/usr/lib/systemd/system/docker.service" +file="$(get_systemd_service_file docker-registry.service)" if [ -f "$file" ]; then if [ "$(stat -c %u%g $file)" -eq 00 ]; then pass "$check_3_1" @@ -20,7 +20,7 @@ fi # 3.2 check_3_2="3.2 - Verify that docker.service file permissions are set to 644" -file="/usr/lib/systemd/system/docker.service" +file="$(get_systemd_service_file docker-registry.service)" if [ -f "$file" ]; then if [ "$(stat -c %a $file)" -eq 644 ]; then pass "$check_3_2" @@ -35,7 +35,7 @@ fi # 3.3 check_3_3="3.3 - Verify that docker-registry.service file ownership is set to root:root" -file="/usr/lib/systemd/system/docker-registry.service" +file="$(get_systemd_service_file docker-registry.service)" if [ -f "$file" ]; then if [ "$(stat -c %u%g $file)" -eq 00 ]; then pass "$check_3_3" @@ -50,7 +50,7 @@ fi # 3.4 check_3_4="3.4 - Verify that docker-registry.service file permissions are set to 644" -file="/usr/lib/systemd/system/docker-registry.service" +file="$(get_systemd_service_file docker-registry.service)" if [ -f "$file" ]; then if [ "$(stat -c %a $file)" -eq 644 ]; then pass "$check_3_4"