• src/syncterm/ssh.c

    From Deuc¿@VERT to Git commit to main/sbbs/master on Tuesday, December 26, 2023 23:43:55
    https://gitlab.synchro.net/main/sbbs/-/commit/0c5a796cff1c4a2c99ec08af
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Somewhat working now... still some issues getting the second channel
    working reliably though.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Friday, December 29, 2023 09:50:11
    https://gitlab.synchro.net/main/sbbs/-/commit/468180f2be44185b50f0baff
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Remove debug output

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Friday, December 29, 2023 09:52:38
    https://gitlab.synchro.net/main/sbbs/-/commit/2e96a7e2a699035d7e7599fb
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Re-disable code accidentally enabled in last commit

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Friday, December 29, 2023 10:18:32
    https://gitlab.synchro.net/main/sbbs/-/commit/5bf3dfcd018246bced648726
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Clean up sftp popups.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Friday, December 29, 2023 18:26:32
    https://gitlab.synchro.net/main/sbbs/-/commit/999b9b76a1f3725be712d634
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Always flush after grabbing ssh mutex
    When flushing, set timeouts high, then set zero read timeout
    Ensure channel IDs are protected by the ssh mutex
    Check channels are open every time though input thread and before sends
    Fix various locking errors
    Install public key in a background thread

    Once a startup race is fixed, this should be good to go!

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Saturday, December 30, 2023 06:54:56
    https://gitlab.synchro.net/main/sbbs/-/commit/ff1291b5710fa601a21a2762
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Set timeouts at start and leave them that way

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Saturday, December 30, 2023 06:55:18
    https://gitlab.synchro.net/main/sbbs/-/commit/17cd7b169aea2d5c1f49d1ba
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Fix bug in last commit

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Saturday, December 30, 2023 06:59:25
    https://gitlab.synchro.net/main/sbbs/-/commit/0a3c7b9c1d53ff3465456487
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Add include for asprintf() on Win32

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sunday, January 21, 2024 01:24:08
    https://gitlab.synchro.net/main/sbbs/-/commit/157650844ddb11acc6269f14
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Fix up handling of lost connections.

    Was spinning at 100% CPU on a lost connection if sftp was active.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sunday, January 21, 2024 09:53:45
    https://gitlab.synchro.net/main/sbbs/-/commit/219303a61fa2e47752c5a974
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Check sftp_state before ending.

    Fixes assertion failure on hangup from SSH.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sunday, January 21, 2024 10:46:43
    https://gitlab.synchro.net/main/sbbs/-/commit/f6fe7c315f2f0fe3d9133a47
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    If we get a pop error, and there is no channel, we're done.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sunday, January 21, 2024 12:16:12
    https://gitlab.synchro.net/main/sbbs/-/commit/81b1224cf11dc2ce0993e45a
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    More remote closing connection fixups.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Monday, February 12, 2024 19:10:35
    https://gitlab.synchro.net/main/sbbs/-/commit/8db8e78736120a18caca8a0d
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Zero-Iniitalize err_len

    If call to GetAttributeString() fails, err_len can contain garbage.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, February 12, 2024 20:23:51
    https://gitlab.synchro.net/main/sbbs/-/commit/407eca73d3f48af29fcfd8aa
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    If call to GetAttributeString() fails, we have a lot worse problems
    than err_len containing garbage.

    Handle the error and mention we didn't get the message.
    While we're here, check the return value of malloc().

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Friday, February 16, 2024 10:01:55
    https://gitlab.synchro.net/main/sbbs/-/commit/43634f586821e25e09c6e45e
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Lower timeouts when closing SSH session.

    Reduces the time after a forced hangup that you need to wait before
    returning to the main menu.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Saturday, February 17, 2024 11:39:43
    https://gitlab.synchro.net/main/sbbs/-/commit/b855aa17bcc8b2c437968d9d
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Remove crufty code that effectively never does anything.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Saturday, February 17, 2024 11:45:41
    https://gitlab.synchro.net/main/sbbs/-/commit/80c10879c30446f7f74ec6d4
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Move sftp_channel under the ssh_mutex completely.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Saturday, February 17, 2024 12:02:52
    https://gitlab.synchro.net/main/sbbs/-/commit/e7d411e01d7e8422c1ce74ee
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Move sftp_state inside ssh_mutex.

    This won't matter now since only one thread ever touches it, but
    when cool stuff happens, it could.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, February 19, 2024 10:00:46
    https://gitlab.synchro.net/main/sbbs/-/commit/b8bc029bb50b1f05d5d26d4b
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Expand ssh_mutex over the flushes.

    This should also resolve a conspiracy Coverity has about two input
    threads running at the same time.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, February 19, 2024 10:12:06
    https://gitlab.synchro.net/main/sbbs/-/commit/282069f99e40cfdd38fe2bf8
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Likely fix a bunch of Coverity warnings.

    This is a very crazy lock/unlock pattern... an extra assignment
    makes it easier to follow the logic.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Tuesday, February 20, 2024 05:57:47
    https://gitlab.synchro.net/main/sbbs/-/commit/c7a09e0f7ce76d9016906c9e
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Move an sftp_state check inside mutex to silence Coverity.

    There's still outstanding issues in Coverity around sftp_state and
    sftp_channel that need some deep thought, but this one is trivial.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Wednesday, February 21, 2024 06:06:48
    https://gitlab.synchro.net/main/sbbs/-/commit/abec3d19c45e767bb6757e35
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    More input thread cleanup. There was an errant lock in there.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Thursday, February 22, 2024 20:53:08
    https://gitlab.synchro.net/main/sbbs/-/commit/b73c823bc200775056bbb0cd
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Catch when cryptFlushData() says the channel is closed.

    Also, fix an unlikely race condition. This, combined with the
    cryptlib patches, fixes various weird SSH hangs resulting from
    partial reads of the SSH packet headers... a rare event that's
    very hard to trigger. Special thanks to MeaTLoTioN for reporting
    this, and running a BBS that manages to trigger it reliably.

    Check out The Quantum Wormhole and say thanks!

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Thursday, February 22, 2024 20:53:08
    https://gitlab.synchro.net/main/sbbs/-/commit/b2041514748d0f4027763c73
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    sftp_channel is always -1 here.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Thursday, March 07, 2024 11:45:11
    https://gitlab.synchro.net/main/sbbs/-/commit/ccd73340c94c1eb688c7d561
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Fix LOR ion error path.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Thursday, March 07, 2024 11:45:11
    https://gitlab.synchro.net/main/sbbs/-/commit/efc6e23418fbd7a19cb77759
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Fix double-unlock and add code for impoosible situation

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Friday, March 08, 2024 09:37:42
    https://gitlab.synchro.net/main/sbbs/-/commit/7290558b5d91b75fd34f7b8c
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Move sftp_state setting outside of the ssh mutexes.

    Doesn't hurt anything where they were, but Coverity kinda reverse
    suggested it.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sunday, September 22, 2024 16:22:19
    https://gitlab.synchro.net/main/sbbs/-/commit/1bac2b62ef23ae473cb4622c
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Fix sourceforge issue 136

    With ssh_sock initialized to zero, if the connect fails, stdin was
    closed, preventing ANSI and curses modes from functioning.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sunday, September 22, 2024 16:46:21
    https://gitlab.synchro.net/main/sbbs/-/commit/8bc6f5f864e69b8d3c1f5680
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Some more ssh_close() cleanup

    Make ssh_active only true when ssh_session was set.
    Only do ssh cleanup if ssh_active is true.
    Initialize channel values to -1 (already done in ssh_connect(), but
    doesn't hurt anything).

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sunday, September 22, 2024 16:56:43
    https://gitlab.synchro.net/main/sbbs/-/commit/3d425a47316e605164f7b3e5
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Be sure to close ssh_sock regardless of ssh_active

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sunday, September 22, 2024 16:59:14
    https://gitlab.synchro.net/main/sbbs/-/commit/69c11e5072818e18aeb38f5e
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    Destroy ssh_tx_mutex

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sunday, September 22, 2024 16:59:14
    https://gitlab.synchro.net/main/sbbs/-/commit/5508a8a558058fcaeb356242
    Modified Files:
    src/syncterm/ssh.c
    Log Message:
    No no, *DESTROY* sftp_tx_mutex

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