Skip to content
Snippets Groups Projects
  1. Jan 21, 2025
  2. Jan 14, 2025
  3. Dec 01, 2024
    • Rob Swindell's avatar
      Simplify the getnode.cpp API - use bool returns, default paramaeter value · 62ed3d3a
      Rob Swindell authored
      getnodedat() now performs a non-locked read by default.
      
      Perform more checks of getnodedat() return value before calling putnodedat()
      to avoid unintentionally zeroing out node.dab records.
      
      Add/use unlocknodedat() method for unlocking a node.dab record without
      writing.
      
      Note: The userdat.c getnodedat() and putnodedat() still return int (i.e. 0 on
      success), so that can be confusing.
      62ed3d3a
  4. Nov 15, 2024
    • Rob Swindell's avatar
      Only allow one FTP session per QWKnet user account · 9b3be7dc
      Rob Swindell authored
      Vertrauen's FTP server gets abused by QWKnet logins sometimes and handling
      the race conditions around QWK packet creation attempts is silly - there's
      no legit reason why a QWKnet account needs to be logged-in multiple times
      concurrently to the hub's FTP server, so reject the subsequent logins even
      when they're on different hosts (as is the case with Vertrauen).
      
      As part of this change:
      - fmutex() now takes an new time_t* argument to (optionally) store the
        time of the mutex file for helping logging (locked since when?).
      - time_as_hhmm() created to format a string as either HH:MM or HH:MM[a|p]
        (depending on system configuration for 12 or 24 hour time formatting).
      - renamed the old hhmmtostr ()to tm_as_hhmm() (since it takes a struct tm arg)
        and have it return a non-padded string (useful in more situations without
        requiring truncation) when the sysop prefers 24-hour time.
      9b3be7dc
  5. Nov 04, 2024
  6. Oct 18, 2024
  7. May 04, 2024
    • Rob Swindell's avatar
      Change client_t.protocol from pointer to buffer · dd2afc92
      Rob Swindell authored
      Fix observed crash when shutting down services server where the client_t
      protocol was pointing to a freed service's protocol description string.
      
      This was the last pointer in client_t and should resolve the last race
      conditions (memory ownership issues) with its data members.
      
      This also resolves a small memory leak in getnodeclient() where the last
      client "gotten" would have its heap-duplicated protocol string leaked.
      dd2afc92
  8. Mar 03, 2024
    • Deucе's avatar
      Fix issue when third SSH authentication attempt succeeds · 393241ca
      Deucе authored
      Because the session is activated on the *next* time through the
      loop, if the third attempt to authenticate (including public key)
      fails, it would leave the session inactive and fail to log in with
      a confusing error about an obsolete cryptlib.
      
      On success, decrement ssh_failed to ensure another pass through
      the loop.
      
      Also, add more debug logging around the auth so you can clearly
      see each failure, and log client_socket each time so it's clearly
      grouped.
      393241ca
    • Rob Swindell's avatar
      Add configurable SFTP session inactivity timer (default: 5 minutes) · bdc7fde8
      Rob Swindell authored
      Allow SFTP support to be enabled/configured in SCFG->Servers and
      SBBSCTRL->Terminal->Configure.
      
      SFTP session inactivity applies to 'H' exempt users too (intentionally).
      bdc7fde8
    • Rob Swindell's avatar
      Add some log lines for SFTP logins, non-filebase file transfers · 72bd94af
      Rob Swindell authored
      Q for Deuce: record_transfer() is being called multiple times for non-filebase
      file transfers, resulting in duplicate log messages. This doesn't happen for
      filebase file transfer (downloads, anyway).
      72bd94af
    • Rob Swindell's avatar
      Address the SFTP logon issues (timeout waiting for keypress, node status, etc) · f1276068
      Rob Swindell authored
      For SFTP sessions, there's no shell/terminal, so no need to run command
      shells (with their input timeouts, etc.). Reflect the node connection as
      "via sftp" in the node status. Handle node interruption signal. Probably more
      to do here with node status/actions (e.g. it'd be nice to set the action to
      "uploading or "downloading" when appropriate).
      f1276068
  9. Mar 02, 2024
  10. Feb 29, 2024
  11. Feb 28, 2024
  12. Feb 27, 2024
  13. Feb 17, 2024
  14. Feb 16, 2024
    • Rob Swindell's avatar
      UTF-8 improvements · 2584a864
      Rob Swindell authored
      Don't corrupt UTF-8 strings with SAFECOPY() (use new SAFECOPY_UTF8).
      
      Some terminals (notably, Windows Terminal) display zero width UNICODE chars
      as a single column-wide space. <sigh> Auto-detect the zero-width "width"
      (1 or 0) of the terminal during connection and UTF-8 auto-detection.
      
      getstr() works a lot better now with UTF-8 strings with wide chars (e.g.
      emojis), but likely much more to do.
      2584a864
  15. Jan 23, 2024
  16. Jan 21, 2024
  17. Jan 18, 2024
    • Deucе's avatar
      Whoops, missed this bit. · 8c276ee8
      Deucе authored
      Just running git commit --amend doesn't do -a it seems. :)
      8c276ee8
    • Deucе's avatar
      Move SSH authentication into answer() · ba2608b1
      Deucе authored
      This should fix a long-standing issue where someone could connect to
      the SSH port and do nothing, which would prevent other incoming
      terminal sessions from being accepted until it times out.
      
      Unfortunately, this means that Synchronet can't send any data until
      authentication is completed, which means useful messages about why
      you're being disconnected (ie: "Sorry, all terminal nodes are in use or otherwise unavailable.")
      as well as usless information nobody ever cares about (ie: The IP
      you're connecting from, that it is resolving your hostname, etc).
      can no longer be sent to the user.
      ba2608b1
  18. Dec 28, 2023
  19. Dec 24, 2023
    • Deucе's avatar
      As I was starting to add support for detecting non-interactive · b99d161b
      Deucе authored
      SSH channels, I noticed that I hand't ever finished the terminal
      type/size "stuff", and while fixing that, I noticed that the hack
      for SyncTERM was done wrong.
      
      Fix the whole thing, and now Synchronet and SyncTERM both properly
      support terminal type and size over SSH.  It also looks trivial to
      support the SSH window size change message, but I'm not doing that
      tonight.
      
      Unfortunately, this is a patch on a patch, so is a bit fragile.
      It should really have the patches merged at some point.
      b99d161b
  20. Sep 24, 2023
  21. Mar 18, 2023
    • Rob Swindell's avatar
      Add terminal-client socket inactivity detection/disconnection · 53b26318
      Rob Swindell authored
      - New keys in [BBS] section of sbbs.ini:
        MaxLoginInactivity (default: 10 minutes)
        MaxNewUserInactivity (default: 60 minutes)
        MaxSessionInactivity (default: none/unlimited)
      - Each configured external program/door in SCFG can have its own maximum inactivity setting (or else the session max inactivity is applied)
      - moved node-specific sec_hangup to system-wide/shared max_getkey_inactivity (configured in SCFG->System->Advanced)
      - moved node-specific sec_warn (seconds of inactivity before sending warning) to inactivity_warn (a percentage of elapsed max inactivity before sending warning), also configured in SCFG->System->Advanced and used for both socket and getkey inactivity detection
      - Renamed JS console.inactivity_hangup to console.max_getkey_inactivity (old name remains as alias)
      - Renamed JS console.timeout to console.last_getkey_activity (old name remains as alias)
      - Removed JS console.inactivity_warning
      - Added JS console.max_socket_inactivity (current input_thread inactivity threshold)
      - New text.dat string: InactivityAlert (just contains 3 ^G/BELLs by default) used for non-visual inactive-user warning
      
      The MaxLoginInactivity setting in particular solves the problem of custom scripts (e.g. animated pause prompts) that just poll indefinitely for user input and never time-out  - these will no longer cause nodes to be tied-up with inactive/bot users at login.
      
      You may ask yourself, how did I get here? No, you may ask yourself: why configure these socket inactivity max values in sbbs.ini? The reason is consistency: sbbs.ini is where the MaxInactivity is configured for all the other TCP servers and services.
      
      This fixes issue #534 for Krueger in #synchronet
      53b26318
  22. Feb 19, 2023
  23. Jan 04, 2023
Loading