]> git.ipfire.org Git - thirdparty/curl.git/commit
libssh2: replace `access()` with `stat()`
authorViktor Szakats <commit@vsz.me>
Mon, 29 Apr 2024 11:49:03 +0000 (13:49 +0200)
committerViktor Szakats <commit@vsz.me>
Tue, 30 Apr 2024 08:03:16 +0000 (10:03 +0200)
commit602fc213aeda9e9bb2879143942d850e000b2ea6
tree9fff901f71dbc40ff59433cbdc28b507e7c64c10
parent7f7ad97bf1288f9fa3edcf3c19a0adfe584c0ba6
libssh2: replace `access()` with `stat()`

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: https://github.com/curl/curl/pull/13412#issuecomment-2065505415
Ref: https://github.com/curl/curl/pull/13482#issuecomment-2078980522
Ref: #13497
Co-authored-by: Jay Satiro
Closes #13498
lib/vssh/libssh2.c
scripts/checksrc.pl