From c5cb9cdc5cc98061c85f89371c84455ebf53e92d Mon Sep 17 00:00:00 2001 From: Andreas Stieger Date: Wed, 11 Nov 2015 17:42:44 +0100 Subject: [PATCH] POSIX test command requires -S for UNIX domain sockets, fixes #94 Signed-off-by: Andreas Stieger --- tests/3_docker_daemon_configuration_files.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/3_docker_daemon_configuration_files.sh b/tests/3_docker_daemon_configuration_files.sh index 18af6e8..4a6e655 100644 --- a/tests/3_docker_daemon_configuration_files.sh +++ b/tests/3_docker_daemon_configuration_files.sh @@ -386,7 +386,7 @@ fi # 3.25 check_3_25="3.25 - Verify that Docker socket file ownership is set to root:docker" file="/var/run/docker.sock" -if [ -f "$file" ]; then +if [ -S "$file" ]; then if [ "$(stat -c %u%g $file)" -eq 00 ]; then pass "$check_3_25" else @@ -401,7 +401,7 @@ fi # 3.26 check_3_26="3.26 - Verify that Docker socket file permissions are set to 660" file="/var/run/docker.sock" -if [ -f "$file" ]; then +if [ -S "$file" ]; then perms=$(ls -ld "$file" | awk '{print $1}') if [ "$perms" = "srw-rw----" ]; then pass "$check_3_26"