• src/sbbs3/sftp.cpp src/sftp/sftp.h sftp_client.c sftp_common.c sftp_se

    From Deuc¨@VERT to Git commit to main/sbbs/master on Friday, April 24, 2026 14:19:28
    https://gitlab.synchro.net/main/sbbs/-/commit/faf6902e71d543abc2d818b8
    Modified Files:
    src/sbbs3/sftp.cpp src/sftp/sftp.h sftp_client.c sftp_common.c sftp_server.c src/syncterm/sftp_browser.c sftp_queue.c
    Log Message:
    SFTP: sha1s/md5s/descs extensions, hash-verified compare, history drop-on-connect

    Library: two new handshake extensions (sha1s@syncterm.net, md5s@syncterm.net) carry the raw binary digest as a file-attribute extension; a third (descs@syncterm.net) is an on-demand SSH_FXP_EXTENDED query that takes a
    path and returns the extdesc string as SSH_FXP_EXTENDED_REPLY. Adds sftpc_descs(), sftps_send_extended_reply(), and sftp_rx_get_string() for
    the server-side extended callback to parse args. Also fixes a missing
    break in the SSH_FXP_EXTENDED dispatch case.

    Server (sbbs3/sftp.cpp): implements the descs handler Ä walks the path
    through path_map, smb_findfile + smb_getfile(file_detail_extdesc), sends
    back file.extdesc. Wires sftp_state->extended. Also fixes a dormant
    C++ bug in path_map(const char*, ...) Ä it tried to delegate by
    instantiating a temporary in the body, which left the real object with
    result_ = MAP_FAILED. Delegation now goes through the member init list.

    SyncTERM browser: when size matches, the local-compare now verifies via
    SHA-1 or MD5 (preferring SHA-1) if the server advertised a hash for the
    file; otherwise falls back to mtime. F2 on a highlighted file queries
    the descs extension and displays the extended description in a
    scrollable popup. Queue history is dropped at connect time Ä DONE /
    FAILED / CANCELLED rows from the previous session aren't reloaded, so
    each session starts with just its still-pending transfers.

    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Saturday, April 25, 2026 15:36:08
    https://gitlab.synchro.net/main/sbbs/-/commit/1c0786d644bf61f0d8f695a4
    Modified Files:
    src/sbbs3/sftp.cpp src/sftp/sftp.h sftp_client.c sftp_common.c sftp_server.c src/syncterm/sftp_browser.c
    Log Message:
    sftp: add pubdir@syncterm.net extension; sbbs3 advertises /files

    Server-to-client one-shot string carried in the SFTP VERSION
    extension list. Client advertises name/"1" in INIT; server replies
    name/<path> in VERSION when state->pubdir is set. Path is captured
    into the client's private state and exposed via sftpc_get_pubdir().

    The asymmetric data field is spec-legal (extension-data is opaque
    bytes per draft-ietf-secsh-filexfer-02) but doesn't fit the existing table-driven negotiation, so the server masks SFTP_EXT_PUBDIR off
    the standard append_extensions() emit and appends name+path manually,
    and the client recognises the entry by name and captures the data
    explicitly (extension_match() can't fire when the data is the path).

    sbbs3/sftp.cpp sets pubdir = SLASH_FILES so SFTP clients land in the
    public filebase root. syncterm's SFTP browser now prefers the
    advertised pubdir as its initial cwd, falling back to realpath(".")
    then "/" for servers that don't offer the extension.

    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net