• src/sbbs3/ftpsrvr.c main.cpp nopen.c nopen.h

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sat Nov 16 12:22:59 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/8f2102a7f68f4c30d377722d
    Modified Files:
    src/sbbs3/ftpsrvr.c main.cpp nopen.c nopen.h
    Log Message:
    Leave the user/*.ftp lock file open for better protection

    This appears to be the only way to 100% provide mutual exclusivity between Windows and Linux client sharing a Samba file system.

    Also, make fmutex_close() take a pointer to the file descriptor so that we can better manage the resource (i.e. don't close a descriptor that's already been closed and possibly valid in another thread).

    ---
    ■ 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 Sun Nov 17 17:34:16 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/b7bd03313a6f8156f03c69a0
    Modified Files:
    src/sbbs3/ftpsrvr.c main.cpp nopen.c nopen.h
    Log Message:
    Have fmutex_open()/close() accept a fmutex_t* argument

    This is needed for *nix where normal (i.e. not Samba-mount) file behavior requires that we manually unlink() the file, but not until just before closing it. So we have to keep track of the file name and the 'auto_remove' desire of the caller. This is not necessary when the file is on a Linux-smbfs, but we need to work as expected on normal/local *nix file systems too.

    This solves atomic lock file removal for *nix, but does not gaurantee lock file cleanup upon ungraceful process termination (e.g. crash). At least in this particular case, Windows beats UNIX.

    ---
    ■ 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 Sun Nov 17 17:47:50 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/1f37517ce697091d170e1b96
    Modified Files:
    src/sbbs3/ftpsrvr.c main.cpp nopen.c nopen.h
    Log Message:
    Simplify the fmutex_open() usage: always auto-remove when using open/close()

    The auto-remove param was only needed for fmutex(), which immediately closes (and thus don't want auto-removal), so create an internal function that's
    used by both fmutex() and fmutex_open().

    ---
    ■ 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 Mon Nov 18 10:56:33 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/86433ba89bc7a723dcceaa9f
    Modified Files:
    src/sbbs3/ftpsrvr.c main.cpp nopen.c nopen.h
    Log Message:
    Simplify fmutex_open() signature even more, add fmutex_init()

    Can't used designated initializers in fmutex_init() because this file is still built with C++Builder6.

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