Skip to content

mime: avoid using access() - #13497

Closed
bagder wants to merge 3 commits into
masterfrom
bagder/mime-access
Closed

mime: avoid using access()#13497
bagder wants to merge 3 commits into
masterfrom
bagder/mime-access

Conversation

@bagder

@bagder bagder commented Apr 29, 2024

Copy link
Copy Markdown
Member

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
vszakats added a commit to vszakats/curl that referenced this pull request Jan 13, 2026
vszakats added a commit that referenced this pull request Jan 13, 2026
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.

1 participant