Skip to content
Snippets Groups Projects
  1. Sep 13, 2020
  2. Sep 07, 2020
    • Rob Swindell's avatar
      Fix observed race-condition resulting in the HOSTNAME @-code being blank. · dee21ed6
      Rob Swindell authored
      Eliminate the hack in each server where it will over-write startup host_name
      (with the configured Internet email address), if it's blank. This hack was
      subject to a race condition where the parent app (e.g. sbbsctrl.exe) would
      clear or re-initialize the host_name after the sever threads had initialized.
      Instead, just use a function which will return either the startup->host_name
      or (fallback to) scfg.inet_addr.
      dee21ed6
  3. Aug 16, 2020
  4. Aug 15, 2020
    • rswindell's avatar
      More file existence/length checks, with only a WARNING log level (not error)... · f94d2132
      rswindell authored
      More file existence/length checks, with only a WARNING log level (not error) since some QWKnet nodes apparently like to start concurrent QWK packet downloads and inevitably one finishes first, deleting the file, and the second transfer logs and error. Examples:
        8/14  08:10:06p  2296 <EPHRAM> downloading QWK packet (1320 bytes) in passive mode
        8/14  08:10:06p  3792 <EPHRAM> downloading QWK packet (1320 bytes) in passive mode
        8/14  08:10:06p  2296 <EPHRAM> DATA Transfer successful: 1320 bytes sent in 0 seconds (2640 cps)
        8/14  08:10:06p  3792 <EPHRAM> !DATA ERROR 2 (No such file or directory) line 1376 opening s:\sbbs\data\file/0888.qwk
        8/14  11:28:55p  2576 <POTOGOLD> downloading QWK packet (27129 bytes) in passive mode
        8/14  11:28:55p  2576 <POTOGOLD> DATA Transfer successful: 27129 bytes sent in 0 seconds (54258 cps)
        8/14  11:28:55p  1924 <POTOGOLD> downloading QWK packet (4294967295 bytes) in passive mode
        8/14  11:28:56p  1924 <POTOGOLD> !DATA ERROR 2 (No such file or directory) line 1376 opening s:\sbbs\data\file/0168.qwk
      
      Also some more 64-bit file length support (flength returns an off_t now, not a ulong).
      And ftell() returns a long (not a ulong).
      f94d2132
  5. Aug 08, 2020
    • rswindell's avatar
      The problem: the sysop (me) is not notified of critical errors (e.g.... · 5899a303
      rswindell authored
      The problem: the sysop (me) is not notified of critical errors (e.g. synchro.net zone file problems) in a timely manner.
      Part of the solution: notify a configured user (e.g. user #1) via short-message/telegram and email/netmail logged-errors when messages of a configured severity (e.g. "Critical") are logged.
      The second part of the solution (coming next) will be allowing timed events to log a message of a configurable severity logged when the event fails (returns a non-zero error level to sbbs).
      
      I'm saving the error-notification-user-number and log-severity as part of the node.cnf file because:
      - that's where the validation user number is already set
      - I can conceive of a large system were certain node ranges (different instances of sbbs) might want different operators to be notified of logged-errors
      
      This also means I eliminated all the legacy com port/modem stuff from the end of the node.cnf file. None of that is used in sbbs v3.
      
      Also included in this commit are improvements around logging:
      - reduce the severity of UDP recvfrom failures in services
      - a more detailed log message when the mail server successfully delivers an email (via SMTP) - easier to answer the question: was that email you/they sent delivered successfully?
      5899a303
  6. May 27, 2020
  7. Apr 17, 2020
  8. Apr 11, 2020
    • rswindell's avatar
      Two unrelated changes, but since they touched sbbs.h, I'm committing them · 0d73dbc4
      rswindell authored
      together to keep things atomic:
      1. Eliminate eprintf() as sbbs_t::lputs() and sbbs_t::lprintf() do the
         "right thing" (e.g. log to the event log when called from the event_thread).
      2. Moved upload_stats() and download_stats() from ftpsrvr.c to getstats.c where
          I plan to make use of them for JS-based upload/download file support.
      0d73dbc4
  9. Mar 31, 2020
  10. Mar 19, 2020
    • rswindell's avatar
      Added usernum member to client_t which tracks if the client_t.user (name) · 570a9466
      rswindell authored
      is actually an authenticated local user (when usernum != 0).
      
      msg_client_hfields() no longer saves the client->user as the SMB SENDERUSERID
      hfield when the client hasn't been authenticated (as is the case with normal
      SMTP). The SENDUSERIDs were redundant and misleading for unauthenticated
      SMTP-received mail messages, so that's now fixed.
      570a9466
  11. Aug 31, 2019
    • rswindell's avatar
      Update the C getnodedat/putnodedat API to not require that the node file · 4c8482c9
      rswindell authored
      (ctrl/node.dab) is constantly closed and re-opened for every non-locking read.
      This is really slow across network file systems and unnecessary, so use a
      similar optimization as the C++ sbbs_t class where the file can (and normally
      is) left open across multiple consecutive reads.
      Create/use opennodedat() function.
      Uses the new CLOSE_OPEN_FILE() macro from xpdev/filewrap.h.
      4c8482c9
  12. Jun 20, 2019
  13. May 31, 2019
  14. May 07, 2019
  15. Apr 23, 2019
    • rswindell's avatar
      Clean up the hostname look-up stuff: · 60f996f9
      rswindell authored
      - getnameinfo() was being called with NI_NUMERICHOST in the mail server and
        web server (but nowhere else)
      - use a singly-defined macro (STR_NO_HOSTNAME) for the "<no name>" string
        rather than copying it about
      - the webserver apparently assumes that session->host_name will always have
        *some* unique value (e.g. the IP address when no hostname is available) - so
        account for that special need <grumble>
      60f996f9
  16. Mar 07, 2019
    • deuce's avatar
      There appears to be data corruption in cryptlib if a private key is added · 211a2a1a
      deuce authored
      to a second thread before the first has the session set active.  Add calls
      to lock/unlock the certificate to prevent this.
      
      The better options is likely to have a function that adds the key and socket
      and sets the session active in one call and handles the locking internally.
      
      But I'm lazy, so we get the lock functions.
      211a2a1a
  17. Jan 18, 2019
  18. Jan 12, 2019
    • rswindell's avatar
      Fix some new issues due to use of GLOB_MARK: · c683fd1d
      rswindell authored
      getfname() on a path that ends in a slash, returns an empty string pointer.
      Fixed-up some logging output around listing creations.
      c683fd1d
    • rswindell's avatar
      Optimized all directory listings and index generation: · 6906257d
      rswindell authored
      - use GLOB_MARK to eliminate calls to isdir() in loops
      - use stat() rather than calls to flength() and fdate()
      - don't call getfiledat() if getfileixb() failed
      - profiling info-level log msgs added for index/listing generation, e.g.
        "detailed listing (3459 bytes) of /main/SBBS (45 files) created in 2 seconds"
      
      Fixed bug with indexes generated for directories with the
      "Access Files Not In Database" option enabled, files not in database were
      excluded from the generated index (e.g. 00index, 00index.html).
      6906257d
  19. Jan 04, 2019
  20. Dec 12, 2018
  21. Nov 18, 2018
    • rswindell's avatar
      Hackety-hack-hack... hack · 6473f58a
      rswindell authored
      So I tested the following cases, which all pass:
      cwd diralias -> 250 CWD command successful.
      cwd /diralias -> 250 CWD command successful.
      cwd /diralias/ -> 250 CWD command successful.
      cwd /diralias/filename -> 550 filename: No such directory.
      cwd /filealias -> 550 filealias: No such diretory.
      cwd /filealias/ -> 550 : No such diretory.
      retr filealias -> 150 Opening BINARY mode data connection for file transfer.
      retr /filealias -> 150 Opening BINARY mode data connection for file transfer.
      
      Hopefully is the end of the fixes for Chrome browser ftp weirdness
      (tries to "CWD" to anything/everything to determine if it's a file or not).
      6473f58a
  22. Nov 17, 2018
  23. Nov 06, 2018
  24. Nov 05, 2018
    • rswindell's avatar
      Fixed-up some log output messages: · 0193468a
      rswindell authored
      - user alias was missing from some messages or in the wrong place
      - added hostname and IP address to the "ILLEGAL FILENAME ATTEMPT" warnings
      0193468a
  25. Oct 31, 2018
    • rswindell's avatar
      Fix bug with filename aliases (in ftpalias.cfg) which caused an incompatility · cd57c421
      rswindell authored
      with Chrome (the browser). Chrome will attempt to "CWD" to a filename and if
      that filename was an alias from the ftpalias.cfg, we would return a
      successful (213) response - erroneously. The code did appear to check for
      this condition by calling ftpalias() with a NULL second (filename)
      parameter, but that didn't actually work. The 'alias+1' check for a slash
      appears to have (always?) been clearly wrong as a prefixed slash is already
      skipped (in the requested path) before calling ftpalias().
      cd57c421
  26. Oct 17, 2018
  27. Oct 05, 2018
  28. Apr 24, 2018
  29. Apr 09, 2018
  30. Apr 06, 2018
  31. Apr 05, 2018
Loading