From 32282729dc3de6453a768492d4f64fdfe225670f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sj=C3=B6gren?= Date: Sat, 5 Sep 2015 16:23:34 +0200 Subject: [PATCH] missing file as non-root user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Sjögren --- docker-bench-security.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/docker-bench-security.sh b/docker-bench-security.sh index 55fe677..0659d07 100755 --- a/docker-bench-security.sh +++ b/docker-bench-security.sh @@ -42,16 +42,6 @@ usage () { EOF } -yell "# ------------------------------------------------------------------------------ -# Docker Bench for Security v1.0.0 -# -# Docker, Inc. (c) 2015 -# -# Checks for dozens of common best-practices around deploying Docker containers in production. -# Inspired by the CIS Docker 1.6 Benchmark: -# https://benchmarks.cisecurity.org/tools2/docker/CIS_Docker_1.6_Benchmark_v1.0.0.pdf -# ------------------------------------------------------------------------------" - # Get the flags # If you add an option here, please # remember to update usage() above. @@ -64,6 +54,20 @@ do esac done +if [ -z "$logger" ]; then + logger="${myname}.log" +fi + +yell "# ------------------------------------------------------------------------------ +# Docker Bench for Security v1.0.0 +# +# Docker, Inc. (c) 2015 +# +# Checks for dozens of common best-practices around deploying Docker containers in production. +# Inspired by the CIS Docker 1.6 Benchmark: +# https://benchmarks.cisecurity.org/tools2/docker/CIS_Docker_1.6_Benchmark_v1.0.0.pdf +# ------------------------------------------------------------------------------" + # Warn if not root ID=$(id -u) if [ "x$ID" != "x0" ]; then @@ -71,10 +75,6 @@ if [ "x$ID" != "x0" ]; then sleep 3 fi -if [ -z "$logger" ]; then - logger="${myname}.log" -fi - logit "Initializing $(date)\n" # Load all the tests from tests/ and run them