Merge pull request #81 from konstruktoid/tee_file_missing

missing file as non-root user
This commit is contained in:
Thomas Sjögren 2015-09-05 16:26:55 +02:00
commit dafd938d19

View file

@ -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