Skip to content

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

Closed
vszakats wants to merge 2 commits into
curl:masterfrom
vszakats:libssh2-use-stat
Closed

libssh2: replace access() with stat()#13498
vszakats wants to merge 2 commits into
curl:masterfrom
vszakats:libssh2-use-stat

Conversation

@vszakats

@vszakats vszakats commented Apr 29, 2024

Copy link
Copy Markdown
Member

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

jay commented Apr 30, 2024

Copy link
Copy Markdown
Member

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.

3 participants