From bdeaeaa05a38dda174ec8906ab668e670d60a884 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20Sj=C3=B6gren?=
 <konstruktoid@users.noreply.github.com>
Date: Fri, 9 Feb 2018 11:02:04 +0100
Subject: [PATCH] fix 2.18
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/2_docker_daemon_configuration.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/2_docker_daemon_configuration.sh b/tests/2_docker_daemon_configuration.sh
index b5942dc..06c1311 100644
--- a/tests/2_docker_daemon_configuration.sh
+++ b/tests/2_docker_daemon_configuration.sh
@@ -379,11 +379,11 @@ check_2_17() {
 check_2_18() {
   check_2_18="2.18 - Ensure containers are restricted from acquiring new privileges"
   totalChecks=$((totalChecks + 1))
-  if get_docker_effective_command_line_args '--no-new-privileges' >/dev/null 2>&1; then
+  if get_docker_effective_command_line_args '--no-new-privileges' | grep "no-new-privileges" >/dev/null 2>&1; then
     pass "$check_2_18"
     logjson "2.18" "PASS"
     currentScore=$((currentScore + 1))
-  elif get_docker_configuration_file_args 'no-new-privileges' >/dev/null 2>&1; then
+  elif get_docker_configuration_file_args 'no-new-privileges' | grep true >/dev/null 2>&1; then
     pass "$check_2_18"
     logjson "2.18" "PASS"
     currentScore=$((currentScore + 1))