Repository navigation
Conversation
|
consistent fail in 'CM address-sanitizer H3 c-ares', with libssh: seems unrelated. It's related to Linuxbrew libssh2 bump from libssh2/1.11.1_5 to libssh2/1.11.1_6, which applied this patch: |
CURLX_FILE_MODE() with mode_t castCURLX_FILE_MODE() with mode_t cast
This comment was marked as off-topic.
This comment was marked as off-topic.
Homebrew libssh2 1.11.1_6 revision backported a patch which disabled legacy algorithms by default, without re-enabling them manually. This effectively disabled MD5, breaking runtests relying on it. Fix by disabling these tests when using Homebrew libssh2. Fixing, in 'CM address-sanitizer H3 c-ares' CI job: ``` FAIL 664: 'SFTP correct host key' SFTP, server key check FAIL 665: 'SCP correct host key' SCP, server key check FAIL 2007: 'SFTP quote rmdir command with trailing junk' SFTP, --quote ``` Ref: https://github.com/curl/curl/actions/runs/36691471709/job/109812874116#step:50:4471 Refs: https://github.com/libssh2/libssh2/commit/b89858b83d68d7e29e0c5b0bb803f8a68271710c.patch Homebrew/homebrew-core@ebe712b Homebrew/homebrew-core#311239 Bug: #23181 (comment) Closes #23182
Note, Windows `open()` expects an `int`, so only use this in non-Windows codepaths.
a24116c to
305b970
Compare
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
All reviewed changes have been assessed with no unresolved blocking issues.
Review effort: Lite
Findings: None
What changed in this PR
Replaces CURLX_FILE_MODE() with explicit mode_t casts in non-Windows code paths.
Changes:
- Updates file mode handling for qlog, uploads, temporary files, and
fchmod(). - Removes the obsolete compatibility macro.
- Preserves Windows-specific handling.
| File | Description |
|---|---|
lib/vquic/vquic.c |
Casts qlog file permissions to mode_t. |
lib/file.c |
Casts uploaded file permissions to mode_t. |
lib/curlx/win32-fopen.h |
Removes the obsolete macro. |
lib/curl_fopen.c |
Casts file creation and fchmod() modes to mode_t. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Thanks! If CI likes this, I like it too. Please let me fire up a build on a few more systems, I'll post the results tomorrow morning. |
MarcelRaad
left a comment
There was a problem hiding this comment.
Works for all my builds, thanks!
mode_tis POSIX.Note, Windows
open()expectsint, so only use this in non-Windowscodepaths.
Ref: https://learn.microsoft.com/cpp/c-runtime-library/reference/open-wopen
Suggested-by: Dan Fandrich
Ref: #23158 (comment)
Follow-up to d48f2f4 #23171
Follow-up to be9e603 #23158