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

[filemanager] replace euidaccess() with opendir() #5

Merged
merged 1 commit into from Jan 26, 2023
Merged

Conversation

NotKit
Copy link
Contributor

@NotKit NotKit commented Jan 26, 2023

euidaccess implementation in glibc directly compares effective uid/gid to Unix permissions of file and does not take Posix ACLs into account.

Since we only need this check to display a meaningful error message, call opendir instead and check if it succeeds.

src/plugin/filemodel.cpp Outdated Show resolved Hide resolved
@NotKit NotKit force-pushed the jb59856 branch 2 times, most recently from 3778e8f to a6e568c Compare January 26, 2023 09:03
@NotKit NotKit changed the title [filemanager] replace euidaccess() with faccessat() [filemanager] replace euidaccess() with opendir() Jan 26, 2023
@mkosola
Copy link
Contributor

mkosola commented Jan 26, 2023

Tested on Xperia 10 II and works fine.

src/plugin/filemodel.cpp Outdated Show resolved Hide resolved
…59856

euidaccess implementation in glibc directly compares effective
uid/gid to Unix permissions of file and does not take Posix ACLs
into account.

Since we only need this check to display a meaningful
error message, call opendir instead and check if it succeeds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants