Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tee-supplicant: plugin: remove regular file check
The readdir(3) man page mentions: Currently, only some filesystems (among them: Btrfs, ext2, ext3, and ext4) have full support for returning the file type in d_type. All applications must properly handle a return of DT_UNKNOWN. Which is exactly the case on my nitrogen6x test system based on YOCTO gatesgarth even using ext4: getdents64(4</usr/lib/tee-supplicant/plugins>, [{d_ino=3269, d_off=375390918, d_reclen=64, d_type=DT_UNKNOWN, d_name="f07bfc66-958c-4a15-99c0-260e4e7375dd.plugin"}, …], 32768) = 112 Even the regular test plugin for the tee-supplicant is identified as DT_UNKNOWN, preventing the supplicant from loading the plugin. Instead try to open all files within the plugin directory, excluding "." & "..". Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
- Loading branch information