• src/ssh/TODO.md deucessh-auth.h deucessh.h ssh-auth.c ssh-conn.c ssh-t

    From Deucе@VERT to Git commit to main/sbbs/master on Fri Mar 27 05:30:23 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/b69afc762cf041e1f4dc696b
    Modified Files:
    src/ssh/TODO.md deucessh-auth.h deucessh.h ssh-auth.c ssh-conn.c ssh-trans.c src/ssh/test/test_auth.c test_conn.c test_transport.c
    Log Message:
    Fix error code accuracy: add REJECTED codes, fix ~50 misuses

    Two new error codes: DSSH_ERROR_AUTH_REJECTED (-12) for USERAUTH_FAILURE, DSSH_ERROR_REJECTED (-13) for CHANNEL_OPEN_FAILURE/CHANNEL_FAILURE.

    Fixes ~50 sites where error codes were misleading or wrong-category:
    - Auth rejection: INIT -> AUTH_REJECTED (3 sites in ssh-auth.c)
    - Channel rejection: INIT -> REJECTED (2 sites in ssh-conn.c)
    - Unexpected message type: INIT -> PARSE (3 sites in ssh-auth.c)
    - NULL-argument checks: INIT -> INVALID (~36 sites across all 3 files)
    - Wrong-state writes: INIT -> TERMINATED (3 sites in ssh-conn.c)
    - Channel ID exhaustion: ALLOC -> TOOMANY (1 site in ssh-conn.c)
    - Packet too short: TOOLONG -> PARSE with split condition (ssh-trans.c)
    - Negotiation failure: INIT -> INVALID (1 site in ssh-trans.c)
    - Empty registration name: TOOLONG -> INVALID with split (6 funcs)

    Closes TODO items 9 and 44.

    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net