mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zkey: Enhance error message on key store open
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 <ifranzki@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
97fa88299f
commit
9561a0b983
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user