• Re: src/sbbs3/xtrn_sec.cpp

    From Mindless Automaton@VERT/ELDRITCH to rswindell on Wednesday, January 15, 2014 23:21:21
    On 9/15/2013 3:32 AM, rswindell wrote:
    src/sbbs3 xtrn_sec.cpp 1.76 1.77
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv5880

    Modified Files:
    xtrn_sec.cpp
    Log Message:
    Fix in user_event(): if the user doesn't have run/execute access to the program
    don't try to run it. Previously it would display an error to the user: "Sorry, you have insufficient access to run that program" (which is confusing for the user).


    I have Falcon's Eye & Falcon's Honor set up the same way. WHen I try to
    run (as sysop) Falcon's Eye, I get the Sorry message, but when I try to
    run Falcon's Honor, it runs fine.

    I run 3.16 Debug A Jan 15, 2014 (although this been happening with my
    previous compile)

    Anyways to resolve the message I ended up wiping out the all of my door setups. (also had to delete xtrn.dat in the node directory)
    Alternatively, I tried wiping out just xtrn.dat, but that did not clear whatever was messed up.

    Anyways, I have a zip of my old xtrn.cnf if anyone would care to dissect
    them.

    Thanks!
    Mindless Automaton
    ---
    þ Synchronet þ Eldritch Clockwork BBS - eldritch.darktech.org
  • From rswindell@VERT to CVS commit on Thursday, November 05, 2015 17:54:33
    src/sbbs3 xtrn_sec.cpp 1.77 1.78
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv25541

    Modified Files:
    xtrn_sec.cpp
    Log Message:
    Address some fo Deuce's observations about the door.sys file generated by sbbs: - the default protocol (line 27) was hard-coded to 'Y' rather than whatever the user had
    selected.
    - the "BBS default color (line 41) wsa hard-coded to 14 - now uses the
    External Programs (default attribute) value from ctrl/attr.cfg (default: 15).

    It's unlikely these changes will actually affect the operation of any doors, but might as well make the content a bit more dynamic/accurate.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Tuesday, April 17, 2018 15:57:28
    src/sbbs3 xtrn_sec.cpp 1.84 1.85
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv25004

    Modified Files:
    xtrn_sec.cpp
    Log Message:
    Extend USE_DOSEMU patch to drop file creation for non-native doors:
    Use drive mappings (e.g. D:, F:, G:, H:) rathe than absolute paths to node_dir, ctrl_dir, data_dir, and exec_dir in drop files.
    Also: fixed what appears to have been a copy/paste error in the node_dir
    and ctrl_dir mapping to Win32-shortnames for non-native doors on Windows.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Monday, August 19, 2019 18:33:15
    src/sbbs3 xtrn_sec.cpp 1.86 1.87
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv2402

    Modified Files:
    xtrn_sec.cpp
    Log Message:
    Address issue raiseed by Immortal:
    On Linux, using DOSEMU, he would end up with both door.sys and DOOR.SYS in the node directory and some doors would open the wrong file and fail to initialize. Solution: delete all case-versions of drop filenames before creating them. Don't you just love case-sensitive file systems? :-(


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Saturday, March 28, 2020 16:45:04
    src/sbbs3 xtrn_sec.cpp 1.87 1.88
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv30081

    Modified Files:
    xtrn_sec.cpp
    Log Message:
    Stop searching-for and deleting INTRSBBS.DAT before running any external.
    This is an artifact from SBBS v2 for DOS:
    The file would contain the address of a shadow of the modem status register (written by execdos.exe) for dropped-carrier detection in xsdk doors (or the "dcdwatch" utility) while the BBS was "shrunk" out of memory to execute the external program with maximal available memory.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Sunday, May 10, 2020 15:23:47
    src/sbbs3 xtrn_sec.cpp 1.89 1.90
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv17616

    Modified Files:
    xtrn_sec.cpp
    Log Message:
    Delete the old hard-coded External Program Section (xtrn_sec) implementation. The system must use an external program module (e.g. xtrn_sec.js) now or this function will just display/log an error and exit.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Friday, October 02, 2020 19:38:01
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/3209fee4ccbc81050824e696
    Modified Files:
    src/sbbs3/xtrn_sec.cpp
    Log Message:
    (more) Safe string handling

    strcpy -> SAFECOPY
    sprintf -> safe_snprintf or SAFEPRINTF2
    strcat -> SAFECAT

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to sbbs/master on Tuesday, November 17, 2020 22:02:53
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/623d9e3d507c9f7db969da88
    Modified Files:
    src/sbbs3/xtrn_sec.cpp
    Log Message:
    Don't reset line counter after executing externals.

    This behavior was cut/pasted from xtrn_sec.js but doesn't play well with logon events (e.g. SBBSIMSG list) that should pause before a following CLS. As reported by altere on the I, the R, and the C.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbsmaster on Tuesday, November 24, 2020 19:39:25
    https://gitlab.synchro.net/main/sbbs/-/commit/ae6aede74704558ed3e248d1
    Modified Files:
    src/sbbs3/xtrn_sec.cpp
    Log Message:
    Fix Linux-DOSEMU compile error introduced in previous commit.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Friday, December 11, 2020 13:12:51
    https://gitlab.synchro.net/main/sbbs/-/commit/938c4ee196a477a4eea22130
    Modified Files:
    src/sbbs3/xtrn_sec.cpp
    Log Message:
    Use term_supports() rather than useron.misc for drop file terminal caps

    Always use the return value of term_supports(), which correctly supports pre-logon and auto-terminal-capability-detection, rather than useron.misc for all door drop file generation.

    This should resolve the issue recently discussed in #synchronet with regards to a user getting non-ANSI output from door games even when using an ANSI-capable terminal.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Tuesday, November 23, 2021 19:55:53
    https://gitlab.synchro.net/main/sbbs/-/commit/5cf938148bcc110b604c5d7f
    Modified Files:
    src/sbbs3/xtrn_sec.cpp
    Log Message:
    Continuation of previous commit (support for UART-only doors on Windows)

    Needed the actually mapping of XTRN_UART -> EX_UART mode flag here.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Wednesday, February 23, 2022 23:25:45
    https://gitlab.synchro.net/main/sbbs/-/commit/5b9c39e190152b4a2b981ab6
    Modified Files:
    src/sbbs3/xtrn_sec.cpp
    Log Message:
    Fix wrong size argument (not actual problem)

    CID 174261

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Friday, March 04, 2022 23:16:07
    https://gitlab.synchro.net/main/sbbs/-/commit/959fa9fe08666fe6d0259afd
    Modified Files:
    src/sbbs3/xtrn_sec.cpp
    Log Message:
    Don't use pointers to the low byte of multi-byte integers

    This only works on little endian systems (which is all we support currently).

    Fixes CID 174261: Wrong size argument

    This binary drop file writing code is pretty terrible and inefficient, but I remember being really proud of it (supporting so many drop files). This really should be re-written to use structures and/or buffered file I/O.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Tuesday, March 08, 2022 23:38:32
    https://gitlab.synchro.net/main/sbbs/-/commit/6ddae40a5b23d21b78c63921
    Modified Files:
    src/sbbs3/xtrn_sec.cpp
    Log Message:
    Fix EXITINFO.BBS generation for 64-bit time_t and more

    So I was working on re-writing some of this door file generation code and noticed that the EXITINFO.BBS files generated by SBBS:

    1. had a lot of garbage data filling unused string characters (no "harm", but potentially leaking information)
    2. had the wrong total file length due to 64-bit logontime (time_t)
    3. had the wrong total file length due to writing 19 GosubData elements (instead of 20)

    The first and last issues appear to be some of those "forever" (20+ year old) bugs.

    So I'm guessing no regularly used door games actually use these portions of the EXITINFO.BBS, so most likely: no harm, no foul. But still, best to fix this before I commit the rewrite.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Wednesday, March 09, 2022 22:07:34
    https://gitlab.synchro.net/main/sbbs/-/commit/85d9915b8eaa586d5ec4a143
    Modified Files:
    src/sbbs3/xtrn_sec.cpp
    Log Message:
    Overhaul EXITINFO.BBS creation using C++ templated classes

    Ah, that's better. Actually would work correctly on big-endian platforms (should we ever support one) and with way less code.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Wednesday, March 09, 2022 22:12:06
    https://gitlab.synchro.net/main/sbbs/-/commit/44810bb051267fc8ddeb3c59
    Modified Files:
    src/sbbs3/xtrn_sec.cpp
    Log Message:
    Remove unused variable

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Friday, March 11, 2022 21:42:50
    https://gitlab.synchro.net/main/sbbs/-/commit/f41d2475beeb7d1fc325c991
    Modified Files:
    src/sbbs3/xtrn_sec.cpp
    Log Message:
    Remove now-unneeded str2pas() function

    Functionality replaced with Pascal::String

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Saturday, March 12, 2022 23:13:18
    https://gitlab.synchro.net/main/sbbs/-/commit/1abae6a2a5e9b86a92f184d2
    Modified Files:
    src/sbbs3/xtrn_sec.cpp
    Log Message:
    Use buffered file I/O when writing drop files and overhaul PCBOARD.SYS

    ... and USERS.SYS file creation using new C++ type definitions in pcbdefs.hpp.

    This mostly fixes issue #366.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Saturday, March 12, 2022 23:21:15
    https://gitlab.synchro.net/main/sbbs/-/commit/ff60b4f95b2e70842780f94d
    Modified Files:
    src/sbbs3/xtrn_sec.cpp
    Log Message:
    Address new warning

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Tuesday, March 29, 2022 12:21:53
    https://gitlab.synchro.net/main/sbbs/-/commit/446f28d60ed14e86814d0cb0
    Modified Files:
    src/sbbs3/xtrn_sec.cpp
    Log Message:
    Use PRIu64 for (newly) 64-bit user fields (credits, up/download bytes)

    Fixes recently-introduced crash when generating text drop files (e.g. XTRN.DAT, SFDOORS.DAT, DOOR.SYS, CHAIN.TXT) on Win32 (only) where a 'long int' is still just 32-bit.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Tuesday, March 29, 2022 20:18:45
    https://gitlab.synchro.net/main/sbbs/-/commit/df9b2c9d8a8ef1e1d2b2f586
    Modified Files:
    src/sbbs3/xtrn_sec.cpp
    Log Message:
    CHAIN.TXT files need CRLF terminated lines

    This was a regression (to just LF-terminated lines), an accidental change (from "text" to "binary" file-open) in commit 07580ea7b1b6e.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Thursday, April 21, 2022 21:45:17
    https://gitlab.synchro.net/main/sbbs/-/commit/6b36b3792f49d8b37bcbf7d1
    Modified Files:
    src/sbbs3/xtrn_sec.cpp
    Log Message:
    Limit door.sys numeric values to 32767

    The DoorFrame door library will about with "Overflow Error" if it reads a door.sys file with lines 16 (calls), 42 (minute credits), or 52 (posted messages) with a value > 32767, the maximum positive value of a signed 16-bit integer. So cap these values in the door.sys file at that maximum. This does potentially break/limit doors that give minutes using the door.sys drop file, so use that "modify user data" option in SCFG with care.

    Electrosys initially reported this problem with the Lemonade! door game which was barfing on a line 42 value of 449632.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sunday, April 24, 2022 17:36:19
    https://gitlab.synchro.net/main/sbbs/-/commit/e8c2e70cc1a44a90d7044125
    Modified Files:
    src/sbbs3/xtrn_sec.cpp
    Log Message:
    Add line 8 (user's real name) to DOORFILE.SR (Solar Realms' drop file)

    Apparently this line was added at some point, not sure if it's actually used
    in any doors, but here it is anyway.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sunday, April 24, 2022 17:36:19
    https://gitlab.synchro.net/main/sbbs/-/commit/2ebc0bb7892d874db684f9e0
    Modified Files:
    src/sbbs3/xtrn_sec.cpp
    Log Message:
    Populate line 36 (user alias) of door.sys with the current user's handle

    Previously, we just always made this a blank line.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Saturday, October 08, 2022 20:02:23
    https://gitlab.synchro.net/main/sbbs/-/commit/cf35956b350af5ca83395b7c
    Modified Files:
    src/sbbs3/xtrn_sec.cpp
    Log Message:
    Don't require USE_DOSEMU for DOS-compatible drive mappings in xtrn.dat

    We no longer use/require the USE_DOSEMU definition anywhere else, so
    this was just a miss when the DOSEMU patch was perm-enabled.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Monday, February 13, 2023 11:20:56
    https://gitlab.synchro.net/main/sbbs/-/commit/553e9229faa73c9f16dfed5d
    Modified Files:
    src/sbbs3/xtrn_sec.cpp
    Log Message:
    Fix "running external" log message format mistake

    Introduced in commit 73e5dd9c, reported by Codefenix

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows)@VERT to Git commit to main/sbbs/master on Saturday, September 23, 2023 20:29:02
    https://gitlab.synchro.net/main/sbbs/-/commit/8facd954892600d2d636ca6a
    Modified Files:
    src/sbbs3/xtrn_sec.cpp
    Log Message:
    Add space after numeric value on second line of DOORFILE.SR

    This appears to work around a bug in BRE, FE, and TAL where they don't recognize the "1" (ANSI supported) unless there is at least one other
    character on the line following the decimal digit, resulting in the
    unnecessary prompting of the user:
    This game is much more enjoyable with ANSI graphics enabled.
    Do you want ANSI Graphics? (Y/n)

    As reported by "ben" in IRC.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Wednesday, February 07, 2024 13:19:47
    https://gitlab.synchro.net/main/sbbs/-/commit/9fe49eba2534f6efe40efc56
    Modified Files:
    src/sbbs3/xtrn_sec.cpp
    Log Message:
    Another time_t printf

    ---
    þ 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 Sunday, March 03, 2024 18:31:44
    https://gitlab.synchro.net/main/sbbs/-/commit/161f9470a75a51d04ef27fac
    Modified Files:
    src/sbbs3/xtrn_sec.cpp
    Log Message:
    Clear any mouse hot-spots before executing external program from exec_xtrn()

    As Nelgin pointed out, mouse hot-spots were still active when running external programs (door games) - so clear any active hot-spots before running external programs.

    This could possibly be done in external() instead, but this sufficient for
    now. I wouldn't want a menu that EXEC's something (via @-code) to lose all its hot-spots as a result.

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