mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
The zkey list function uses scandir() to look for files in the zkey key repository directory. It checks the dirent.d_type field to consider only regular files, but skip all others. Unfortunately, not all file systems have full support for returning the file type in d_type. When the zkey repository is located in a file system that does not support d_type, such as xfs, zkey list shows no keys, although the key repository contains keys. Fix this by also considering directory entries with d_type = DT_UNKNOWN. Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>