Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scandir() on XFS file system #2927

Open
niki-sp opened this issue Dec 16, 2024 · 0 comments · May be fixed by #2928
Open

scandir() on XFS file system #2927

niki-sp opened this issue Dec 16, 2024 · 0 comments · May be fixed by #2928

Comments

@niki-sp
Copy link

niki-sp commented Dec 16, 2024

With XFS file system d_type is DT_UNKNOWN for files in fapi-profiles dir.

https://github.com/tpm2-software/tpm2-tss/blob/7375e2731b3f005e8961fe22192506e27a635806/src/tss2-fapi/ifapi_io.c#L501

This check fails and result is:

ERROR:fapi:src/tss2-fapi/ifapi_profiles.c:117:ifapi_profiles_initialize_async() No files found in profile dir /etc/tpm2-tss/fapi-profiles that match the pattern P_*.json 
JuergenReppSIT added a commit to JuergenReppSIT/tpm2-tss that referenced this issue Dec 16, 2024
It is not guaranteed that d-type of the structure dirent contains the
type of a file entry. It is possible that d_type has the value DT_UNKNOWN
or d_type is not supported at all.
To fix this problem, the functions is_regular_file and is_directory are
defined.
Fixes tpm2-software#2927

Signed-off-by: Juergen Repp <juergen_repp@web.de>
JuergenReppSIT added a commit to JuergenReppSIT/tpm2-tss that referenced this issue Dec 17, 2024
It is not guaranteed that d-type of the structure dirent contains the
type of a file entry. It is possible that d_type has the value DT_UNKNOWN
or d_type is not supported at all.
To fix this problem, the functions is_regular_file and is_directory are
defined.
Fixes tpm2-software#2927

Signed-off-by: Juergen Repp <juergen_repp@web.de>
JuergenReppSIT added a commit to JuergenReppSIT/tpm2-tss that referenced this issue Dec 17, 2024
It is not guaranteed that d-type of the structure dirent contains the
type of a file entry. It is possible that d_type has the value DT_UNKNOWN
or d_type is not supported at all.
To fix this problem, the functions is_regular_file and is_directory are
defined.
Fixes tpm2-software#2927

Signed-off-by: Juergen Repp <juergen_repp@web.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant