From 22d1fde1a5aca5db95bf269371f89cd4db2ec5d7 Mon Sep 17 00:00:00 2001 From: Matthijs Mekking Date: Wed, 9 Feb 2022 12:19:06 +0100 Subject: [PATCH] Check if key-store directory exists Similar to key-directory, check if the key-store directory exists and if it is an actual directory. This commit fixes an accidental test bug in checkconf where if the "warn key-dir" test failed, the result was ignored. --- bin/tests/system/checkconf/tests.sh | 12 +++++ bin/tests/system/checkconf/warn-keydir.conf | 4 ++ lib/isccfg/check.c | 50 +++++++++++++++++++-- 3 files changed, 62 insertions(+), 4 deletions(-) diff --git a/bin/tests/system/checkconf/tests.sh b/bin/tests/system/checkconf/tests.sh index d3289015d2..74361fa9cb 100644 --- a/bin/tests/system/checkconf/tests.sh +++ b/bin/tests/system/checkconf/tests.sh @@ -300,20 +300,32 @@ n=$((n + 1)) echo_i "checking for missing key directory warning ($n)" ret=0 rm -rf test.keydir +rm -rf test.keystoredir $CHECKCONF warn-keydir.conf >checkconf.out$n.1 2>&1 l=$(grep "'test.keydir' does not exist" checkconf.out$n.2 2>&1 l=$(grep "'test.keydir' is not a directory" checkconf.out$n.3 2>&1 l=$(grep "key-directory"