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

libssh2: replace access() with stat() #13498

Closed
wants to merge 2 commits into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented 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.

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

Ref: #13412 (comment)
Ref: #13482 (comment)
Ref: #13497
Closes #13498

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
@jay
Copy link
Member

jay commented Apr 30, 2024

I added a commit to your branch that adds access to the bannedfunc list so that we don't run into this again

@vszakats vszakats closed this in 602fc21 Apr 30, 2024
@vszakats vszakats deleted the libssh2-use-stat branch April 30, 2024 08:05
vszakats added a commit to vszakats/curl that referenced this pull request May 9, 2024
Replace `stat()` calls with `fopen(.., FOPEN_READTEXT)`, which is
how libssh2 opens these files at a later point.

Follow-up to 602fc21 curl#13498

Bug: curl@602fc21#r141676880
Reported-by: Harry Sintonen
Closes #xxxxx
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

3 participants