From 1e0ef4cf97f787727b21eb11f2ab142f7f603e19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sj=C3=B6gren?= <konstruktoid@users.noreply.github.com> Date: Thu, 18 Jun 2015 00:32:20 +0200 Subject: [PATCH] crt dir and permissions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com> --- 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 67c870a..1f9cfe9 100644 --- a/tests/3_docker_daemon_configuration_files.sh +++ b/tests/3_docker_daemon_configuration_files.sh @@ -250,7 +250,7 @@ check_3_17="3.17 - Verify that registry certificate file ownership is set to roo directory="/etc/docker/certs.d/" if [ -d "$directory" ]; then fail=0 - owners=$(ls -lL "$directory"/*.crt | awk '{print "$3", "$4"}') + owners=$(ls -lL $directory | grep ".crt" | awk '{print $3, $4}') for p in $owners; do printf "%s" "$p" | grep "root" >/dev/null 2>&1 if [ $? -ne 0 ]; then @@ -273,7 +273,7 @@ check_3_18="3.18 - Verify that registry certificate file permissions are set to directory="/etc/docker/certs.d/" if [ -d "$directory" ]; then fail=0 - perms=$(ls -lL "$directory"/*.crt | awk '{print $1}') + perms=$(ls -lL $directory | grep ".crt" | awk '{print $1}') for p in $perms; do if [ "$p" != "-r--r--r--." -a "$p" = "-r--------." ]; then fail=1