Skip to content
Snippets Groups Projects
  1. Jan 14, 2025
  2. Dec 21, 2024
    • Rob Swindell's avatar
      Encode local wallclock (not time_t) in SMB's when_t.time · 445394f9
      Rob Swindell authored
      Increment SMBLIB version to 3.10
      
      Fix issue #845: Changing system/OS time zone, changes dates/times of posted
      messages
      
      Sysops and users shouldn't notice any change unless they change the time zone
      of their system/OS (not accounting changes for daylight/standard time) and
      the result will be that message dates appear the same after such a change.
      
      For backward compatibily, any stored time_t's in msghdr_t.when_written.time
      (i.e. all existing SMB messages) will still be decoded and displayed properly.
      We detect a time_t value by the upper 6 bits being non-zero. When the upper
      6 bits of a when_written.time value are zero, then we know the 'year' is
      stored in the 16-bits before the when_written field (never used bits of the
      netattr field, now part of the when_t structure definition) and the Month,
      Day, Hour, Minute, and Second of the wallclock at the poster's site are
      encoded in the low 26 bits of the time field.
      
      This also eliminates more uses of 32-bit time_t that'll likely start being
      a problem 2038 and really fall over and die in 2106. At least messages'
      posting dates won't have any issue now. The "when_imported" values could use
      a similar treatment someday I suppose - and we could get rid of the
      when_imported.zone value as its not really needed we could use those 16-bits
      for the when_imported.year.
      
      Didn't change anything with filebases (still using time_t's though the
      when_written hdr field isn't used for much with regards to files).
      
      Yes, we could have converted all imported "broken down" message dates to
      UTC and continued to store them as a time_t using timegm() instead of mktime()
      for conversion to time_t, and I considered that. But we would have needed to
      create/use a flag in the message header to indicate such stored date/times
      (since they'd have to go through different adjustment for original time zone
      before display, basically reversing the logic of all the places we display the
      message dates/times using localtime verus gmtime/UTC C RTL functions),
      couldn't just initialize the time with a call to time() upon import of local
      messages (unless the local timezone happened to be UTC). And in the end, we'd
      still have a 32-bit time_t value. So this seemed the better path.
      
      I would have liked to have stored the date fields in a more human readable
      encoding (BCD or decimal, ala isoDate and isoTime_t), but I just didn't have
      the spare bits in the fixed portion of message headers to be wasteful like
      that.
      
      Here's an example from smbutil v of a message header posted after this change:
        when_written     03292595 41E0 Fri Dec 20 18:22:21 2024 PST
        when_imported    6766265D 41E0 Fri Dec 20 18:22:21 2024 PST
      
      Notice the difference in the hex encoding of the date/time between the 2
      header fields: when_imported still uses time_t. The when_written.year value
      isn't output here.
      445394f9
  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 22, 2023
  5. Oct 20, 2022
  6. Oct 18, 2022
    • Rob Swindell's avatar
      Full read/write support of new user.tab userbase file · 8a22b246
      Rob Swindell authored
      Also resolved some 32 vs 64-bit 'long' issues/ambiguities that have long-remained. :-)
      
      This commit also removes logon.lst file support.
      
      There's a TODO block remaining in js_user.c for setting portions of a user's birthdate (e.g. just the year or month or day).
      8a22b246
  7. Feb 26, 2022
  8. 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
  9. Aug 16, 2020
  10. May 14, 2020
    • rswindell's avatar
      No longer dynamically allocate compiled access requirment (AR) strings for configuration items. · 110cc8ac
      rswindell authored
      SCFG for Win32 is linked against a load_cfg lib that builds withOUT SCFG defined, so these compiled AR elements were allocated and then many SCFG operations (e.g. copy/paste, create new) would copy the allocated ARs to another configuration and then be subjected to double-free upon exit/clean-up (resulting in exception or crash).
      Just get rid of this cruft and some other related RAM-byte-saving hold-overs from the MS-DOS days.
      110cc8ac
  11. Jul 08, 2019
  12. Apr 12, 2019
    • rswindell's avatar
      Define and use a new external message editor option: SAVECOLUMNS · ee00b5f8
      rswindell authored
      (default: off) - when enabled, the current terminal width (columns) will be
      saved in the msg header.
      When using the internal msg editor or raw intput mode, the columns are always
      saved in the message editor. fseditor.js should have this option enabled.
      ee00b5f8
  13. Feb 20, 2019
    • rswindell's avatar
      Reversed course on the WM_QUOTE mode handling in sbbs_t::postmsg() · 57424543
      rswindell authored
      (JS bbs.post_msg()): If the WM_QUOTE mode flag is *not* set, then it will auto-
      create the quote file (quotes.txt) and add the WM_QUOTE mode bit before calling
      sbbs_t::writemsg(). So if existing JS scripts call bbs.post_msg(..., WM_QUOTE)
      with a custom-created quote file (e.g. with msg tails), that'll still work as
      before (e.g. DDMsgReader.js).
      
      bbs.email() and bbs.netmail() now support an optional reply_header_object
      argument which works like bbs.post_msg(). These methods (and the underlying
      C++ methods: sbbs_t::email(), netmail(), inetmail(), all auto-create the
      quote file now, when the WM_QUOTE mode flag is *not* set.
      
      The auto-created quotes.txt now includes the plain-text version of MIME-encoded
      messages.
      
      the bbs.post_msg(), email(), and netmail() methods now all support reply
      header objects that came directly from bbs.get_msg_header() *or* copies of
      such header objects (but the auto-quoting feature won't work when supplied
      this type of header object). So if passed a header object returned from
      bbs.get_msg_header(), we can now use the message base (for auto-quoting) and
      the underlying msg storage directly (no JS parsing necessary). This is what
      the new js_GetMsgHeaderObjectPrivates() function is used for.
      
      js_ParseMsgHeaderObject() (and the underlying parse_header_object() function)
      now supports either an actual internally-generated msg header object (e.g.
      returned from bbs.get_msg_header()) or one that is a copy or hand-constructed.
      
      quotemsg() no longer tries to get a copy of the msg index/header. It shouldn't
      have to since we can now get to underlying msg storage in the js_msgbase.c
      via js_GetMsgHeaderObjectPrivates().
      
      quotemsg() now reads only the plain-text portion of MIME-encoded messages.
      
      As part of this effort, I modernized the method prototypes using default
      argument values (e.g. WM_NONE for wm_mode arguments) and removed some
      extraneous WM_EMAIL and WM_NETMAIL specifications (these wm_mode flags are
      automatically added by the sbbs_t::email() and *netmail() functions).
      
      savemsg() now *does* support reply-IDs/thread-linkage via the additional
      'remsg' argument (when non-NULL).
      
      Replaced some use of nulstr with NULL.
      
      Replaced more boilerplate SMB open code with calls to smb_open_sub().
      57424543
  14. Oct 30, 2018
  15. Aug 03, 2018
  16. Feb 20, 2018
  17. Nov 24, 2017
  18. Nov 26, 2015
    • rswindell's avatar
      Don't add .sig file to messages posted or emailed anonymously (duh!). · f78ff5f9
      rswindell authored
      writemsg() now handles the anonymous name in the drop files (using WM_ANON
      for the first time?).
      A little mixed-case NETMAIL.MSG paranoia (for case-sensitive file systems).
      More use of SAFEPRINTF().
      More use of removecase().
      More attribute flags represented (with a single character) in the 'A' column
      of mail and sub-board message listings.
      f78ff5f9
  19. Nov 25, 2015
    • rswindell's avatar
      Bug-fix: pass the 'from' name to writemsg() and editor_inf() so that the drop · 6b39f6f3
      rswindell authored
      files and editors have the correct sender name in all situations (not just
      when posting on "real name only" sub-boards).
      "ANONYMOUS" postings work too, but mainly Internet & FidoNet Netmail were fixed.
      Use removecase() for NETMAIL.MSG (in case there's a lowercase version).
      Use subj in place of title and to in place of dest in argument names.
      Some constification of argument types.
      6b39f6f3
  20. Nov 23, 2015
  21. Oct 19, 2011
  22. Aug 30, 2011
  23. Mar 06, 2010
  24. Oct 25, 2009
  25. Mar 20, 2009
    • rswindell's avatar
      ARS improvements: · 1cdf2c10
      rswindell authored
      Added HOST and IP keywords to allow restricted access/privileges to/for
      specific remote hostnames or IP addresses (wildcards allowed).
      All string-argument type ARS keywords (e.g. SHELL, PROT, etc.) now support .can
      style wildcards.
      The current remote client is now used for protocol, host, and IP ARS checking,
      when available, so this requires passing the client pointer around (which
      explains why so many files are touched by this change) and takes care of a
      long standing to-do item (the user's 'modem' value was used for the PROT
      value checking, which was not always correct).
      1cdf2c10
  26. Aug 23, 2006
  27. Oct 02, 2005
  28. Nov 17, 2004
    • rswindell's avatar
      JS_THREADSAFE is now defined in sbbs.h - this change requires a cvs update in · 050a2985
      rswindell authored
      the include directory to get the new include/mozilla/nspr header files
      (or js_internal.c will fail to compile)!
      savemsg() now uses smb_addmsg() for most of it's functionality.
      savemsg() now accepts an optional client_t* argument, if non-NULL will
      automatically call msg_client_hfields().
      MsgBase.save_msg() method now accepts an optional client object argument to
      automatically set the security log header fields (sender IP addres, hostname,
      protocol, and port).
      050a2985
  29. Oct 27, 2004
  30. Oct 21, 2004
  31. Sep 17, 2004
  32. Sep 08, 2004
  33. Sep 02, 2004
  34. Mar 31, 2004
  35. Dec 16, 2003
  36. Dec 07, 2003
  37. Dec 06, 2003
Loading