• src/sbbs3/ftpsrvr.c

    From rswindell@1:103/705 to CVS commit on Sat Aug 15 12:15:39 2020
    src/sbbs3 ftpsrvr.c 1.500 1.501
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv23645

    Modified Files:
    ftpsrvr.c
    Log Message:
    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).


    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to sbbs/master on Sat Oct 24 22:06:02 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/10477fe29378aebb82b8efd2
    Modified Files:
    src/sbbs3/ftpsrvr.c
    Log Message:
    Create the pack*.now with fmutex() to prevent simultaneous QWK packsProbably only a problem on Vertrauen, but some QWKnet nodes, for some unknown reason, like to FTP-connect multiple times concurrently and request to download a QWK packet. This creates a race condition where the QWK packet gets created/downloaded/deleted before the second FTP connection can successfully download the same file, thus logging an error "opening file " on the server (VERT). So if the pack*.now file already exists, reject the download request. "What are doing?" is what I really want to ask these nodes, but better just throw them an error response and quietly move on.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Tue Dec 29 23:51:44 2020
    https://gitlab.synchro.net/main/sbbs/-/commit/31d07482c7dc81b1af72e495
    Modified Files:
    src/sbbs3/ftpsrvr.c
    Log Message:
    Remove 3 second delay before disconnecting when max clients reachedThis seems to be misguided and would only increase the chances of a DoS-type attack on TCP session resources.A second 3-second delay upon malloc failure is also removed.
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Thu Dec 31 02:23:34 2020
    https://gitlab.synchro.net/main/sbbs/-/commit/dcb003099daa5b03e53542d4
    Modified Files:
    src/sbbs3/ftpsrvr.c
    Log Message:
    Log messages indicating AUTH TLS success or failure and set client protSet the client protocol to "FTPS" upon successful TLS startup in the control connection (response to the AUTH TLS command from the client). Log some messages indicating FTPS was attempted or successful.
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Sat Jan 9 13:44:06 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/3ead8a4d227af07c81c2c8e5
    Modified Files:
    src/sbbs3/ftpsrvr.c
    Log Message:
    Don't delete pack####.now upon FTP-logoffWhen a user logins to the FTP server concurrently, this creates arace condition with an/the other FTP session that may be creating/downloading a QWK packet. On Vertrauen, this results in theoccasional error removing the file since it was removed unexpectedly:!ERROR 2 (No such file or directory) in main.cpp line 2747 (event_thread) removing "/sbbs/data/pack1111.now" access=0
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Fri Feb 19 09:32:09 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/59b8829a0915a454233ea17d
    Modified Files:
    src/sbbs3/ftpsrvr.c
    Log Message:
    Fix CIDs 174500 and 174471
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Mon Mar 8 11:41:21 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/b62505add30804e8c6a6fb79
    Modified Files:
    src/sbbs3/ftpsrvr.c
    Log Message:
    Remove extraneous (void) typedefsSee if this resolves rjwboys reported error:threadwrap.h:204:42: error: expected expression before ‘do’ #define protected_uint32_init(pval, val) atomic_init(pval, val)
    --- SBBSecho 3.13-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Mon Jun 7 20:14:25 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/6fee19566f510a9c5cda36a4
    Modified Files:
    src/sbbs3/ftpsrvr.c
    Log Message:
    Detect TLS startup errors correct/fullyWe can't (apparently) only rely on the return value of start_tls(), we have to check the value of the crypt session too.This fix the possibility of this happening:Jun 7 18:07:26 sbbs synchronet: ftp 0058 TLS ERROR 'No permiss.to perform this operation' (-21) opening keysetJun 7 18:07:26 sbbs synchronet: ftp 0058 <192.168.1.25> initialized TLS successfullyInstead, we'll detect the failure and disable FTPS support, logging "failed to initialize TLS successfully".
    --- SBBSecho 3.14-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Sat Sep 18 17:02:24 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/bb1ee45982174c3a0a73ce1e
    Modified Files:
    src/sbbs3/ftpsrvr.c
    Log Message:
    Fix segfault reported with ftpalias.cfg support in some casesftpalias() can return true even when the directory is not set to a validdirectory index (i.e. set to -1), so using as an array index would definitelysegfault. Part of commit 8ad30b6c by Deuce 3 years ago.I didn't test this as I'm not sure exactly the combination of ftpalias.cfgcontent and FTP command received that would trigger this, but it's mostdefinitely a bug.So should fix the segfault reported in issue #288.
    --- SBBSecho 3.14-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Sat Sep 18 22:22:14 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/15906e19c9b0b832027ce673
    Modified Files:
    src/sbbs3/ftpsrvr.c
    Log Message:
    Handle FTP requests for paths that start with "/./"Midnight Commander (mc) apparently sends requests like this for files(e.g. aliases) in the virtual root directory.Fixes another part of the reported issue #288.
    --- SBBSecho 3.14-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Sun Dec 5 18:42:38 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/17a67ee9d95051145677ec52
    Modified Files:
    src/sbbs3/ftpsrvr.c
    Log Message:
    Fix FTPS upload failure: !DATA ERROR 0 receiving on data socketDon't treat CRYPT_ERROR_COMPLETE (-24) as a socket error during upload since it's an indication that the remote closed the connection and is the normal "end of file/transfer" indicator, not an error. 'rd' is already 0 in this case, so no need to set at all (since recv() returns 0 upon disconnect and that's what we're emulating here).Fixes issue #309 reported by Jas Hud.
    --- SBBSecho 3.14-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From MRO@1:103/705 to Rob Swindell on Mon Dec 6 13:35:33 2021
    Re: src/sbbs3/ftpsrvr.c
    By: Rob Swindell to Git commit to main/sbbs/master on Sun Dec 05 2021 06:42 pm

    https://gitlab.synchro.net/main/sbbs/-/commit/17a67ee9d95051145677ec52 Modified Files:
    src/sbbs3/ftpsrvr.c
    Log Message:
    Fix FTPS upload failure: !DATA ERROR 0 receiving on data socket

    Don't treat CRYPT_ERROR_COMPLETE (-24) as a socket error during upload since it's an indication that the remote closed the connection and is the normal "end of file/transfer" indicator, not an error. 'rd' is already 0 in this case, so no need to set at all (since recv() returns 0 upon disconnect and that's what we're emulating here).

    Fixes issue #309 reported by Jas Hud.

    i cant upload files using any protocol on your bbs and cvs.synchro.net
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to MRO on Mon Dec 6 13:20:33 2021
    Re: src/sbbs3/ftpsrvr.c
    By: MRO to Rob Swindell on Mon Dec 06 2021 01:35 pm

    Fixes issue #309 reported by Jas Hud.

    i cant upload files using any protocol on your bbs and cvs.synchro.net

    Working for me (now). I replied to your emails about this already. I appreciate your continued testing.

    Don't try to use SyncTERM v1.2b for uploads (they don't work).
    --
    digital man (rob)

    Synchronet/BBS Terminology Definition #14:
    CGA = Color Graphics Adapter (IBM)
    Norco, CA WX: 72.0øF, 35.0% humidity, 8 mph NNW wind, 0.00 inches rain/24hrs --- SBBSecho 3.14-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From MRO@1:103/705 to Digital Man on Tue Dec 7 14:58:09 2021
    Re: src/sbbs3/ftpsrvr.c
    By: Digital Man to MRO on Mon Dec 06 2021 01:20 pm

    Re: src/sbbs3/ftpsrvr.c
    By: MRO to Rob Swindell on Mon Dec 06 2021 01:35 pm

    Fixes issue #309 reported by Jas Hud.

    i cant upload files using any protocol on your bbs and cvs.synchro.net

    Working for me (now). I replied to your emails about this already. I appreciate your continued testing.

    Don't try to use SyncTERM v1.2b for uploads (they don't work).

    yeah i tried to delete this msg but it already sent.
    i'm using 1.1b win32 of syncterm
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to MRO on Tue Dec 7 19:45:13 2021
    Re: src/sbbs3/ftpsrvr.c
    By: MRO to Digital Man on Tue Dec 07 2021 02:58 pm

    Re: src/sbbs3/ftpsrvr.c
    By: Digital Man to MRO on Mon Dec 06 2021 01:20 pm

    Re: src/sbbs3/ftpsrvr.c
    By: MRO to Rob Swindell on Mon Dec 06 2021 01:35 pm

    Fixes issue #309 reported by Jas Hud.

    i cant upload files using any protocol on your bbs and cvs.synchro.net

    Working for me (now). I replied to your emails about this already. I appreciate your continued testing.

    Don't try to use SyncTERM v1.2b for uploads (they don't work).

    yeah i tried to delete this msg but it already sent.
    i'm using 1.1b win32 of syncterm

    1.1 was released over a year ago. That's the supported/known-working version. 1.1b (for SyncTERM) means "beta" or pre-1.1.
    --
    digital man (rob)

    This Is Spinal Tap quote #39:
    Female Airport Security Officer: Do you have any artificial plates or limbs? Norco, CA WX: 54.1øF, 85.0% humidity, 0 mph SSW wind, 0.00 inches rain/24hrs --- SBBSecho 3.14-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From MRO@1:103/705 to Digital Man on Wed Dec 8 05:14:29 2021
    Re: src/sbbs3/ftpsrvr.c
    By: Digital Man to MRO on Tue Dec 07 2021 07:45 pm

    yeah i tried to delete this msg but it already sent.
    i'm using 1.1b win32 of syncterm

    1.1 was released over a year ago. That's the supported/known-working version. 1.1b (for SyncTERM) means "beta" or pre-1.1.

    yeah, it works for what i use it for so i'm not going to upgrade.
    it's not bombing out on me during connections.
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)