Skip to content
Snippets Groups Projects
  1. Dec 07, 2024
    • Rob Swindell's avatar
      Always free(mail) · 855fb1be
      Rob Swindell authored
      I don't think this was actually a leak (since smb.msgs should be non-zero
      any time mail is non-null), but to make Coverity happy (CID 515659) and just
      be more fault-tolerant, always free(mail).
      855fb1be
  2. Dec 06, 2024
  3. Dec 05, 2024
    • Rob Swindell's avatar
      Add/use xp_lockfile() to support blocking file range/region lock acquisition · 03b84df8
      Rob Swindell authored
      Under heavy loads, I've found periodic non-blocking lock attempts just aren't
      reliable enough: in particular, on Vertrauen, the guest user account record
      in the user.tab file gets read and written-to A LOT (updating stats), and
      under heavy loads (especially with hundreds of web client sessions), I'd get
      timeouts attempting to lock the guest record in the user.tab (after about a
      minute of periodic retries) - so let's just block "forever" to get the user
      record lock (or until signaled or notified of a deadlock). With this change,
      I've not had any user.tab lock errors or apparent deadlocks.
      
      Let the underlying OS/filesystem handle queuing and deadlock detection,
      when supported. lock() still behaves as before: non-blocking lock attempt.
      03b84df8
    • Deucе's avatar
      Add a test client and fix a couple bugs. · a1c5e191
      Deucе authored
      a1c5e191
    • Rob Swindell's avatar
      De-duplicate repeated errors logged via sbbs_t::errormsg() by reducing severity · 5f89c517
      Rob Swindell authored
      ... from ERROR to WARNING, so the repeats won't be logged to error.log file
      and won't (normally) be sent as notifications (e.g. emails) to the sysop. The
      duplicates are identified as from the same source file and line number as the
      immediately previous logged error within the last 12 hours. String comparison
      doesn't really work for deduplication since if you look closely, the errors
      usually are *not* exact duplicates (i.e. there's a node number or a socket
      descriptor or something that uniquely identifies the user/client/session).
      Repeated errors don't increment the node's error counter either.
      
      This does not de-duplicate errors logged via other means (e.g. direct calls to
      log()/lputs(),lprintf() with a severity of LOG_ERR or higher), but will
      solve the majority of duplicate errors that can be logged from the terminal
      server.
      
      So this at least partially addresses issue #619.
      5f89c517
    • Rob Swindell's avatar
  4. Dec 04, 2024
  5. Dec 03, 2024
    • Deucе's avatar
      Introduce portable.h for ugly hacks · 1ab78800
      Deucе authored
      The plan is to hide non-standard stuff in here.  Currently, just
      has [[maybe-unused]] from C23.
      1ab78800
    • Deucе's avatar
      Use FindOpenSSL instead of pkg-config for OpenSSL · c65fe446
      Deucе authored
      c65fe446
    • Deucе's avatar
      Start of DeuceSSH · 1998f435
      Deucе authored
      The intent is that this will be a library implementation of SSH
      which allows simple extension of the base protocol, and exposes all
      defined features of the protocol (including ones nobody uses).
      
      This will support both client and server, with initial focus on the
      client implementation for use in SyncTERM.
      
      The goal of the core library is to only support the most secure
      standard methods.  When there are multiple methods that are not
      clearly of differing levels of security, the most common two will
      be implemented (ie: RSA and Ed25519).
      
      Additionally, care will be taken during development to allow for
      the OpenSSH Encrypt-then-MAC MAC modes in the expectation that
      someone will standardize an ETM mode at some point, and I expect
      to write an extension to support it soon after DeuceSSH is
      complete.
      
      Finally, if I cannot mitigate Terrapin without non-standard
      extensions, the OpenSSH "strict KEX" extension will be supported
      until there's a standard defined that solves the issue.
      1998f435
    • Rob Swindell's avatar
      On Windows, lock the opened mutex file to insure *nix sopen() will fail · 11af4bd4
      Rob Swindell authored
      Even though we use O_EXCL, networked file systems still sometimes allow the
      secondary open() to succeed. We use record locking in xpdev's sopen()
      implementation for *nix, so this lock will insure such opens (and locks) will
      now fail.
      
      This is an attempt to address occassional error on Vertrauen:
      ERROR 2 (No such file or directory) renaming *.rep to *.bad
      11af4bd4
    • Rob Swindell's avatar
    • Rob Swindell's avatar
      Check return value of writeuserfields() in putuserstr() · ccef9d28
      Rob Swindell authored
      Return correct error value upon seek failure.
      ccef9d28
    • Rob Swindell's avatar
      Don't use flock() in sopen() since it ends up using non-OFD fcntl() locks · 77a77109
      Rob Swindell authored
      When OFD locks are available, that's what we should be using.
      Otherwise, we suffer the horrible behavior of POSIX file/region locks and
      a subsequent open/close of the file releases any/all locks on it.
      
      This is currently in an !BSD block, which appears to include macOS, but
      macOS *does* support OFD locks, so I'll be fixing that here shortly.
      77a77109
  6. Dec 02, 2024
Loading