From 9561a0b98385180441b2f5aa338fb583a94d4c40 Mon Sep 17 00:00:00 2001 From: Ingo Franzki Date: Tue, 23 Oct 2018 14:34:30 +0200 Subject: [PATCH] zkey: Enhance error message on key store open MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Print a meaningful reason when the keystore can not be accessed, e.g. because the user is not allowed to access the keystore directory. Signed-off-by: Ingo Franzki Signed-off-by: Jan Höppner --- zkey/keystore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zkey/keystore.c b/zkey/keystore.c index 11f555cb..666e3606 100644 --- a/zkey/keystore.c +++ b/zkey/keystore.c @@ -1359,7 +1359,7 @@ struct keystore *keystore_new(const char *directory, bool verbose) util_assert(directory != NULL, "Internal error: directory is NULL"); if (stat(directory, &sb) != 0) { - warnx("'%s' does not exist", directory); + warnx("Can not access '%s': %s", directory, strerror(errno)); return NULL; } if (!(sb.st_mode & S_IFDIR)) {