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

mime: avoid using access() #13497

Closed
wants to merge 3 commits into from
Closed

mime: avoid using access() #13497

wants to merge 3 commits into from

Conversation

bagder
Copy link
Member

@bagder bagder commented Apr 29, 2024

If stat() fails, there is no point in calling access()

Also: return error immediately if the stat() fails.

Ref: #13482

If stat() fails, there is no point in calling access()

Also: return error immediately if the stat() fails.

Ref: #13482
@bagder bagder added the MIME label Apr 29, 2024
vszakats added a commit to vszakats/curl that referenced this pull request Apr 29, 2024
Prefer `stat()` to verify the presence of key files.

This drops the last uses of `access()` in the codebase, which was
reported to cause issues in some cases.

Ref: curl#13412 (comment)
Ref: curl#13482 (comment)
Ref: curl#13497
Closes #xxxxx
@bagder bagder closed this in fc81bf4 Apr 29, 2024
@bagder bagder deleted the bagder/mime-access branch April 29, 2024 14:30
vszakats added a commit that referenced this pull request Apr 30, 2024
Prefer `stat()` to verify the presence of key files.

This drops the last uses of `access()` in the codebase, which was
reported to cause issues in some cases.

Also add `access()` to the list of banned functions in checksrc.

Ref: #13412 (comment)
Ref: #13482 (comment)
Ref: #13497
Co-authored-by: Jay Satiro
Closes #13498
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

1 participant