diff options
| author | andretuta <andreviniciusmerlia@gmail.com> | 2026-11-24 02:42:07 -0300 |
|---|---|---|
| committer | andretuta <andreviniciusmerlia@gmail.com> | 2026-11-24 02:42:07 -0300 |
| commit | d7cdfcf25500503fbd694fb6eb949b694ae71bdf (patch) | |
| tree | b373008d61f4d167d4f30bccd6ad803aa6b6aa14 /runtime/src/bcpack.cpp | |
| parent | 7f7a5968563718098c3c592193ecb8da14e7d49a (diff) | |
ws2_offline: per-socket extension pointers, refuse name-service lookups, close connect-by-name and octal bypasses, cover wsock32
Review fixes for #357:
- ConnectEx / WSASendMsg wrappers ask the host for the pointer of the socket they run on, instead of one
process-wide pointer that the last WSAIoctl on any provider overwrote.
- WSALookupServiceBeginA/W fail with WSASERVICE_NOT_FOUND.
- WSAConnectByNameA/W hand the host the literal 127.0.0.1 for "localhost", so the hosts file is never read.
- A dotted octet with a leading zero (0127.0.0.1) is refused: Windows reads it as octal.
- wsock32.dll maps bind/connect/sendto/gethostby*/WSAAsyncGetHostBy* (names and ordinals) to the same wrappers and
stays host-owned in owns_dll, like ws2_32.dll.
- docs/runtime_imports.md no longer says a --run can open real sockets; it names the dnsapi.dll gap.
Tested: ws2_offline_test built with clang 23 (msys2 clang64) on Windows: 52 checks, 0 failures. MSVC build not
available locally; CI covers it. tests/test_docs_*.py, test_text_write_line_endings.py, test_runtime_paths.py pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/bcpack.cpp')
0 files changed, 0 insertions, 0 deletions