From fae2639313196d2aefb22ca955f3fd9b9fd7a38a Mon Sep 17 00:00:00 2001 From: Joachim Lusiardi Date: Fri, 26 Jun 2015 07:18:18 +0200 Subject: [PATCH] Addition to fix for issue #47. Missed the potentially wrong invocations of pgrep also in section 3 of the tests. Replace "pgrep -lf" there as well. Signed-off-by: Joachim Lusiardi --- tests/3_docker_daemon_configuration_files.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/3_docker_daemon_configuration_files.sh b/tests/3_docker_daemon_configuration_files.sh index 1f9cfe9..491f538 100644 --- a/tests/3_docker_daemon_configuration_files.sh +++ b/tests/3_docker_daemon_configuration_files.sh @@ -292,7 +292,7 @@ fi # 3.19 check_3_19="3.19 - Verify that TLS CA certificate file ownership is set to root:root" -tlscacert=$(pgrep -lf docker | sed -n 's/.*tlscacert=\([^s]\)/\1/p' | cut -d " " -f 1) +tlscacert=$(get_command_line_args docker | sed -n 's/.*tlscacert=\([^s]\)/\1/p' | cut -d " " -f 1) if [ -f "$tlscacert" ]; then if [ "$(stat -c %u%g $file)" -eq 00 ]; then pass "$check_3_19" @@ -307,7 +307,7 @@ fi # 3.20 check_3_20="3.20 - Verify that TLS CA certificate file permissions are set to 444" -tlscacert=$(pgrep -lf docker | sed -n 's/.*tlscacert=\([^s]\)/\1/p' | cut -d " " -f 1) +tlscacert=$(get_command_line_args docker | sed -n 's/.*tlscacert=\([^s]\)/\1/p' | cut -d " " -f 1) if [ -f "$tlscacert" ]; then perms=$(ls -ld "$tlscacert" | awk '{print $1}') if [ "$perms" = "-r--r--r--" ]; then @@ -323,7 +323,7 @@ fi # 3.21 check_3_21="3.21 - Verify that Docker server certificate file ownership is set to root:root" -tlscert=$(pgrep -lf docker | sed -n 's/.*tlscert=\([^s]\)/\1/p' | cut -d " " -f 1) +tlscert=$(get_command_line_args docker | sed -n 's/.*tlscert=\([^s]\)/\1/p' | cut -d " " -f 1) if [ -f "$tlscert" ]; then if [ "$(stat -c %u%g $file)" -eq 00 ]; then pass "$check_3_21" @@ -338,7 +338,7 @@ fi # 3.22 check_3_22="3.22 - Verify that Docker server certificate file permissions are set to 444" -tlscacert=$(pgrep -lf docker | sed -n 's/.*tlscert=\([^s]\)/\1/p' | cut -d " " -f 1) +tlscacert=$(get_command_line_args docker | sed -n 's/.*tlscert=\([^s]\)/\1/p' | cut -d " " -f 1) if [ -f "$tlscert" ]; then perms=$(ls -ld "$tlscert" | awk '{print $1}') if [ "$perms" = "-r--r--r--" ]; then @@ -354,7 +354,7 @@ fi # 3.23 check_3_23="3.23 - Verify that Docker server key file ownership is set to root:root" -tlskey=$(pgrep -lf docker | sed -n 's/.*tlskey=\([^s]\)/\1/p' | cut -d " " -f 1) +tlskey=$(get_command_line_args docker | sed -n 's/.*tlskey=\([^s]\)/\1/p' | cut -d " " -f 1) if [ -f "$tlskey" ]; then if [ "$(stat -c %u%g $file)" -eq 00 ]; then pass "$check_3_23" @@ -369,7 +369,7 @@ fi # 3.24 check_3_24="3.24 - Verify that Docker server key file permissions are set to 400" -tlskey=$(pgrep -lf docker | sed -n 's/.*tlskey=\([^s]\)/\1/p' | cut -d " " -f 1) +tlskey=$(get_command_line_args docker | sed -n 's/.*tlskey=\([^s]\)/\1/p' | cut -d " " -f 1) if [ -f "$tlskey" ]; then perms=$(ls -ld "$tlskey" | awk '{print $1}') if [ "$perms" = "-r--------" ]; then