apply TLS checks to any socket other than unix:// or fd://

break the docker command line arguments into one option per line,
then find all socket items (H or host), exclude the unix:// and
fd:// sockets, and if there are any left, check for TLS options

Signed-off-by: Mr. Secure <ben.github@mrsecure.org>
This commit is contained in:
Mr. Secure 2015-11-13 19:51:46 -06:00
parent 81730f536a
commit f791d06cff

View file

@ -79,7 +79,7 @@ fi
# 2.9
check_2_9="2.9 - Configure TLS authentication for Docker daemon"
get_command_line_args docker | grep "\-H\wtcp://" >/dev/null 2>&1
get_command_line_args docker | tr "-" "\n" | grep -E '^(H|host)' | grep -vE '(unix|fd)://' >/dev/null 2>&1
if [ $? -eq 0 ]; then
get_command_line_args docker | grep "tlsverify" | grep "tlskey" >/dev/null 2>&1
if [ $? -eq 0 ]; then